genOrd {MultiOrd} | R Documentation |
Generates multivariate ordinal data from binary parameters
Description
Generates multivariate ordinal data from the ordinal marginal probabilities and a list returned
by the simBinCorr
function.
Usage
genOrd(no.rows, ordPmat, binObj)
Arguments
no.rows |
Number of rows |
ordPmat |
Input matrix of ordinal marginal probabilities |
binObj |
A list returned by the |
Details
It generates multivariate ordinal data. The argument binObj must be obtained using simBinCorr
before executing this function.
Value
Mydata |
A list with two components. Two components are a matrix of multivariate ordinal data (y) and its correlation matrix (Corr) |
See Also
simBinCorr
, BinToOrd
, generate.binary
Examples
## 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=100000, steps=0.025)
## Not run: myData = genOrd( 1000, ordPmat1, binObj)
[Package MultiOrd version 2.4.3 Index]