AssignOutcomeBin: Assign binary outcome based on covariates and treatment

Description Usage Arguments Value Author(s)

View source: R/01.GenerateData.R

Description

A binary outcome is assigned as a Bernoulli(p_i) random variable where p_i is an individual-specific outcome probability calculated from covariate and treatment values and coefficients.

Usage

1
AssignOutcomeBin(dfXA, beta0, betaX, betaA, betaXA)

Arguments

dfXA

data frame including covariates and treatment assingment A

beta0

scalar value coeffcient for the intercept

betaX

vector specifying true coefficients for covariates

betaA

scalar value for treatment effect

betaXA

vector specifying true coefficients for covariates-treatment interaction. The vector must be the same length as betaX.

Value

data frame with additional counterfactual and observed variables related to the outcome.

Author(s)

Kazuki Yoshida


kaz-yos/distributed documentation built on May 27, 2019, 4:50 a.m.