get_icc: get_icc() it reurns the intra class correlation of an mlm...

View source: R/get_icc.R

get_iccR Documentation

get_icc() it reurns the intra class correlation of an mlm model

Description

get_icc() it reurns the intra class correlation of an mlm model

Usage

get_icc(x)

Arguments

mlm_model

it requires an mlm_model, generated by lme4. If this is a null, is the percentage of variance between clusters.

Details

if the mlm_model is a null model it returns the ICC. If is a mlm_model with covariates, it returns the conditional variance between clusters.

Value

a numeric object.

Examples


lme4::lmer(y ~ 1 + (1|id_j), data = clustered_data, REML = FALSE) %>%
get_icc(.)



dacarras/r4sda documentation built on Nov. 9, 2023, 10:17 a.m.