The LMIXED Procedure

PROC LMIXED Statement

  • PROC LMIXED <options>;

The PROC LMIXED statement invokes the procedure. Table 2 summarizes important options in the PROC LMIXED statement by function. These and other options in the PROC LMIXED statement are then described fully in alphabetical order.

Table 2: PROC LMIXED Statement Options

Option Description
Basic Options
DATA= Specifies the input data table
METHOD= Specifies the estimation method
NTHREADS= Specifies the maximum number of concurrently scheduled threads to use
TIMING Displays the "Timing" table
Options Related to Output
ITDETAILS Displays estimates and gradients added to the "Iteration History" table
MAXCLPRINT= Specifies the maximum number of levels of CLASS variables to print
MMEQ Displays the mixed model equations
NOCLPRINT Suppresses the "Class Level Information" table completely or in part
RANKS Displays the rank of the design matrix bold upper X
SIMPLE Displays the "Descriptive Statistics" table
Singularity Tolerances
SINGCHOL= Specifies the singularity criterion for Cholesky decomposition
SINGRES= Specifies the singularity criterion for the residual variance
SINGULAR= Specifies the general singularity criterion
Design Matrix Method
DMMETHOD= Specifies the computing method (sparse or dense)


You can specify the following options in the PROC LMIXED statement.

DATA=CAS-libref.data-table

names the input data table for PROC LMIXED to use. The default is the most recently created data table. CAS-libref.data-table is a two-level name, where

CAS-libref

refers to a collection of information that is defined in the LIBNAME statement and includes the caslib, which includes a path to the data, and a session identifier, which defaults to the active session but which can be explicitly defined in the LIBNAME statement. For more information about CAS-libref, see the section Using CAS Sessions and CAS Engine Librefs.

data-table

specifies the name of the input data table.

DMMETHOD=DENSE | SPARSE
DMM=DENSE | SPARSE

specifies the method for computing the likelihood, gradient, and Hessian. For more information, see the section Common Subject Effect. Also see Table 11 for information about the covariance types that are supported by these two computing methods.

This method can significantly impact both the run-time and the memory efficiency of the LMIXED procedure.

DENSE

is more suitable for models that have a large number of levels for a common subject effect and a relatively small number of levels for fixed-effects.

SPARSE

is more memory-efficient and faster for models that have a large and sparse design matrix. However, this only works with METHOD=REML.

For more information about these two different methods, see the section Computing Methodologies for REML in the Mixed Model.

If you omit this option, the default is set according to the following rules:

  • In fixed-effects models without CLASS variables, DMMETHOD=DENSE by default.

  • In fixed-effects models with CLASS variables, DMMETHOD=SPARSE by default.

  • In random-effects models without a common subject effect, DMMETHOD=SPARSE by default.

  • In random-effects models with a common subject effect, DMMETHOD=DENSE by default.

  • In models with a REPEATED statement, DMMETHOD=SPARSE by default.

  • In all other situations, DMMETHOD=SPARSE.

ITDETAILS

displays the parameter values at each iteration and enables the writing of notes to the SAS log that pertain to infinite likelihood and singularities during optimization iterations.

MAXCLPRINT=number

specifies the maximum number of levels of CLASS variables to print in the ODS table "ClassLevels." MAXCLPRINT=0 enables you to print all levels of each CLASS variable. However, the option NOCLPRINT takes precedence over MAXCLPRINT. By default, MAXCLPRINT=20.

METHOD=ML | REML

specifies the estimation method for the covariance parameters.

ML

performs maximum likelihood estimation.

REML

performs residual (restricted) maximum likelihood estimation.

By default, METHOD=REML.

MMEQ

displays the coefficients of the mixed model equations, which are

where ModifyingAbove bold upper G With caret and ModifyingAbove bold upper R With caret are estimates of bold upper G and bold upper R.

For more information about these equations, see the section "Linear Mixed Models Theory".

NOCLPRINT<=number>

suppresses the display of the "Class Level Information" table if you do not specify number. If you specify number, the values of the classification variables are displayed only for variables whose number of levels is less than number. Specifying a number helps reduce the size of the "Class Level Information" table if some classification variables have a large number of levels.

NOINFO

suppresses the display of the "Model Information," "Number of Observations," and "Dimensions" tables.

NOITPRINT

suppresses the display of the "Iteration History" table.

NOPRINT

suppresses the normal display of results. This option is useful when you want only to create one or more output data tables by using the OUTPUT statement.

NOPROFILE

includes the residual variance as one of the covariance parameters in the optimization iterations. (By default, this parameter is profiled out of the optimization iterations, except when you have specified the HOLD= option in the PARMS statement.)

The NOPROFILE option is supported only when DMMETHOD=SPARSE.

NTHREADS=number

specifies the maximum number of concurrently scheduled threads for analytic computations and overrides the SAS system option THREADS or NOTHREADS. If you do not specify the NTHREADS= option, the number of threads is determined by the number of CPUs on the host on which the analytic computations run. PROC LMIXED creates one thread per CPU for the analytic computations.

By default, PROC LMIXED runs in multiple concurrent threads unless multithreading has been turned off by the NOTHREADS system option or by specifying NTHREADS=1. The largest number that you can specify is 1,024; however, the actual number of threads available depends on your system.

For more information about how PROC LMIXED uses threads, see the section Multithreading in Chapter 2, Shared Concepts.

Note: The SAS system option THREADS or NOTHREADS applies to the client machine on which the procedures that are based on CAS run. It does not apply to the compute nodes in a distributed environment.

RANKS

displays the rank of the design matrix bold upper X.

This option is supported only when DMMETHOD=SPARSE.

SIMPLE

displays the mean, standard deviation, coefficient of variation, minimum, and maximum for each variable that is not a classification variable in the input DATA= table.

SINGCHOL=number

tunes the singularity criterion in Cholesky decompositions. The default is 1E4 times the machine epsilon, which is approximately 1E–12 on most computers.

SINGRES=number

sets the tolerance for which the residual variance is considered to be zero. The default is 1E4 times the machine epsilon, which is approximately 1E–12 on most computers.

SINGULAR=number

tunes the general singularity criterion that the LMIXED procedure applies in sweeps and inversions. The default is 1 normal upper E Baseline 4 times the machine epsilon, which is approximately 1E–12 on most computers.

TIMING

displays the amount of time (in seconds) that PROC LMIXED took to perform each different task in the analysis and its percentage of the total time.

Last updated: April 08, 2021