[R] CI for nlme predictions
gunter.berton at gene.com
Fri Jul 11 23:35:46 CEST 2014
Full Disclosure: I am not an expert on this and this requires an
But my understanding is that inference in mixed effect models is an
entirely nontrivial matter -- i.e. exactly what you want must be
clearly defined (what variance components to include) and the
distributions of the statistics are complex, with various
approximations available depending on the assumptions one is willing
The simple situation for linear models with closed form expressions
and pivots is wholly different in nonlinear models (which even linear
mixed effects models are). Profile likelihoods and bootstrapping may
be more appropriate here, but you've got to know what you're doing. If
you do not, I suggest you get local help.
Genentech Nonclinical Biostatistics
"Data is not information. Information is not knowledge. And knowledge
is certainly not wisdom."
On Fri, Jul 11, 2014 at 11:43 AM, Robert Lynch <robert.b.lynch at gmail.com> wrote:
> I am running a mixed effects model with random intercepts
> fit.courseCross <- lme(fixed= zGrade ~ Rep + ISE
> +P7APrior+Female+White+HSGPA+MATH+Years+Course+Course*P7APrior ,
> random= ~1|SID,
> data = Master.complete[Master.complete$Course != "P7A",])
> where all variables are factors except for HSGPA, MATH and Years
> I noticed that predict.lm has an option for standard error, but
> predict.nlme does not. I understand that this might be because there is a
> difference between SE's that conditioned or not on random effects.
> I have looked at this stack overflow question
> (extract-prediction-band-from-lme-fit) but do not understand what is being
> And would like to show the predicted fit of zGrade vs Years with a
> confidence interval.
> a-la ggplot's geom_smooth. The particular intercept does not mater ( I
> don't care what the intercept is, though given a choice I'd prefer grand
> mean centered) I would be happy with either conditional on unconditional
> [[alternative HTML version deleted]]
> R-help at r-project.org mailing list
> PLEASE do read the posting guide http://www.R-project.org/posting-guide.html
> and provide commented, minimal, self-contained, reproducible code.
More information about the R-help