Learn R Programming

FactorCopula (version 0.9.3)

polychoric0: Polychoric correlation

Description

Polychoric correlation

Usage

polychoric0(odat,iprint=FALSE,prlevel=0)

Value

$polych is a polychoric correlation matrix based on two-stage estimate; $iposdef is an indicator if the 2-stage correlation matrix estimate is positive definite.

Arguments

odat

nxd matrix of ordinal responses in 0,...,(ncat-1) or 1,...,ncat

iprint

flag for printing of intermediate results, including bivariate tables for observed versus expected assuming discretized bivariate Gaussian

prlevel

print.level for nlm for numerical optimization

Details

Polychoric correlation for ordinal random variables. The number of categories can vary.

Examples

Run this code
data(PTSD)
ydat=PTSD
rmat=polychoric0(ydat)$p

Run the code above in your browser using DataLab