make_sample_data function

Make sample data

Make sample data

Makes a simple data frame with treat (binary), outcome (binary), and five covariates: X1 (continuous), X2 (continuous), B1 (binary), B2 (binary), and C1 (categorical). Probability outcome = 1 is sigmoid(treat + X1). Probability treatment = 1 is sigmoid(- 0.2 * X1 + X2 - B1 + 2 * B2)

make_sample_data(n = 100)

Arguments

  • n: the size of the desired data set

Examples

# make sample data set of 30 observations dat <- make_sample_data(n = 30)
  • Maintainer: Rachael C. Aikens
  • License: GPL-3
  • Last published: 2022-03-31