Skip to content
Discussion options

You must be logged in to vote

performance_cv() uses the same formula for all models. For lmer() models, that would generally be a conditionals R2 estimate because it is based on simple level-1 residuals (so any random effects are included). If you supply a data frame to use for prediction and these are all from new groups, it would be a marginal R2 because no information is available in the model to estimate the random effect values for the new groups.

Note that simple k-fold or holdout cross-validation may not be appropriate for nested data depending on the target of your inference (new observations of the same groups vs new groups). If your target is new groups, then you would need to do the resampling of groups for…

Replies: 1 comment

Comment options

You must be logged in to vote
0 replies
Answer selected by GroadoSwaggins
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Category
Q&A
Labels
None yet
2 participants