[R-sig-ME] submitted for list review: ezBuildME()
Mike Lawrence
Mike.Lawrence at dal.ca
Mon Sep 6 02:02:38 CEST 2010
Hi folks,
Hot on the heels of my release of ez v2.0 last week, I have version
2.1 nearly ready to go. Amongst minor bug fixes, I'm toying with
adding a function to automate the process of building up a mixed
effects model for very simple designs: one random effect (participants
in an experiment) and any number of factorized fixed effects. I
imagine this being used in factorial experiments where people have a
priori interest in all main effects and interactions between the fixed
effects, so this automates the process of building and comparing all
pertinent models.
As a neophyte to mixed effects modelling, I thought I'd check with the
list that the function's operation makes sense
statistically/philosophically. The code & documentation are
downloadable here (you'll need to load the plyr and lme4 packages to
use it):
http://rfecs.me/wp-content/uploads/2010/09/ezBuildME.zip
And here's a brief description of the operation:
This function is used to compute sequential comparisons of nested
mixed effects models, testing each possible effect against a model
that contains all effects at levels of interaction lower than that
effect. For example:
- a test of a main effect of a predictor compares a model containing
the main effect of the predictor plus the random effect (specified by
\code{wid}) against a model containing simply the random effect. eg:
dv ~ v1 + (1|wid)
versus
dv ~ (1|wid)
- a test of a 2-way interaction compares a model containing the 2-way
interaction plus the main effects of all predictors plus the random
effect against a model with just the main effects and the random
effect. eg:
dv ~ v1:v2 + v1 + v2 + v3 + (1|wid)
versus
dv ~ v1 + v2 + v3 + (1|wid)
- a test of a 3-way interaction compares a model containing the 3-way
interaction plus all 2-way interactions plus all main effects plus the
random effect against a model with all 2-way effects, all main
effects, and the random effect. eg:
dv ~ v1:v2:v3 + v1:v2 + v1:v3 + v2:v3 + v1 + v2 + v3 + (1|wid)
versus
dv ~ v1:v2 + v1:v3 + v2:v3 + v1 + v2 + v3 + (1|wid)
- etc.
Thoughts?
--
Mike Lawrence
Graduate Student
Department of Psychology
Dalhousie University
Looking to arrange a meeting? Check my public calendar:
http://tr.im/mikes_public_calendar
~ Certainty is folly... I think. ~
More information about the R-sig-mixed-models
mailing list