Description Usage Arguments Value Examples
Simulates data from an observational study according to the following model: 1 + 2*X2 + 4*X4 + beta1*trt*subgrp + beta2*(1-trt)*(1-subgrp) + N(0,1) where subgrp is the group of interacting variable(s). If depth=1, then subgrp=(X1 < 0.5) If depth!=1 then subgrp=(X1>0.3 & X3>0.1)
1 |
n |
size of the dataset to be generate. Required input. |
depth |
gives the number of interacting covariates. If set to 1, then then covariate X1 interacts with treatment. If set to another value, then covariates X1 and X3 both interact with treatment effect (one-way interactions). Required input. |
beta1 |
controls the strength of the treatment effect. Required input. |
beta2 |
controls the strength of the noise. Required input. |
dataframe containing y (outcome), X1-X4 (covariates), trt (treatment), prtx (probability of being in treatment group)
1 2 3 |
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.