Description Usage Arguments Examples
Simulates a dataset with a specified number of standard MVN covariates and outcomes with a specified correlation structure. If the function returns an error stating that the correlation matrix is not positive definite, try reducing the correlation magnitudes.
1 | make_corr_mat(nX, nY, rho.XX, rho.YY, rho.XY, prop.corr = 1)
|
nX |
Number of covariates, including the one of interest |
nY |
Number of outcomes |
rho.XX |
Correlation between all pairs of Xs |
rho.YY |
Correlation between all pairs of Ys |
rho.XY |
Correlation between pairs of X-Y that are not null (see below) |
prop.corr |
Proportion of X-Y pairs that are non-null (non-nulls will be first |
1 2 3 4 5 6 | make_corr_mat( nX = 1,
nY = 4,
rho.XX = 0,
rho.YY = 0.25,
rho.XY = 0,
prop.corr = 0.8 )
|
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.