
Thanks for your quick reply.
>>>>"In particular, you will only have two levels of gender, even if you<br>consider more schools or districts. &#160;Trying to estimate a variance<br>from a single contrast is difficult.">>>>
I have three questions:
1.do you mean that if there are more levels of gender (make an assumption) it is reasonable to &#160;consider gender as a random effect in my case? and if so, how many levels are enough for me to estimate a variance generally.
2.furthermore,in my study, I want to know the average performace for male and female,however there would be autocorrelation among students in same school and district,I just use the nested random effect&#160;(1/district/school) to control for&#160;autocorrelation so as to get a robust evaluation for male and female.it may be reasonable to construct model like:lmer(score~gender+(1|district/school),data);however,I am also interested in which characteristic for male and female(e.g. mean&#160;Psychological endurance for male and female) can explain the variance between male and female, is there any suggestion for my case?
3.in the case of religions(6 levels) instead of gender ,&#160;whether the specification of all the models was&#160;reasonable and correct in lmer.Can I take this as a cross random effect: &#160; &#160;lmer(score~1+(1|religions)+(1/district/school),data).


thankssincerely,lei chen


2009/3/31 chenlei <chenlei@ibcas.ac.cn>:> Dear all and dr.Bates,

> &#160; I have a dataset with&#160;students nested in schools&#160;and also schools&#160;belong
> to each district.&#160;The data was explicitly nested as previous&#160;examples.
> &#160; In my case, I don't care the variance between schools or district,and I
> just want to assess the effect of gender on stuedents'
> scores,traditionally,the model can be specified in lmer like :
> &#160; lmer(score~gender+(1|district/school),data)
> &#160;&#160;&#160;notes: the gender was a factor(male,female)

> in my study ,I&#160;want&#160;to know the variance between genders,and I also use some
> covariates at gender level to explain the variance between genders.

It doesn't make sense to me to model the effect of gender as a random
effect. &#160;I think of random effects as being associated with particular
experimental or observational units. &#160;On the other hand, the levels of
gender, male and female, are fixed. &#160;This type of factor is the
archetypal example of a factor for which you would use fixed effects.
In particular, you will only have two levels of gender, even if you
consider more schools or districts. &#160;Trying to estimate a variance
from a single contrast is difficult.

> &#160;I construct the unconditional model and conditional models like these:
> &#160; unconditional model :lmer(score~1+(1|gender)+(1/district/school),data)
> &#160; conditional model :lmer(score~1+IQ+(1|gender)+(1/district/school),data)
> &#160; the&#160;IQ indicates the mean IQ scores for different genders.

> What I want to confirm is whether the specification of all the models was
> reasonable and correct in lmer.Thanks.
> yours,
> Lei&#160;Chen 


	[[alternative HTML version deleted]]

