Proc Mixed

Specifying Fixed and Random Factors in Mixed Models

January 10th, 2022 by

One of the difficult decisions in mixed modeling is deciding which factors are fixed and which are random. And as difficult as it is, it’s also very important. Correctly specifying the fixed and random factors of the model is vital to obtain accurate analyses.

Now, you may be thinking of the fixed and random effects in the model, rather than the factors themselves, as fixed or random. If so, remember that each term in the model (factor, covariate, interaction or other multiplicative term) has an effect. We’ll come back to how the model measures the effects for fixed and random factors.

Sadly, the definitions in many texts don’t help much with decisions to specify factors as fixed or random. Textbook examples are often artificial and hard to apply to the real, messy data you’re working with.

Here’s the real kicker. The same factor can often be fixed or random, depending on the researcher’s objective. (more…)


The Repeated and Random Statements in Mixed Models for Repeated Measures

September 30th, 2011 by

“Because mixed models are more complex and more flexible than the general linear model, the potential for confusion and errors is higher.”

– Hamer & Simpson (2005)

Linear Mixed Models, as implemented in SAS’s Proc Mixed, SPSS Mixed, R’s LMER, and Stata’s xtmixed, are an extension of the general linear model.  They use more sophisticated techniques for estimation of parameters (means, variances, regression coefficients, and standard errors), and as the quotation says, are much more flexible.

Here’s one example of the flexibility of mixed models, and its resulting potential for confusion and error. (more…)