Description Usage Arguments See Also Examples
Simulates many versions of mixed data, and reports averaged proportion, mean, variance and correlation estimates across replications.
1 2 3 |
seed |
A seed value for the random number generator. Seed value will be randomly generated unless specified. |
nsim |
Number of simulation runs. |
no.rows |
Number of rows. |
no.bin |
Number of binary variables |
no.nor |
Number of normal variables |
prop.vec.bin |
Probability vector for binary variables |
mean.vec.nor |
Vector of means for normal variables |
var.nor |
Vector of variances for normal variables |
corr.vec |
Vector of elements below the diagonal of correlation matrix ordered columnwise |
corr.mat |
Specified correlation matrix |
continue.with.warning |
TRUE to proceed with the nearest positive definite Σ^*. FALSE to terminate program execution if Σ^* is not positive definite |
compute.sigma.star
, jointly.generate.binary.normal
1 2 3 |
Loading required package: mvtnorm
Loading required package: corpcor
Loading required package: psych
Loading required package: Matrix
No problems are detected for the marginal specification of binary variables!
All correlations are in feasible range!
All correlations are in feasible range!
No specification problems are detected for the correlation structure!
[1] "1" "Sun Oct 8 18:01:39 2017"
No problems are detected for the marginal specification of binary variables!
No problems are detected for the marginal specification of normal variables!
[1] "2" "Sun Oct 8 18:01:39 2017"
No problems are detected for the marginal specification of binary variables!
No problems are detected for the marginal specification of normal variables!
[1] "3" "Sun Oct 8 18:01:39 2017"
No problems are detected for the marginal specification of binary variables!
No problems are detected for the marginal specification of normal variables!
[1] "4" "Sun Oct 8 18:01:39 2017"
No problems are detected for the marginal specification of binary variables!
No problems are detected for the marginal specification of normal variables!
[1] "5" "Sun Oct 8 18:01:39 2017"
No problems are detected for the marginal specification of binary variables!
No problems are detected for the marginal specification of normal variables!
[1] "6" "Sun Oct 8 18:01:39 2017"
No problems are detected for the marginal specification of binary variables!
No problems are detected for the marginal specification of normal variables!
[1] "7" "Sun Oct 8 18:01:39 2017"
No problems are detected for the marginal specification of binary variables!
No problems are detected for the marginal specification of normal variables!
[1] "8" "Sun Oct 8 18:01:39 2017"
No problems are detected for the marginal specification of binary variables!
No problems are detected for the marginal specification of normal variables!
[1] "9" "Sun Oct 8 18:01:39 2017"
No problems are detected for the marginal specification of binary variables!
No problems are detected for the marginal specification of normal variables!
[1] "10" "Sun Oct 8 18:01:39 2017"
No problems are detected for the marginal specification of binary variables!
No problems are detected for the marginal specification of normal variables!
==============================:
Desired correlation matrix:
[,1] [,2] [,3] [,4]
[1,] 1.00 0.16 0.04 0.38
[2,] 0.16 1.00 0.14 0.47
[3,] 0.04 0.14 1.00 0.68
[4,] 0.38 0.47 0.68 1.00
Averaged correlation matrix:
[,1] [,2] [,3] [,4]
[1,] 1.0000000 0.1564190 -0.0180847 0.3640802
[2,] 0.1564190 1.0000000 0.0336575 0.3938845
[3,] -0.0180847 0.0336575 1.0000000 0.6423722
[4,] 0.3640802 0.3938845 0.6423722 1.0000000
==============================:
Desired proportion and mean parameters:
[1] 0.4 0.7 3.0 1.0
Averaged proportion and mean parameters:
[1] 0.391000 0.718000 2.997480 1.002811
==============================:
Target variance of normal variate(s):
[1] 4 2
Actual variance of normal variates(s):
[1] 4.050221 1.937046
==============================:
Seed used: 3247437
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.