Chapter Contents
Chapter Contents
Previous
Previous
Next
Next
The MIXED Procedure

Syntax

The following statements are available in PROC MIXED.

PROC MIXED < options > ;
BY variables ;
CLASS variables ;
ID variables ;
MODEL dependent = < fixed-effects > < / options > ;
RANDOM random-effects < / options > ;
REPEATED < repeated-effect > < / options > ;
PARMS (value-list) ... < / options > ;
PRIOR < distribution > < / options > ;
CONTRAST 'label' < fixed-effect values ... >
                                   < | random-effect values ... > , ... < / options > ;
ESTIMATE 'label' < fixed-effect values ... >
                                   < | random-effect values ... >< / options > ;
LSMEANS fixed-effects < / options > ;
MAKE 'table' OUT=SAS-data-set ;
WEIGHT variable ;

Items within angle brackets ( < > ) are optional. The CONTRAST, ESTIMATE, LSMEANS, MAKE, and RANDOM statements can appear multiple times; all other statements can appear only once.

The PROC MIXED and MODEL statements are required, and the MODEL statement must appear after the CLASS statement if a CLASS statement is included. The CONTRAST, ESTIMATE, LSMEANS, RANDOM, and REPEATED statements must follow the MODEL statement. The CONTRAST and ESTIMATE statements must also follow any RANDOM statements.

Table 41.1 summarizes the basic functions and important options of each PROC MIXED statement. The syntax of each statement in Table 41.1 is described in the following sections in alphabetical order after the description of the PROC MIXED statement.

Table 41.1: Summary of PROC MIXED Statements
Statement Description Important Options
PROC MIXEDinvokes the procedureDATA= specifies input data set, METHOD= specifies estimation method
BYperforms multiple PROC MIXED analyses in one invocationnone
CLASSdeclares qualitative variables that create indicator variables in design matricesnone
IDlists additional variables to be included in predicted values tablesnone
MODELspecifies dependent variable and fixed effects, setting up XS requests solution for fixed-effects parameters, DDFM= specifies denominator degrees of freedom method, OUTP= outputs predicted values to a data set
RANDOMspecifies random effects, setting up Z and GSUBJECT= creates block-diagonality, TYPE= specifies covariance structure, S requests solution for random-effects parameters, G displays estimated G
REPEATEDsets up RSUBJECT= creates block-diagonality, TYPE= specifies covariance structure, R displays estimated blocks of R, GROUP= enables between-subject heterogeneity, LOCAL adds a diagonal matrix to R
PARMSspecifies a grid of initial values for the covariance parametersHOLD= and NOITER hold the covariance parameters or their ratios constant, PDATA= reads the initial values from a SAS data set
PRIORperforms a sampling-based Bayesian analysis for variance component modelsNSAMPLE= specifies the sample size, SEED= specifies the starting seed
CONTRASTconstructs custom hypothesis testsE displays the L matrix coefficients
ESTIMATEconstructs custom scalar estimatesCL produces confidence limits
LSMEANScomputes least squares means for classification fixed effectsDIFF computes differences of the least squares means, ADJUST= performs multiple comparisons adjustments, AT changes covariates, OM changes weighting, CL produces confidence limits, SLICE= tests simple effects
MAKEconverts any displayed table into a SAS data setnone. Has been superceded by the Output Delivery System (ODS)
WEIGHTspecifies a variable by which to weight Rnone

PROC MIXED Statement

BY Statement

CLASS Statement

CONTRAST Statement

ESTIMATE Statement

ID Statement

LSMEANS Statement

MAKE Statement

MODEL Statement

PARMS Statement

PRIOR Statement

RANDOM Statement

REPEATED Statement

WEIGHT Statement

Chapter Contents
Chapter Contents
Previous
Previous
Next
Next
Top
Top

Copyright © 1999 by SAS Institute Inc., Cary, NC, USA. All rights reserved.