[R-sig-ME] Science Fair data

Christopher David Desjardins desja004 at umn.edu
Mon Jan 25 21:46:23 CET 2010


I think ....

On 01/25/2010 02:29 PM, Doug Adams wrote:
> Hi everyone,
>
> I had posted a question on the R Help forum previously about my syntax
> of what I was trying to do with this dataset...  But now I'd like to
> get an opinion if I'm thinking about it correctly after all.  I've got
> data for a science fair, and here's what I have for each student:
>
> School District
> School
> Teacher
> Division (Elementary, Junior, High)
> Student, and several scores for each student project
>
> My committee&  I decided there aren't enough teachers within each
> school to warrant using Teacher as a level in a hierarchical model, so
> we decided to go with just 'School' and 'Average Student Project' as
> the two levels in the model.  The problem is that sometimes there is
> only 1 student from a given school, although it doesn't happen too
> often.  Is HLM theory robust enough that that will still give pretty
> reliable results?
>
> Does this all sound correct so far?   :-)   And another question: if I
> were to include District as a third level, would this look right?
>
> lmer(score ~ division + (1|school|district), data=Age6m)
>    
you want ...

lmer(score ~ division + (1|district/school), data=Age6m)

and not

lmer(score ~ division + (1|school|district), data=Age6m)


You want school nested within district correct? The first line specifies 
that. Or maybe you really wanted ...

lmer(score ~ division + (1|school + district), data=Age6m)


HTH,
Chris


> Thanks for reading my novel  :)
>
> Doug Adams
>
> _______________________________________________
> R-sig-mixed-models at r-project.org mailing list
> https://stat.ethz.ch/mailman/listinfo/r-sig-mixed-models
>




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