arunkumar1111 <akpbond007 <at> gmail.com> writes: > I'm getting the intercepts of the Random effects as 0. Please help me to > understand why this is coming Zero > > This is my R code > > Data<- read.csv("C:/FE and RE.csv") > Formula="Y~X2+X3+X4 + (1|State) + (0+X5|State)" > fit=lmer(formula=Formula,data=Data) > ranef(fit). >
This question is more suited for the r-sig-mixed-models mailing list ... You are getting an estimate of zero variance because lmer is computing that as the best estimate. The reason is that it's really completely impractical to try to estimate the variance among levels of a factor with only two levels. There is more discussion of this issue at http://glmm.wikidot.com/faq#fixed_vs_random Thanks for including your data so we could see the problem. ______________________________________________ R-help@r-project.org mailing list https://stat.ethz.ch/mailman/listinfo/r-help PLEASE do read the posting guide http://www.R-project.org/posting-guide.html and provide commented, minimal, self-contained, reproducible code.