tidymodels / TMwR

Code and content for "Tidy Modeling with R"
https://tmwr.org
Other
587 stars 278 forks source link

Suggestion: Add a warning about multilevel data to Ch11 #288

Open jmgirard opened 2 years ago

jmgirard commented 2 years ago

I love the inclusion of Chapter 11 as comparing predictive models with inferential models is something that is not done nearly enough in my field. However, I think it would be worth noting somewhere in this chapter that, if your data are multilevel, this nesting also needs to be accounted for in the inferential model. One approach would be to use cross-classified random effects (i.e., one for resample and one for cluster/multilevel-group). Eventually, it would be amazing to have {tidyposterior} intuit this nesting from your rsample object, but even still I think it is worth mentioning explicitly in the book.

topepo commented 2 years ago

We currently handle the levels of repeated CV and can add more random effect configurations for different multilevel resampling schemes.

It would be good to add an issue to tidyposterior, especially if you have resampling examples.

jmgirard commented 2 years ago

Will do, thanks.