View source: R/02_QitemFunctions.R
polychoric_likelihood | R Documentation |
Calculates the negative log-likelihood for estimating polychoric correlation from a contingency table of two ordinal variables.
polychoric_likelihood(rho, mat)
rho |
Numeric value between -1 and 1, the correlation coefficient |
mat |
A contingency table matrix for two ordinal variables |
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.
The negative log-likelihood value for the given correlation coefficient
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.