Saving the coded design matrix of a model in a data set


For a specified model, there are several procedures that allow you to save the columns of the design matrix as variables in a SAS data set. PROC LOGISTIC with the OUTDESIGN= and OUTDESIGNONLY options is the most efficient for models without random effects using any coding scheme (parameterization), but PROC GLMSELECT additionally provides macro variables containing the names of all design variables created in the OUTDESIGN= data set. These macro variables are convenient for use in subsequent analyses. Use PROC GLIMMIX with the OUTDESIGN= option if the model includes random effects and you want to save the design matrix for the random effects. See also SAS Note 40631 about the OUTDESIGN= option in PROC GLIMMIX.