[R] syntax for nested random factors in lme

Kathleen Côté kathleen.cote at gmail.com
Mon Feb 8 19:41:31 CET 2016


Hi,

I've been taught that if I want to nest random factor A into B in an lme
model, the syntax is as follows: lme(x~y+B,random=~1|B/A).

In the case of my data, matters seem to be complicated by the fact that B
is a categorical variable with only 2 levels. When I run the lme with the
above syntax, I obtain an NaN p value for B as a fixed factor in the
model. When
I rewrite the random factor as random=~1|A/B, I obtain a p value.

Is the correct format for a nested random factor indeed B/A in this case?
Is it incorrect to write it as A/B?

Please let me know if you would like additional information, such as
observations and output.

Kathleen

	[[alternative HTML version deleted]]



More information about the R-help mailing list