pwGoodnessOfFit
[LL, AIC, AICc, BIC, pValue1, pValue2] = pwGoodnessOfFit(chisq, N, p)
Calculates several measures describing the goodness of fit.
chisq Chi-Square value
N Number of fitted data points
p Number of fitted parameters
LL Log-Likelihood = - 0.5 * chisq - N/2 * log(2*pi)
AIC Akaike Information Criterion = - 2 * LL + 2 * p
AICc Corrected AIC = AIC + 2 * p * (p+1) / (N - p - 1)
BIC Bayesian Information Criterion = -2 * LL + p * log(N)
pValue1 pValue(N) = 1 - Cdf(chisq, N)
pValue2 pValue(N-p) = 1 - Cdf(chis, N-p)
Description
Cdf(.,f) denotes the cumulative density function of
a chi-square distribution with f degrees of freedom.
See also