Ivan Krylov
2024-May-06 14:24 UTC
[R] Using intervals() function for nlme model - Statistics Lab ETHZ
Dear Tatiana, Marvin & Paul, If you don't get a better answer here, try r-sig-mixed-models at r-project.org. On Fri, 3 May 2024 11:29:19 +0000 "Bielakova Tatiana" <tbielakova at 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
Bielakova Tatiana
2024-May-08 10:36 UTC
[R] Using intervals() function for nlme model - Statistics Lab ETHZ
Dear Ivan, thanks for the insights! This points us directly in the direction we need. Have a lovely day! Yours sincerely, Tatiana, Marvin & Paul from Statistics Lab ________________________________ From: Ivan Krylov <ikrylov at disroot.org> Sent: Monday, May 6, 2024 4:24 PM To: Bielakova Tatiana Cc: R-help at r-project.org; Stephan Paul Andreas Kurt; Lob Marvin Subject: Re: [R] Using intervals() function for nlme model - Statistics Lab ETHZ Dear Tatiana, Marvin & Paul, If you don't get a better answer here, try r-sig-mixed-models at r-project.org. On Fri, 3 May 2024 11:29:19 +0000 "Bielakova Tatiana" <tbielakova at 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 [[alternative HTML version deleted]]