Calculation of likelihood ratios for nested models
Calculates the likelihood ratio and p-value from a chi-square distribution for two nested models.
llratio(objX, objY)
The likelihood ratio statistic is
LR = \frac{f(X, \hat{φ}, \hat{ψ})}{f(X, φ, \hat{ψ_0})}
The usual test statistic is
Λ = 2 \cdot (l(\hat{φ}, \hat{ψ}) - l(φ, \hat{ψ_0}))
Following the large sample theory, if H_0 is true, then
Λ \sim χ_p^2
A list containing the following items:
ratio |
the likelihood ratio statistic. |
df |
the change in parameters. |
p.value |
the p-value from a χ^2 distribution. See Details. |
Andrej-Nikolai Spiess
## Compare l5 and l4 model. m1 <- pcrfit(reps, 1, 2, l5) m2 <- pcrfit(reps, 1, 2, l4) llratio(m1, m2)
Please choose more modern alternatives, such as Google Chrome or Mozilla Firefox.