Description Usage Arguments Value Examples
View source: R/generate_data_sj.R
Generate data for compliance using the Stuart and Jo model.
1 2 3 4 5 6 7 8 9 10 11 12 13 | generate_data_sj(
n,
gamma_c = 0.5,
compliance_p = 0.5,
compliance_effect = 0.5,
alpha_c = 1,
alpha_n = 0.5,
lambda_c = 1,
lambda_n = 1,
gamma_n = 0,
sigma_c = 1,
sigma_n = 1
)
|
gamma_c |
effect of randomization among the compliers |
compliance_p |
proportion of compliance |
compliance_effect |
effect of covariate on compliance |
alpha_c |
intercept term for compliers |
alpha_n |
intercept term for never-takers |
lambda_c |
covariate effect among compliers |
lambda_n |
covariate effect among never-takers |
gamma_n |
effect of randomization among never-takers |
sigma_c |
error variance among compliers |
sigma_n |
error variance among never-takers |
data.frame including id
, covariate x
, randomization indicator z
, complier indicator c
, treatment receipt indicator s
, and outcome y
.
1 | generate_data_sj(n = 100)
|
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.