PROC MIXED
Uses REML, and Newton-Rhapson, first iteration uses Fisher scoring.
Syntax
PROC MIXED (options);
CLASS ...
MODEL ...
RANDOM ...
REPEATED ...
LSMEANS...
Convergence
Check model has converged, and criterion is close to 0. If -2 Res Log Like value is very large and negative, likely that covariance matrix is singular: results will be invalid, respecify model omitting random effects. If Hessian matrix not positive definite, may have reached local maxima and will need to try grid search
Asymptotic covariance matrix of estimates
Gives rough indication of correlation between variance components. Only asymptotically normal and only accurate with large DF. Usingempirical
option gives empirical estimates instead.
MODEL
statement
MODEL dependent = fixed effects / options
Use . for interactions. Need to define non-linear terms in
DATA
statement.
Useful options:
DDFM = satterthwaite
, use Satterthwaite approximation for- calculating degrees of freedom
SOLUTION
, output fixed effects estimatesCL
, give confidence intervals for fixed effect estimates
Random
statement
Used to specify random effects/coefficients $\mathbf{\beta}$ , and form of variance matrix $\mathbf{G}$ .
RANDOM random effects / options
Useful options:
SOLUTION
: print random effects solutionG
: print $\mathbf{G}$ matrixV
: print $\mathbf{V}$ matrixGROUP = effect
: estimate separate $\mathbf{G}$ matrix for- each group
SUBJECT = blocking effect TYPE = covariance pattern
: specify- block diagonal form for $\mathbf{G}$ matrix (eg. for random coefficients
- model:
SUBJECT=patient TYPE=UN
)
REPEATED
statement
Specifies correlation structure of residual matrix $\mathbf{R}$ , used for covariance pattern models.
REPATED repeated effect / SUBJECT = blocking effect TYPE = pattern
options
Covariance types:
UN
: unrestrictedTOEP
: toeplitzAR(1)
: first-order autoregressiveCS
: compound symmetrySP (sptype)
: spatial structure based on Euclidean distance- function
Useful options:
GROUP
: estimate separate covariance pattern for each groupR = subjects
: print $\mathbf{R}$ matrix for subjectsRCORR = subjects
: print correlation matrix
REPEATED
statement is used alone, the residual DF is
incorrect for between patient comparisons of fixed effects. If compound
symmetry structure required, can fit subjects (nested in treatment) as
RANDOM
effects.
LSMEANS
statement
Calculates least squares mean estimates of specified fixed effects.
LSMEANS fixed effects / options
Useful options:
CL
: give confidence intervalsDIFF
: print difference estimatesPDIFF
: prints p-values for difference estimates