Vector of marginal probabilities. It is usually a first component of the
list returned by find.binary.prob
ordPmat
Input matrix of ordinal marginal probabilities
Mlocation
Vector of locations where dichotomization is done. It is usually a second component of the list
returned by find.binary.prob
bin.data
Matrix of binary data generated using generate.binary
Details
As a part of the multivariate ordinal data generation, intermediate multivariate binary data are generated.
This function converts multivariate binary data generated by generate.binary to the
multivariate ordinal data.
Value
y
Matrix of multivariate ordinal data
Corr
Correlation matrix of y
Examples
## Not run: nObs = 1000; nSim = 100000
## Not run: ordPmat1 = matrix( c(0.15,0.70,0.40,
0.55,0.10,0.25,
0.25,0.10,0.15,
0.05,0.10,0.20),4,3,byrow=TRUE)
## End(Not run)
## Not run: cmat1= matrix( c(1,0.2,0.2,
0.2,1,0.2,
0.2,0.2,1),3,3,byrow=TRUE)
## End(Not run)
## Not run: binObj = simBinCorr(ordPmat1, cmat1, nSim)
## Not run: ep0 = generate.binary( nObs, binObj$pvec, binObj$del.next)
## Not run: Mydata= BinToOrd(binObj$pvec, ordPmat1, binObj$Mlocation, ep0)