Skip to contents

Apply hierarchy to grouped PCG data. Application accords to Art. 2 & 3 VORA-EDI

Usage

pcg_hierarchy(data_input, direction, display_all = FALSE, display_hyp = FALSE)

Arguments

data_input

A data.table of grouped PCG data with necessary variables AhvNr, Geburtsjahr, pcg.

direction

Character vector which determines the output dimensions. "wide" returns a dummy matrix output, "long" returns a long format output.

display_all

Boolean, whether to return all variables, even if no corresponding PCG entries exist. Default: FALSE.

display_hyp

Logical with default FALSE. If TRUE non-independent PCG "hyp" is treated as independent (and also still combined with DM2 to DM2hyp).

Value

A data.table containing

AhvNr

Pseudo SSN

Geburtsjahr

Year of birthday - used with AhvNr to warrant identification

pcg

Grouped PCG

Author

Magnus Vieten, Yannick Schwarz

Examples

if (FALSE) { # \dontrun{
pcg_hierarchy(
  data_input = grouped_pcg_dt,
  pcg_liste = "path/to/prepped/pcg_list.xlsx",
  direction = "wide",
  display_all = TRUE,
  display_hyp = TRUE
)
} # }