util_count_expected_observations: Count Expected Observations

View source: R/util_count_expected_observations.R

util_count_expected_observationsR Documentation

Count Expected Observations

Description

Count participants, if an observation was expected, given the PART_VARS from item-level metadata

Usage

util_count_expected_observations(
  resp_vars,
  study_data,
  meta_data,
  label_col = LABEL,
  expected_observations = c("HIERARCHY", "ALL", "SEGMENT")
)

Arguments

resp_vars

character the response variables, for that a value may be expected

study_data

study_data

meta_data

meta_data

label_col

character mapping attribute colnames(study_data) vs. meta_data[label_col]

expected_observations

enum HIERARCHY | ALL | SEGMENT. How should PART_VARS be handled: - ALL: Ignore, all observations are expected - SEGMENT: if PART_VAR is 1, an observation is expected - HIERARCHY: the default, if the PART_VAR is 1 for this variable and also for all PART_VARS of PART_VARS up in the hierarchy, an observation is expected.

Value

a vector with the number of expected observations for each resp_vars.

See Also

Other missing_functions: util_all_intro_vars_for_rv(), util_filter_missing_list_table_for_rv(), util_get_code_list(), util_is_na_0_empty_or_false(), util_observation_expected(), util_remove_empty_rows(), util_replace_codes_by_NA()


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