mc_longer()
and mc_wider()
are helper functions to put metaconfoundr()
for long and wide data sets, respectively. results into a tidy format.
mc_detect_layout()
chooses between the two automatically based on the
number of variables in the data frame. mc_study_values()
helps standardize
evaluations of control quality.
mc_detect_layout(...)
mc_longer(
study = contains("construct"),
construct = contains("construct"),
variable = matches("variable|factor"),
control_quality = contains("control_quality"),
is_confounder = contains("confounder"),
study_values = mc_study_values()
)
mc_study_values(inadequate = 0, some_concerns = 1, adequate = 2)
mc_wider(
construct = contains("construct"),
variable = matches("variable|factor"),
is_confounder = contains("confounder"),
study = everything(),
study_values = mc_study_values()
)
Additional arguments passed to mc_wider()
or mc_longer()
The column with the name of the studies
The domain or construct column
The column that describes the confounding variables
The column that describes the confounding control quality
The column that describes if a variable is a confounder
What are the levels of control_quality
? Use
mc_study_values()
to set up.
Which value signifies inadequate control?
Which value signifies control with some concerns?
Which value signifies adequate control?
a function that tidies the data