score_control: Add a score of confounding control

View source: R/sort_by.R

score_controlR Documentation

Add a score of confounding control

Description

score_control() adds a variable, score, that summarizes how well a study controls for a domain or construct. Used to sort heatmaps and traffic light plots.

Usage

score_control(.df, score = c("adequate", "sum", "controlled"))

Arguments

.df

A data frame, usually the result of metaconfoundr()

score

The approach used to calculate the score. adequate tests if the study controlled at a strictly adequate level. sum treats control_quality as an ordinal integer, summing it's values such that a higher score has better control overall. controlled tests if any control, including some concerns control, is present.

Value

a tibble

Examples

library(dplyr)

ipi %>%
  metaconfoundr() %>%
  filter(is_confounder == "Y") %>%
  score_control("controlled") %>%
  arrange(desc(score))


metaconfoundr documentation built on Jan. 18, 2023, 1:10 a.m.