melswed <amelie.truchy <at> slu.se> writes: > > Hi, > > I am running a mixed-effect model with a nested-random effect. I am > interested in gut parasites in moose. I has three different type of > treatment that I applied to moose which are from different "families". My > response variable is gut parasites and the factors are moose families which > is nested within treatment. My data is balanced. > > To answer this question, I used the lme function like this : > model=lme(parasite~drug,random=~1|drug/family) > > But doing a summary on this model gives me warning message : > In pt(-abs(tTable[, "t-value"]), tTable[, "DF"]) : NaNs produced > > I don't understand why ?! I noticed that the p-values are not computed and > have NAs values for drug2 and drug3 (from the summary of this model) > > Moreover, in the summary, I noticed that in the random effects line I have > standard deviation for Formula: ~1 | drug and for Formula: ~1 | family %in% > drug. Does R consider drug as a random factor as well ? > > And last question, how can I know if my random factor has a significant > effect on the gut parasites ? >
This belongs on r-sig-mixed-mod...@r-project.org. Hint: it very rarely makes sense to include a categorical predictor such as drug as both a random and a fixed effect ... this model is overspecified. For computational and philosophical reasons, it seems unwise and odd (respectively) to treat drug as a random effect. I might have more to say but will say it (perhaps) if you repost on r-sig-mixed-models . ______________________________________________ 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.