% Generated by roxygen2: do not edit by hand
% Please edit documentation in R/02_QitemFunctions.R
\name{polychoric_likelihood}
\alias{polychoric_likelihood}
\title{Calculate Polychoric Correlation Likelihood}
\usage{
polychoric_likelihood(rho, mat)
}
\arguments{
\item{rho}{Numeric value between -1 and 1, the correlation coefficient}

\item{mat}{A contingency table matrix for two ordinal variables}
}
\value{
The negative log-likelihood value for the given correlation coefficient
}
\description{
Calculates the negative log-likelihood for estimating polychoric correlation
from a contingency table of two ordinal variables.
}
\details{
The function estimates thresholds from the marginal distributions and
calculates the expected probabilities based on a bivariate normal distribution.
It then computes the log-likelihood by comparing observed and expected frequencies.
}
\keyword{internal}
