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 splitted 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 splitted for analysis.

Value

modified study data frame

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 July 26, 2023, 6:10 p.m.