The LMIXED Procedure

Syntax: LMIXED Procedure

The following statements are available in the LMIXED procedure:

  • PROC LMIXED <options>;

  • BLUP OUT=CAS-libref.data-table <options>;

  • BY variables;

  • CLASS variable <(options )>ellipsis <variable <(options)>> </ global-options>;

  • CONTRAST ’label’ contrast-specification <, contrast-specification> <, ellipsis > </ options>;

  • DISPLAY <table-list> </ options>;

  • DISPLAYOUT table-spec-list </ options>;

  • EFFECT name=effect-type (variables </ options>);

  • ESTIMATE ’label’ contrast-specification <(divisor=n)><, ’label’ contrast-specification <(divisor=n)>> <, …> </ options>;

  • FREQ variable;

  • LSMEANS fixed-effects </ options>;

  • MODEL dependent = <fixed-effects> </ options>;

  • OPTIMIZATION <options>;

  • OUTPUT OUT=CAS-libref.data-table<COPYVARS=(variables)><keyword <=name>>…<keyword <=name>>;

  • PARMS <(value-list) …> </ options>;

  • RANDOM random-effects </options>;

  • REPEATED repeated-effect </options>;

  • STORE <OUT=>CAS-libref.data-table;

  • WEIGHT variable;

Items within angle brackets ( < > ) are optional.

The PROC LMIXED and MODEL statements are required, and the MODEL statement must appear after the CLASS statement if a CLASS statement is included. The RANDOM statement must follow the MODEL statement. The CLASS, EFFECT, and RANDOM statements can appear multiple times. Other statements can appear only once.

The BLUP, BY, MODEL, OPTIMIZATION, OUTPUT, PARMS, RANDOM, REPEATED, and WEIGHT statements are described in full in alphabetical order after the PROC LMIXED statement. The CLASS and EFFECT statements are described by summarizing their functionality and syntax; for more information about these statements, see Chapter 2, Shared Concepts.

Table 1 summarizes the basic functions and important options and statements that are supported by the LMIXED procedure.

Table 1: Summary of PROC LMIXED Statements

Statement Description Important Options
PROC LMIXED Invokes the procedure The DATA= option specifies the input data table; the METHOD= option specifies the estimation method.
BLUP Creates a data table that contains the estimation of fixed and random effects The OUT= option specifies the output data table; the SOLVER= option specifies the mixed model equations solver.
CLASS Declares qualitative variables that create indicator variables in bold upper X and bold upper Z matrices None
CONTRAST Constructs custom linear hypothesis tests The E option displays the bold upper L matrix coefficients.
ESTIMATE Constructs custom linear estimates The CL option produces confidence limits.
LSMEANS Computes least squares means for classification fixed effects DIFF computes differences of the least squares means; CL produces confidence limits; SLICE= tests simple effects.
MODEL Specifies the dependent variable and the fixed effects, setting up bold upper X The S option requests a solution for fixed-effects parameters.
OPTIMIZATION Controls aspects of the nonlinear optimizations The TECHNIQUE= option specifies the optimization technique.
OUTPUT Creates a data table that contains observationwise statistics The ALLSTATS option requests that all statistics be computed.
PARMS Specifies a grid of initial values for the covariance parameters The HOLD= and NOITER options hold the covariance parameters or their ratios constant; the PARMSDATA= option reads the initial values from a data table.
RANDOM Specifies random effects, setting up bold upper Z and bold upper G The SUBJECT= option creates block-diagonality; the TYPE= option specifies the covariance structure; the S option requests a solution for the random effects.
REPEATED Specifies bold upper R The SUBJECT= option creates block-diagonality; the TYPE= option specifies covariance structure; the R= option displays estimated blocks of bold upper R ; the GROUP= option enables between-subject heterogeneity.


Last updated: April 08, 2021