LRT {LBI} | R Documentation |
Likelihood Ratio Test
Description
Likelihood ratio test with given fitting results, sample size, number of parameters, log-likelihoods, and alpha
Usage
LRT(n, pFull, pReduced, logLikFull, logLikReduced, alpha=0.05, Wilks=FALSE)
Arguments
n |
number of observations |
pFull |
number of parameters of full model |
pReduced |
number of parameters of reduced model |
logLikFull |
log likelihood of full model |
logLikReduced |
log likelihood of reduced model |
alpha |
alpha value for type I error, significance level |
Wilks |
if TRUE, Wilks theorem (chi-square distribution) will be used, otherwise F distribution will be used. |
Details
It performs likelihood ratio test with given fitting results. The default test is using F distribution. For small n (i.e. less than 100), you need to use F distribution.
Value
n |
number of observations |
paraFull |
number of parameters of full model |
paraReduced |
number of parameters of reduced model |
deltaPara |
difference of parameter counts |
cutoff |
cutoff, threshold, critical value of log-likelihood for the test |
deltaLogLik |
difference of log likelihood, if negative 0 is used. |
Chisq or Fval |
statistics according to the used distribution Chi-square of F |
pval |
p-value of null hypothesis. i.e. the reduced model is better. |
Verdict |
the model preferred. |
Author(s)
Kyun-Seop Bae k@acr.kr
Examples
LRT(20, 4, 2, -58.085, -60.087)
LRT(20, 4, 2, -58.085, -60.087, Wilks=TRUE)
LRT(20, 4, 2, -57.315, -66.159)
LRT(20, 4, 2, -57.315, -66.159, Wilks=TRUE)