trimByPsToEquipoise: Keep only persons in clinical equipoise

Description Usage Arguments Details Value References Examples

View source: R/PsFunctions.R

Description

Use the preference score to trim subjects that are not in clinical equipoise

Usage

1
trimByPsToEquipoise(population, bounds = c(0.3, 0.7))

Arguments

population

A data frame with at least the three columns described below.

bounds

The upper and lower bound on the preference score for keeping persons.

Details

The data frame should have the following three columns:

Value

Returns a tibble with the same three columns as the input.

References

Walker AM, Patrick AR, Lauer MS, Hornbrook MC, Marin MG, Platt R, Roger VL, Stang P, and Schneeweiss S. (2013) A tool for assessing the feasibility of comparative effectiveness research, Comparative Effective Research, 3, 11-20

Examples

1
2
3
4
5
rowId <- 1:2000
treatment <- rep(0:1, each = 1000)
propensityScore <- c(runif(1000, min = 0, max = 1), runif(1000, min = 0, max = 1))
data <- data.frame(rowId = rowId, treatment = treatment, propensityScore = propensityScore)
result <- trimByPsToEquipoise(data)

escott12/CohortMethod documentation built on Dec. 20, 2021, 6:37 a.m.