[R-sig-ME] Science Fair data

Doug Adams fog0 at gmx.com
Wed Jan 27 05:10:07 CET 2010


I appreciate that, both of you (& that's ok for the mistake Christopher)   :)

So fixed factors as simply listed by themselves (no 1| notation) and
random effects are listed with appropriate nesting...  I do want to
consider schools as random effects; that will give me the information
I'd like to have about the variability (and reliability too?) of the
schools as they fit into the big picture.

When I use fixef & ranef to extract estimates for division and schools
(& maybe districts eventually too now), am I right in thinking that
the 3 numbers given for each level of division (fixef) are the
intercepts for each level -- as if there were individual OLS
regressions performed for each?  And are the random effects for the
schools (ranef) are the slopes associated with those regression lines?

Thanks again everyone   :)

Doug




>>>
>>> What's the difference between
>>> listing your factors as:
>>>
>>>
>>> lmer(score ~ division + (1|district/school), data=Age6m)
>>>
>>
>> In this model the effects of the district and the school are modeled
>> with random effects.  The model specification is equivalent to
>>
>>  lmer(score ~ division + (1|district) + (1|school:district), Age6m)
>>
>> and, if the levels of school are distinct (i.e. you don't have a
>> school 1 in both district 1 and district 2 or something like that),
>> then the specification is equivalent to
>>
>> lmer(score ~ division + (1|district) + (1|school), Age6m)
>>
>>>
>>> and
>>> lmer(score ~ division + (1|school) + district, data=Age6m)
>>>
>>
>> In this model the effect of the school is modeled by random effects
>> but the effect of the district is modeled by fixed-effects parameters.
>>
>> The choice of fixed effects or random effects depends on the structure
>> of the data and the type of inferences you wish to make.  If you have
>> data from only some of the school districts and you wish to form
>> conclusions about a generic district then random effects are
>> preferred.  If you have data from all districts and you want to reach
>> conclusions only about those specific districts then fixed effects are
>> preferred.  If you want to consider how the variability in the
>> responses splits into student-to-student variability and
>> school-to-school variability and district-to-district variability then
>> random effects are preferred.
>>




More information about the R-sig-mixed-models mailing list