Description Usage Arguments Value Examples
Simulates data from an RCT according to the following model: 2 + 2*sign(x1<cut2) + beta1*trt*subgrp + beta2*(1-trt)*subgrp + N(0,sigma) If depth=1, then subgrp=(x1<=cut1) If depth!=1 then subgrp=(x1>=0.3 & x3>=0.1)
1 2 |
n |
size of the dataset to be generate. Defaults to 100. |
beta1 |
controls the strength of the treatment effect. Defaults to 2. |
beta2 |
controls the strength of the noise. Defaults to 2. |
sigma |
controls standard deviation of random variation. Defaults to 1. |
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). Defaults to 1. |
cut1/cut2 |
controls where the cutpoints are to define subgroups. |
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.