CUSTOM Subcommand (CSLOGISTIC command)

The CUSTOM subcommand defines custom hypothesis tests by specifying the L matrix (contrast coefficients matrix) and the K matrix (contrast results matrix) in the general form of the linear hypothesis LB = K. The vector B is the parameter vector in the linear model.

For a binary dependent variable, CSLOGISTIC models a single logit. In this case, there is one set of parameters associated with the logit.

For a multinomial dependent variable with K levels, CSLOGISTIC models K−1 logits. In this case, there are K−1 sets of parameters, each associated with a different logit. The CUSTOM subcommand allows you to specify an L matrix in which the same or different contrast coefficients are used across logits.

  • Multiple CUSTOM subcommands are allowed. Each subcommand is treated independently.
  • An optional label may be specified by using the LABEL keyword. The label is a string with a maximum length of 255 characters. Only one label can be specified.
  • Either the LMATRIX or KMATRIX keyword, or both, must be specified.

    LMATRIX. Contrast coefficients matrix. This matrix specifies coefficients of contrasts, which can be used for studying the effects in the model. An L matrix can be specified by using the LMATRIX keyword.

    KMATRIX. Contrast results matrix. This matrix specifies the results of the linear hypothesis. A K matrix can be specified by using the KMATRIX keyword.

  • The number of rows in the L and K matrices must be equal.
  • A custom hypothesis test can be formed by specifying an L or K matrix, or both. If only one matrix is specified, the unspecified matrix uses the defaults described below.
  • If KMATRIX is specified but LMATRIX is not specified, the L matrix is assumed to be the row vector corresponding to the intercept in the estimable function, provided that INCLUDE = YES or ONLY is specified on the INTERCEPT subcommand.
  • The default K matrix is a zero matrix; that is, LB = 0 is assumed.
  • There are three general formats that can be used on the LMATRIX keyword: (1) Specify a coefficient value for the intercept, followed optionally by an effect name and a list of real numbers. (2) Specify an effect name and a list of real numbers. (3) Specify keyword ALL and a list of real numbers. In all three formats, there can be multiple effect names (or instances of the keyword ALL) and number lists.
  • Only valid effects in the default model or on the MODEL subcommand can be specified on the LMATRIX keyword.
  • The length of the list of real numbers on the LMATRIX keyword must be equal to the number of parameters (including the redundant parameters) corresponding to the specified effect. For example, if the effect A*B takes up six columns in the design matrix, the list after A*B must contain exactly six numbers.
  • When ALL is specified, the length of the list that follows ALL must be equal to the total number of parameters (including the redundant parameters) in the model. For a binary dependent variable, the contrast coefficients for the one set of parameters must be listed following the ALL keyword. For a multinomial dependent variable with K levels, the contrast coefficients for the K−1 sets of parameters must be listed in order following the ALL keyword. That is, first list all parameters (including the redundant parameters) for the first logit, then list all parameters for the second logit, and so forth.
  • In general, for a multinomial dependent variable with K levels, each contrast and its associated hypothesized value are generated separately for each of the K−1 logits; that is, any given contrast is generated K−1 times. However, if the LMATRIX ALL keyword is used to define a contrast, then that contrast and its associated hypothesized value are generated once, simultaneously covering all logits.
  • Effects that are in the model but not specified on the LMATRIX keyword are assumed to have entries of 0 in the corresponding columns of the L matrix.
  • When an L matrix is defined, a number can be specified as a fraction with a positive denominator. For example, 1/3 and –1/3 are valid, but 1/–3 is invalid.
  • A semicolon (;) indicates the end of a row in the L matrix.
  • The format for the KMATRIX keyword is one or more real numbers. If more than one number is specified, then separate adjacent numbers using a semicolon (;). Each semicolon indicates the end of a row in the K matrix. Each number is the hypothesized value for a contrast, which is defined by a row in the L matrix.
  • For the KMATRIX keyword to be valid, either the LMATRIX keyword, or INCLUDE = YES on the INTERCEPT subcommand, must be specified.