The following statements are available in PROC GLMMOD.
PROC GLMMOD < options > ;
BY variables ;
CLASS variables ;
FREQ variable ;
MODEL dependents=independents / < options > ;
WEIGHT variable ;
The PROC GLMMOD and MODEL statements are required. If classification effects are used, the class variables must be declared in a CLASS statement, and the CLASS statement must appear before the MODEL statement.
PROC GLMMOD < options > ;
The PROC GLMMOD statement invokes the GLMMOD procedure. It has the following options:
DATA = SAS-data-set
specifies the SAS data set to be used by the GLMMOD procedure. If you do not specify the DATA= option, the most recently created SAS data set is used.
NAMELEN= n
specifies the maximum length for an effect name . Effect names are listed in the table of parameter definitions and stored in the EFFNAME variable in the OUTPARM= data set. By default, n = 20 . You can specify 20 < n ‰ 200 if 20 characters are not enough to distinguish between effects, which may be the case if the model includes a high-order interaction between variables with relatively long, similar names.
NOPRINT
suppresses the normal display of results. This option is generally useful only when one or more output data sets are being produced by the GLMMOD procedure. Note that this option temporarily disables the Output Delivery System (ODS); see Chapter 14, Using the Output Delivery System, for more information.
ORDER=DATA FORMATTED FREQ INTERNAL
specifies the order in which you want the levels of the classification variables (specified in the CLASS statement) to be sorted. This ordering determines which parameters in the model correspond to each level in the data. Note that the ORDER= option applies to the levels for all classification variables. The exception is the default ORDER=FORMATTED for numeric variables for which you have supplied no explicit format. In this case, the levels are ordered by their internal (numeric) value. Note that this represents a change from previous releases for how class levels are ordered. In releases previous to Version 8, numeric class levels with no explicit format were ordered by their BEST12. formatted values, and in order to revert to the previous ordering you can specify this format explicitly for the affected classification variables. The change was implemented because the former default behavior for ORDER=FORMATTED often resulted in levels not being ordered numerically and usually required the user to intervene with an explicit format or ORDER=INTERNAL to get the more natural ordering.
The ORDER= option can take the following values.
Value of ORDER= | Levels Sorted By |
---|---|
DATA | order of appearance in the input data set |
FORMATTED | external formatted value, except for numeric variables with no explicit format, which are sorted by their unformatted (internal) value |
FREQ | descending frequency count; levels with the most observations come first in the order |
INTERNAL | unformatted value |
If you omit the ORDER= option, PROC GLMMOD orders by the external formatted value.
OUTPARM= SAS-data-set
names an output data set to contain the information regarding the association between model effects and design matrix columns .
OUTDESIGN= SAS-data-set
names an output data set to contain the columns of the design matrix.
PREFIX= name
specifies a prefix to use in naming the columns of the design matrix in the OUTDESIGN= data set. The default prefixis Col and the column name is formed by appending the column number to the prefix, so that by default the columns are named Col1 , Col2 , and so on. If you specify the ZEROBASED option, the column numbering starts at zero, so that with the default value of PREFIX= the columns of the design matrix in the OUTDESIGN= data set are named Col0 , Col1 , and so on.
ZEROBASED
specifies that the numbering for the columns of the design matrix in the OUTDESIGN= data set should begin at 0. By default it begins at 1, so that with the default value of PREFIX= the columns of the design matrix in the OUTDESIGN= data set are named Col1 , Col2 , and so on. If you use the ZEROBASED option, the column names are instead Col0 , Col1 , and so on.
BY variables ;
You can specify a BY statement with the GLMMOD procedure to obtain separate designs for observations in groups defined by the BY variables. When you specify a BY statement, the procedure expects the input DATA= data set to be sorted in the order of the BY variables.
If your input data set is not sorted in ascending order, use one of the following alternatives:
Sort the data using the SORT procedure with a similar BY statement.
Specify the BY statement option NOTSORTED or DESCENDING in the BY statement for the GLMMOD procedure. The NOTSORTED option does not mean that the data are unsorted but rather that the data are arranged in groups (according to values of the BY variables) and that these groups are not necessarily in alphabetical or increasing numeric order.
Create an index on the BY variables using the DATASETS procedure (in base SAS software).
For more information on the BY statement, refer to the discussion in SAS Language Reference: Concepts . For more information on the DATASETS procedure, refer to the discussion in the SAS Procedures Guide .
CLASS variables < option > ;
The CLASS statement names the classification variables to be used in the analysis. Typical classification variables are Treatment , Sex , Race , Group , and Replication . If you specify the CLASS statement, it must appear before the MODEL statement.
By default, class levels are determined from the entire formatted values of the CLASS variables. Note that this represents a slight change from previous releases in the way in which class levels are determined. In releases prior to Version 9, class levels were determined using no more than the first 16 characters of the formatted values. If you wish to revert to this previous behavior you can use the TRUNCATE option on the CLASS statement. In any case, you can use formats to group values into levels. Refer to the discussion of the FORMAT procedure in the SAS Procedures Guide and the discussions for the FORMAT statement and SAS formats in SAS Language Reference: Dictionary .
You can specify the following option in the CLASS statement after a slash(/):
TRUNCATE
specifies that class levels should be determined using only up to the first 16 characters of the formatted values of CLASS variables. When formatted values are longer than 16 characters, you can use this option in order to revert to the levels as determined in releases previous to Version 9.
FREQ variable ;
WEIGHT variable ;
FREQ and WEIGHT variables are transferred to the output data sets without change.
MODEL dependents=independents / < options > ;
The MODEL statement names the dependent variables and independent effects. For the syntax of effects, see the Specification of Effects section on page 1784 in Chapter 32, The GLM Procedure.
You can specify the following option in the MODEL statement after a slash (/).
NOINT
requests that the intercept parameter not be included in the model.