Description Usage Arguments Value
View source: R/generate_data.R
Data set contains measured covariates X, unmeasured covariate U, outcome Y, treatment assignment t, and logit(propensity), mu.
covariate data ~ normal(0,1); mu = true_mu; t ~ binom(p = 1 / (1 + exp(-mu))); y ~ rho * X1 + sqrt(1-rho^2) * X2 + 0.2 * U + t + epsilon epsilon ~ normal(0, 1)
1 2 3 4 5 6 7 8 9 | generate_xSITA_data(
N = 2000,
p = 10,
true_mu = "X1/3-3 + nu * U",
rho = 0.1,
nu = 0.2,
sigma = 1,
tau = 1
)
|
N |
numeric, sample size |
p |
numeric, number of features |
true_mu |
string formula giving true propensity score linear model |
rho |
numeric between 0 and 1. 0 => prog orthogonal to prop, 1=> prog || prop |
nu |
coefficient of unmeasured confounder in propensity and prognosis |
sigma |
numeric noise to be added to y. y += sigma*rnorm(0,1) |
tau |
numeric additive treatment effect |
data.frame of covariates, y, t, and true prop (logit scale) and prog
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.