[R-sig-ME] lme4 package

Ben Bolker bbo|ker @end|ng |rom gm@||@com
Wed Sep 20 19:58:50 CEST 2023


    Train/test splits for longitudinal data are a little tricky, and not 
something that's dealt with explicitly in lme4.  For example, see the 
'rolling origin' sampler in the tidymodels package: 
https://rsample.tidymodels.org/reference/rolling_origin.html

   The split should also respect cluster identity (i.e., the split 
should be stratified by cluster so that all the observations from a 
cluster end up in the same fold)

   I would guess that many lme4 users rely on the assumptions of the 
model being approximately valid and use predictive performance measures 
based on that assumption ...

   Hopefully someone else on the list will have more practical advice.


On 2023-09-20 1:44 p.m., mina jahan wrote:
> Hi,
> 
> I want to use the lme4 package for prediction of a longitudinal continuous
> outcome variable. How can I split data into train and test in longitudinal
> data to compute predictive performance?
> 
> 
> Best regards,
> Mina Jahangiri
> Ph.D. student of Biostatistics
> 
> 	[[alternative HTML version deleted]]
> 
> _______________________________________________
> R-sig-mixed-models using r-project.org mailing list
> https://stat.ethz.ch/mailman/listinfo/r-sig-mixed-models

-- 
Dr. Benjamin Bolker
Professor, Mathematics & Statistics and Biology, McMaster University
Director, School of Computational Science and Engineering
(Acting) Graduate chair, Mathematics & Statistics
 > E-mail is sent at my convenience; I don't expect replies outside of 
working hours.



More information about the R-sig-mixed-models mailing list