BinToOrd: Converts multivariate binary data to multivariate ordinal...

Description Usage Arguments Details Value Examples

View source: R/BinToOrd.R

Description

Converts multivariate binary data to multivariate ordinal data using original ordinal probabilities.

Usage

1
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 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

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

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