[R] Using intervals() function for nlme model - Statistics Lab ETHZ

Ivan Krylov |kry|ov @end|ng |rom d|@root@org
Mon May 6 16:24:25 CEST 2024


Dear Tatiana, Marvin & Paul,

If you don't get a better answer here, try
r-sig-mixed-models using r-project.org.

On Fri, 3 May 2024 11:29:19 +0000
"Bielakova  Tatiana" <tbielakova using student.ethz.ch> wrote:

> Based on the documentation of nlme package, the function interval is
> supported for gls, lme, and lmList classes. Although nlme is not
> mentioned, we still receive intervals without any errors or warnings.

You're right to question this. Programming-language-level inheritance
ends up being backwards for statistical methods:
<https://notstatschat.rbind.io/2023/06/07/blank-cheque-inheritance-and-statistical-objects/>.
Linear mixed-effect models are a subset of the more general mixed-effect
models, but in R, "nlme" objects inherit from "lme", not the other way
around.

>   *   Do you have any other recommendations/ ideas on how should we
> proceed to calculate intervals in R (e.g. more suitable packages)?

Here's a vignette from the nlraa package where bootstrap is used to get
a confidence interval for an implicit parameter:
https://cran.r-project.org/package=nlraa/vignettes/Bootstrapping.html

The author seems to be using intervals() on an nlme model without any
problems. It may help to see if the intervals() output agrees with the
bootstrap results from nlraa::boot_nlme().

-- 
Best regards,
Ivan



More information about the R-help mailing list