acc_varcomp {dataquieR} | R Documentation |
Variance based models and intraclass correlations (ICC) are approaches to examine the impact of so-called process variables on the measurements. This implementation is model-based.
NB: The term ICC is frequently used to describe the agreement between
different observers, examiners or even devices. In respective settings a good
agreement is pursued. ICC-values can vary between [-1;1]
and an ICC close
to 1 is desired (Koo and Li 2016, Müller and Büttner 1994).
However, in multi-level analysis the ICC is interpreted differently. Please see Snijders et al. (Sniders and Bosker 1999). In this context the proportion of variance explained by respective group levels indicate an influence of (at least one) level of the respective group_vars. An ICC close to 0 is desired.
acc_varcomp( resp_vars = NULL, group_vars, co_vars = NULL, min_obs_in_subgroup = 30, min_subgroups = 5, label_col = NULL, threshold_value = 0.05, study_data, meta_data )
resp_vars |
variable list the names of the continuous measurement variables |
group_vars |
variable list the names of the resp. observer, device or reader variables |
co_vars |
variable list a vector of covariables, e.g. age and sex for adjustment |
min_obs_in_subgroup |
integer from=0. optional argument if a "group_var" is used. This argument specifies the minimum no. of observations that is required to include a subgroup (level) of the "group_var" in the analysis. Subgroups with less observations are excluded. The default is 30. |
min_subgroups |
integer from=0. optional argument if a "group_var" is used. This argument specifies the minimum no. of subgroups (levels) included "group_var". If the variable defined in "group_var" has less subgroups it is not used for analysis. The default is 5. |
label_col |
variable attribute the name of the column in the metadata with labels of variables |
threshold_value |
numeric from=0 to=1. a numerical value ranging from 0-1 |
study_data |
data.frame the data frame that contains the measurements |
meta_data |
data.frame the data frame that contains metadata attributes of study data |
a list with:
SummaryTable
: data frame with ICCs per rvs
ScalarValue_max_icc
: maximum variance contribution value by group_vars
ScalarValue_argmax_icc
: variable with maximum variance contribution by
group_vars
This implementation is yet restricted to data of type float.
Missing codes are removed from resp_vars (if defined in the metadata)
Deviations from limits, as defined in the metadata, are removed
A linear mixed-effects model is estimated for resp_vars using co_vars and group_vars for adjustment.
An output data frame is generated for group_vars indicating the ICC.
## Not run: # runs spuriously slow on rhub load(system.file("extdata/study_data.RData", package = "dataquieR")) load(system.file("extdata/meta_data.RData", package = "dataquieR")) co_vars <- c("SEX_0", "AGE_0") min_obs_in_subgroup <- 30 min_subgroups <- 3 label_col <- LABEL rvs <- c("DBP_0", "SBP_0") group_vars <- prep_map_labels(rvs, meta_data = meta_data, from = label_col, to = VAR_NAMES) group_vars <- prep_map_labels(group_vars, meta_data = meta_data, to = KEY_OBSERVER) group_vars <- prep_map_labels(group_vars, meta_data = meta_data) acc_varcomp( resp_vars = rvs, group_vars = group_vars, co_vars = co_vars, min_obs_in_subgroup = min_obs_in_subgroup, min_subgroups = min_subgroups, label_col = label_col, study_data = study_data, meta_data = meta_data ) ## End(Not run)