Bielakova Tatiana
2024-May-03 11:29 UTC
[R] Using intervals() function for nlme model - Statistics Lab ETHZ
Dear members of the R-Help Team, we are reaching out to you with a question regarding using intervals()<https://www.rdocumentation.org/packages/nlme/versions/3.1-163/topics/intervals> to create inference for nlme()<https://www.rdocumentation.org/packages/nlme/versions/3.1-164/topics/nlme> function. The maintainer for the nlme package is listed as the R-Core Team and we were advised by moderators of R-Core to write to R-Help to receive help in this case. We are students of Statistics at ETH Zurich currently collaborating with ETH Crop Science lab on a project focused on soybean growth. We are modelling the growth using the nlme function and are facing the issue of creating a valid inference for the nlme model (we are especially interested in confidence intervals for the fixed effects). 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. We would be therefore very grateful if you could offer your insights on the following questions: * Is the intervals() function appropriate for nlme to create confidence intervals? * If not, what do the outputted values represent? * Do you have any other recommendations/ ideas on how should we proceed to calculate intervals in R (e.g. more suitable packages)? Your help is greatly appreciated. We are looking forward to hearing back from you! Yours sincerely, Tatiana, Marvin & Paul from Statistics Lab [[alternative HTML version deleted]]
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