polychoric0 | R Documentation |
Polychoric correlation
polychoric0(odat,iprint=FALSE,prlevel=0)
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 |
Polychoric correlation for ordinal random variables. The number of categories can vary.
$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.
data(PTSD) ydat=PTSD rmat=polychoric0(ydat)$p
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.