![]() Chapter Contents |
![]() Previous |
![]() Next |
The MIXED Procedure |
The SAS System now features a new Output Delivery System (ODS), replacing the old one used by PROC MIXED in Version 6. The primary changes involve the replacing of the MAKE statement and the _print_ and _disk_ global variables with the new ODS statement. The following table lists some typical conversions you need to make.
Table 41.6: ODS Conversions for PROC MIXEDVersion 6 Syntax | Versions 7 and 8 Syntax |
make 'covparms' out=cp; | ods output covparms=cp; |
make 'covparms' out=cp noprint; | ods listing exclude covparms; ods output covparms=cp; |
%global _print_; %let _print_=off; | ods listing close; |
%global _print_; %let _print_=on; | ods listing; |
Each table created by PROC MIXED has a name associated with it, and you must use this name to reference the table when using ODS statements. These names are listed in Table 41.7.
Table 41.7: ODS Tables Produced in PROC MIXEDTable Name | Description | Required Statement / Option |
AccRates | acceptance rates for posterior sampling | PRIOR |
AsyCorr | asymptotic correlation matrix of covariance parameters | PROC MIXED ASYCORR |
AsyCov | asymptotic covariance matrix of covariance parameters | PROC MIXED ASYCOV |
Base | base densities used for posterior sampling | PRIOR |
Bound | computed bound for posterior rejection sampling | PRIOR |
CholG | Cholesky root of the estimated G matrix | RANDOM / GC |
CholR | Cholesky root of blocks of the estimated R matrix | REPEATED / RC |
CholV | Cholesky root of blocks of the estimated V matrix | RANDOM / VC |
ClassLevels | level information from the CLASS statement | default output |
Coef | L matrix coefficients | E option on MODEL, CONTRAST, ESTIMATE, or LSMEANS |
Contrasts | results from the CONTRAST statements | CONTRAST |
ConvergenceStatus | convergence status | default |
CorrB | approximate correlation matrix of fixed-effects parameter estimates | MODEL / CORRB |
CovB | approximate covariance matrix of fixed-effects parameter estimates | MODEL / COVB |
CovParms | estimated covariance parameters | default output |
Diffs | differences of LS-means | LSMEANS / DIFF (or PDIFF) |
Dimensions | dimensions of the model | default output |
Estimates | results from ESTIMATE statements | ESTIMATE |
FitStatistics | fit statistics | default |
G | estimated G matrix | RANDOM / G |
GCorr | correlation matrix from the estimated G matrix | RANDOM / GCORR |
HLM1 | Type 1 Hotelling-Lawley-McKeon tests of fixed effects | MODEL / HTYPE=1 and REPEATED / HLM TYPE=UN |
HLM2 | Type 2 Hotelling-Lawley-McKeon tests of fixed effects | MODEL / HTYPE=2 and REPEATED / HLM TYPE=UN |
HLM3 | Type 3 Hotelling-Lawley-McKeon tests of fixed effects | REPEATED / HLM TYPE=UN |
HLPS1 | Type 1 Hotelling-Lawley-Pillai- Samson tests of fixed effects | MODEL / HTYPE=1 and REPEATED / HLPS TYPE=UN |
HLPS2 | Type 2 Hotelling-Lawley-Pillai- Samson tests of fixed effects | MODEL / HTYPE=1 and REPEATED / HLPS TYPE=UN |
HLPS3 | Type 3 Hotelling-Lawley-Pillai- Samson tests of fixed effects | REPEATED / HLPS TYPE=UN |
InfoCrit | information criteria | PROC MIXED IC |
InvCholG | inverse Cholesky root of the estimated G matrix | RANDOM / GCI |
InvCholR | inverse Cholesky root of blocks of the estimated R matrix | REPEATED / RCI |
InvCholV | inverse Cholesky root of blocks of the estimated V matrix | RANDOM / VCI |
InvCovB | inverse of approximate covariance matrix of fixed-effects parameter estimates | MODEL / COVBI |
InvG | inverse of the estimated G matrix | RANDOM / GI |
InvR | inverse of blocks of the estimated R matrix | REPEATED / RI |
InvV | inverse of blocks of the estimated V matrix | RANDOM / VI |
IterHistory | iteration history | default output |
LRT | likelihood ratio test | default output |
LSMeans | LS-means | LSMEANS |
MMEq | mixed model equations | PROC MIXED MMEQ |
MMEqSol | mixed model equations solution | PROC MIXED MMEQSOL |
ModelInfo | model information | default output |
ParmSearch | parameter search values | PARMS |
Posterior | posterior sampling information | PRIOR |
R | blocks of the estimated R matrix | REPEATED / R |
RCorr | correlation matrix from a blocks of the estimated R matrix | REPEATED / RCORR |
Search | posterior density search table | PRIOR / PSEARCH |
Slices | tests of LS-means slices | LSMEANS / SLICE= |
SolutionF | fixed effects solution vector | MODEL / S |
SolutionR | random effects solution vector | RANDOM / S |
Tests1 | Type 1 tests of fixed effects | MODEL / HTYPE=1 |
Tests2 | Type 2 tests of fixed effects | MODEL / HTYPE=2 |
Tests3 | Type 3 tests of fixed effects | default output |
Type1 | Type 1 analysis of variance | PROC MIXED METHOD=TYPE1 |
Type2 | Type 2 analysis of variance | PROC MIXED METHOD=TYPE2 |
Type3 | Type 3 analysis of variance | PROC MIXED METHOD=TYPE3 |
Trans | transformation of covariance parameters | PRIOR / PTRANS |
V | blocks of the estimated V matrix | RANDOM / V |
VCorr | correlation matrix from blocks of the estimated V matrix | RANDOM / VCORR |
In Table 41.7, "Coefficients" refers to multiple tables produced by the E, E1, E2, or E3 options in the MODEL statement and the E option in the CONTRAST, ESTIMATE, and LSMEANS statements. You can create one large data set of these tables with a statement similar to
ods output Coefficients=c;
Be aware that the number of variables in this data set is determined by the first table created. To create separate data sets, use
ods output Coefficients(match_all)=c;
Here the resulting data sets are named C1, C2, C3, etc. The same principles apply to data sets created from the "R," "CholR," "InvCholR," "RCorr," "InvR," "V," "CholV," "InvCholV," "VCorr," and "InvV" tables.
In Table 41.7, the following changes have occured from Version 6. The "Predicted," "PredMeans," and "Sample" tables from Version 6 no longer exist and have been replaced by output data sets; see descriptions of the MODEL statement options OUTPRED= and OUTPREDM= and the PRIOR statement option OUT= for more details. The "ML" and "REML" tables from Version 6 have been replaced by the "IterHistory" table. The "Tests," "HLM," and "HLPS" tables from Version 6 have been renamed "Tests3," "HLM3," and "HLPS3."
Table 41.8 lists the variable names associated with the data sets created when you use the ODS OUTPUT option in conjunction with the preceding tables. In Table 41.8, n is used to denote a generic number that is dependent upon the particular data set and model you select, and it can assume a different value each time it is used (even within the same table). The phrase model specific appears in rows of the affected tables to indicate that columns in these tables depend upon the variables you specify in the model.
Caution: There exists a danger of name collisions with the variables in the model specific tables in Table 41.8 and variables in your input data set. You should avoid using input variables with the same names as the variables in these tables.
Table 41.8: Variable Names for the ODS Tables Produced in PROC MIXEDTable Name | Variables |
AsyCorr | Row, CovParm, CovP1 -CovPn |
AsyCov | Row, CovParm, CovP1 -CovPn |
BaseDen | Type, Parm1 -Parmn |
Bound | Technique, Converge, Iterations, Evaluations, LogBound, CovP1 -CovPn, TCovP1 -TCovPn |
CholG | model specific, Effect, Subject, Sub1 -Subn, Group, Group1 -Groupn, Row, Col1 -Coln |
CholR | Index, Row, Col1 -Coln |
CholV | Index, Row, Col1 -Coln |
ClassLevels | Class, Levels, Values |
Coefficients | model specific, LMatrix, Effect, Subject, Sub1 -Subn, Group, Group1 -Groupn, Row1 -Rown |
Contrasts | Label, NumDF, DenDF, ChiSquare, FValue, ProbChiSq, ProbF |
CorrB | model specific, Effect, Row, Col1 -Coln |
CovB | model specific, Effect, Row, Col1 -Coln |
CovParms | CovParm, Subject, Group, Estimate, StandardError, ZValue, ProbZ, Alpha, Lower, Upper |
Diffs | model specific, Effect, Margins, ByLevel, AT variables, Diff, StandardError, DF, tValue, Tails, Probt, Adjustment, Adjp, Alpha, Lower, Upper, AdjLow, AdjUpp |
Dimensions | Descr, Value |
Estimates | Label, Estimate, StandardError, DF, tValue, Tails, Probt, Alpha, Lower, Upper |
FitStatistics | Descr, Value |
G | model specific, Effect, Subject, Sub1 -Subn, Group, Group1 -Groupn, Row, Col1 -Coln |
GCorr | model specific, Effect, Subject, Sub1 -Subn, Group, Group1 -Groupn, Row, Col1 -Coln |
HLM1 | Effect, NumDF, DenDF, FValue, ProbF |
HLM2 | Effect, NumDF, DenDF, FValue, ProbF |
HLM3 | Effect, NumDF, DenDF, FValue, ProbF |
HLPS1 | Effect, NumDF, DenDF, FValue, ProbF |
HLPS2 | Effect, NumDF, DenDF, FValue, ProbF |
HLPS3 | Effect, NumDF, DenDF, FValue, ProbF |
InfoCrit | Better, CovParms, MeanParms, Likelihood, AIC, HQIC, BIC, CAIC |
InvCholG | model specific, Effect, Subject, Sub1 -Subn, Group, Group1 -Groupn, Row, Col1 -Coln |
InvCholR | Index, Row, Col1 -Coln |
InvCholV | Index, Row, Col1 -Coln |
InvCovB | model specific, Effect, Row, Col1 -Coln |
InvG | model specific, Effect, Subject, Sub1 -Subn, Group, Group1 -Groupn, Row, Col1 -Coln |
InvR | Index, Row, Col1 -Coln |
InvV | Index, Row, Col1 -Coln |
IterHistory | CovP1 -CovPn, Iteration, Evaluations, M2ResLogLike, M2LogLike, Criterion |
LRT | DF, ChiSquare, ProbChiSq |
LSMeans | model specific, Effect, Margins, ByLevel, AT variables, Estimate, StandardError, DF, tValue, Probt, Alpha, Lower, Upper, Cov1 -Covn, Corr1 -Corrn |
MMEq | model specific, Effect, Subject, Sub1 -Subn, Group, Group1 -Groupn, Row, Col1 -Coln |
MMEqSol | model specific, Effect, Subject, Sub1 -Subn, Group, Group1 -Groupn, Row, Col1 -Coln |
ModelInfo | Descr, Value |
ParmSearch | CovP1 -CovPn, Var, ResLogLike, M2ResLogLike2, LogLike, M2LogLike, LogDetH |
Posterior | Descr, Value |
R | Index, Row, Col1 -Coln |
RCorr | Index, Row, Col1 -Coln |
Search | Parm, TCovP1 -TCovPn, Posterior |
Slices | model specific, Effect, Margins, ByLevel, AT variables, NumDF, DenDF, FValue, ProbF |
SolutionF | model specific, Effect, Estimate, StandardError, DF, tValue, Probt, Alpha, Lower, Upper |
SolutionR | model specific, Effect, Subject, Sub1 -Subn, Group, Group1 -Groupn, Estimate, StdErrPred, DF, tValue, Probt, Alpha, Lower, Upper |
Tests1 | Effect, NumDF, DenDF, ChiSquare, FValue, ProbChiSq, ProbF |
Tests2 | Effect, NumDF, DenDF, ChiSquare, FValue, ProbChiSq, ProbF |
Tests3 | Effect, NumDF, DenDF, ChiSquare, FValue, ProbChiSq, ProbF |
Type1 | Source, DF, SS, MS, EMS, ErrorTerm, ErrorDF, FValue, ProbF |
Type2 | Source, DF, SS, MS, EMS, ErrorTerm, ErrorDF, FValue, ProbF |
Type3 | Source, DF, SS, MS, EMS, ErrorTerm, ErrorDF, FValue, ProbF |
Trans | Prior, TCovP, CovP1 -CovPn |
V | Index, Row, Col1 -Coln |
VCorr | Index, Row, Col1 -Coln |
Some of the variables listed in Table 41.8 are created only when you have specified certain options in the relevant PROC MIXED statements.
The following changes have occurred in these variables from Version 6. Nearly all underscores have been removed from variable names in order to be compatible and consistent with other procedures. Some of the variable names have been changed (for example, T has been changed to tValue and PT to Probt) for the same reason. You may have to modify some of your Version 6 code to accommodate these changes.
![]() Chapter Contents |
![]() Previous |
![]() Next |
![]() Top |
Copyright © 1999 by SAS Institute Inc., Cary, NC, USA. All rights reserved.