util_observation_expected: Detect Expected Observations

util_observation_expectedR Documentation

Detect Expected Observations

Description

For each participant, check, if an observation was expected, given the PART_VARS from item-level metadata

Usage

util_observation_expected(
  rv,
  study_data,
  meta_data,
  label_col = LABEL,
  expected_observations = c("HIERARCHY", "ALL", "SEGMENT")
)

Arguments

rv

character the response variable, 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 TRUE or FALSE for each row of study_data, if for study_data[rv] a value is expected.


dataquieR documentation built on July 26, 2023, 6:10 p.m.