Learn R Programming

causens (version 0.0.3)

gData_U_binary_Y_cont: Generate data with a binary unmeasured confounder and continuous outcome

Description

Generate data with a binary unmeasured confounder and continuous outcome

Usage

gData_U_binary_Y_cont(
  ymodel = "linear",
  N = 500,
  alpha_uz = 0.2,
  beta_uy = 0.5,
  treatment_effects = 1,
  seed = 123
)

Value

A data frame with the simulated dataset with U binary, Y continuous.

Arguments

ymodel

A string indicating the functional form of the outcome model.

N

The number of observations to be generated.

alpha_uz

Unmeasured confounder coefficient in the propensity score model.

beta_uy

Unmeasured confounder coefficient in the outcome model.

treatment_effects

The treatment effect.

seed

The seed for the random number generator.

Examples

Run this code
fulldata <- gData_U_binary_Y_cont(
  ymodel = "linear",
  N = 500,
  alpha_uz = 0.2,
  beta_uy = 0.5,
  treatment_effects = 1,
  seed = 123
)
table(fulldata$Z)

Run the code above in your browser using DataLab