util_check_group_levels: Check data for observer levels

View source: R/util_check_group_levels.R

util_check_group_levelsR Documentation

Check data for observer levels

Description

Check data for observer levels

Usage

util_check_group_levels(
  study_data,
  group_vars,
  min_obs_in_subgroup = -Inf,
  max_obs_in_subgroup = +Inf,
  min_subgroups = -Inf,
  max_subgroups = +Inf
)

Arguments

study_data

data.frame the data frame that contains the measurements

group_vars

variable the name of the observer, device or reader variable

min_obs_in_subgroup

integer from=0. optional argument if group_vars are used. This argument specifies the minimum number of observations that is required to include a subgroup (level) of the group variable named by group_vars in the analysis. Subgroups with fewer observations are excluded.

max_obs_in_subgroup

integer from=0. optional argument if group_vars are used. This argument specifies the maximum number of observations that is required to include a subgroup (level) of the group variable named by group_vars in the analysis. Subgroups with more observations are excluded.

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 fewer subgroups it is split for analysis.

max_subgroups

integer from=0. optional argument if a "group_var" is used. This argument specifies the maximum no. of subgroups (levels) included "group_var". If the variable defined in "group_var" has more subgroups it is split for analysis.

Value

modified study data frame

See Also

prep_min_obs_level

Other data_management: util_assign_levlabs(), util_check_data_type(), util_compare_meta_with_study(), util_dichotomize(), util_merge_data_frame_list(), util_rbind(), util_remove_na_records(), util_replace_hard_limit_violations(), util_study_var2factor(), util_table_of_vct()

Examples

## Not run: 
study_data <- prep_get_data_frame("study_data")
meta_data <- prep_get_data_frame("meta_data")
prep_prepare_dataframes(.label_col = LABEL)
util_check_group_levels(ds1, "CENTER_0")
dim(util_check_group_levels(ds1, "USR_BP_0", min_obs_in_subgroup = 400))

## End(Not run)



dataquieR documentation built on May 29, 2024, 7:18 a.m.