BinToOrd {MultiOrd} | R Documentation |
Converts multivariate binary data to multivariate ordinal data
Description
Converts multivariate binary data to multivariate ordinal data using original ordinal probabilities.
Usage
BinToOrd(prop.vec.bin, ordPmat, Mlocation, bin.data)
Arguments
prop.vec.bin |
Vector of marginal probabilities. It is usually a first component of the
list returned by |
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 |
bin.data |
Matrix of binary data generated using |
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 |
Examples
## Not run: nObs = 1000; no.rows = 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, no.rows)
## Not run: ep0 = generate.binary( nObs, binObj$pvec, binObj$del.next)
## Not run: Mydata= BinToOrd(binObj$pvec, ordPmat1, binObj$Mlocation, ep0)
[Package MultiOrd version 2.4.3 Index]