CUSTOM Subcommand (CSORDINAL 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 cumulative link model.

For a binary dependent variable, CSORDINAL models a single threshold parameter and a set of regression parameters. For a polytomous ordinal dependent variable with K levels, CSORDINAL models a threshold parameter for each category except the last and a single set of regression parameters for all response categories. The CUSTOM subcommand allows you to specify an L matrix with contrast coefficients for all thresholds and regression parameters.

  • Multiple CUSTOM subcommands are allowed. Each is treated independently.
  • An optional label may be specified using the LABEL keyword. The label is a string with a maximum length of 255 characters. Only one label can be specified.
  • The L matrix is the contrast coefficients matrix. This matrix specifies coefficients of contrasts, which can be used for studying the effects in the model. An L matrix must always be specified using the LMATRIX keyword.
  • The K matrix is the contrast results matrix. This matrix specifies the results of the linear hypothesis. A K matrix can be specified using the KMATRIX keyword.
  • The number of rows in the L and K matrices must be equal.
  • 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 coefficient values for thresholds, 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 the 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.
  • When specifying threshold coeffients in the first or the third general format, a complete list of K−1 coefficient values must be given in the increasing threshold order.
  • 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 ones) corresponding to the specified effect. For example, if the effect A*B takes up six columns in the design matrix, then 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 ones) in the model. For a binary dependent variable, the contrast coefficients for the single threshold and all regression parameters must be listed following the ALL keyword. For a polytomous dependent variable with K levels, the contrast coefficients for the K−1 thresholds and all regression parameters must be listed in order following the ALL keyword.
  • 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 defining an L matrix, 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.
  • If rows of the L matrix are not independent, a submatrix of L with independent rows is used for testing. Tested rows are indicated when the K matrix is not a zero matrix.

Example

Suppose that factors A and B each have three levels.

CSORDINAL y BY a b
  /PLAN FILE='/survey/myfile.csplan'
  /MODEL a b a*b
  /CUSTOM  LABEL = ‘Effect A'
   LMATRIX = a 1 0 -1
             a*b  1/3  1/3  1/3
                    0    0    0
                 -1/3 -1/3 -1/3;
             a 0 1 -1
             a*b    0    0    0
                  1/3  1/3  1/3
                 -1/3 -1/3 -1/3.
  • The preceding syntax specifies a test of effect A.
  • Because there are three levels in effect A, at most two independent contrasts can be formed; thus, there are two rows in the L matrix, separated by a semicolon (;).
  • There are three levels each in effects A and B; thus, the interaction effect A*B takes nine columns in the design matrix.
  • The first row in the L matrix tests the difference between levels 1 and 3 of effect A; the second row tests the difference between levels 2 and 3 of effect A.
  • The KMATRIX keyword is not specified, so the null hypothesis value for both tests is 0.

Example

Suppose that dependent variable Z and factor A each have three levels.

CSORDINAL z BY a
  /PLAN FILE='/survey/myfile.csplan'
  /MODEL a
  /CUSTOM  LABEL = ‘Effect A'
   LMATRIX = a 1 0 -1;
             a 0 1 -1
   KMATRIX = 1; 1.
  • The dependent variable Z has three categories, so there will be two thresholds.
  • The syntax specifies a model with thresholds and a main effect for factor A, and a custom hypothesis test of effect A.
  • Because the ALL option is not used on the LMATRIX keyword, threshold coefficients are set to zero. The equivalent LMATRIX keyword using the ALL option follows.
        LMATRIX = ALL 0 0  1  0 -1;
                  ALL 0 0  0  1 -1 
    
  • The KMATRIX keyword is specified and the hypothesis that the difference between levels 1 and 3 and levels 2 and 3 of effect A are both equal to 1 is tested.