[R] CI for nlme predictions

Bert Gunter 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
expert's answer.

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
to make.

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.

Cheers,
Bert

Bert Gunter
Genentech Nonclinical Biostatistics
(650) 467-7374

"Data is not information. Information is not knowledge. And knowledge
is certainly not wisdom."
Clifford Stoll




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
> <http://stackoverflow.com/questions/14358811/extract-prediction-band-from-lme-fit>
> (extract-prediction-band-from-lme-fit) but do not understand what is being
> done.
>
> 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
> CI's.
>
> Robert
>
>         [[alternative HTML version deleted]]
>
> ______________________________________________
> R-help at 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.



More information about the R-help mailing list