GenerateSyntheticData {RCTrep} | R Documentation |
Generating the synthetic RCT data given marginal distribution of each covariate
Description
Generating the synthetic RCT data given marginal distribution of each covariate
Usage
GenerateSyntheticData(margin_dis, N, margin, var_name, pw.cor = 0)
Arguments
margin_dis |
a character indicating the distribution of each variable, allowable options are |
N |
a numeric value specifying the sample size for the simulated data |
margin |
a list containing the marginal distribution of variables; if margin_dis="bernoulli_categorical", then margin should be list(x1=c("x1",nlevels(x1),level1, level2,...,leveln, plevel1, plevel2,...,plevel3), x2=c("x2",...)); if margin_dis="bernoulli", margin=list(p(x1=1),p(x2=1),...,p(xn=1)) |
var_name |
a vector indicating the name of variables, the order of variables should be aligned with |
pw.cor |
a vector specifying the pairwise correlations of the variables, default is 0; when margin_dis="bernoulli", then pw.cor must be specified. |
Value
a data frame with columns names x1, x2,....