genOrd: Generates multivariate ordinal data from binary parameters

Description Usage Arguments Details Value See Also Examples

View source: R/genOrd.R

Description

Generates multivariate ordinal data from the ordinal marginal probabilities and a list returned by the simBinCorr function.

Usage

1
genOrd(no.rows, ordPmat, binObj)

Arguments

no.rows

Number of rows

ordPmat

Input matrix of ordinal marginal probabilities

binObj

A list returned by the simBinCorr

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

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
## 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)		

MultiOrd documentation built on March 6, 2021, 1:08 a.m.