diff --git a/inst/bootlm.m b/inst/bootlm.m index 095f49e..82a5573 100755 --- a/inst/bootlm.m +++ b/inst/bootlm.m @@ -2129,10 +2129,11 @@ PE = cell2mat (RSS) / n + sum (OPTIM, 2) / NBOOT; % Compute the Extended (Efron) Information Criterion, weights and relative - % liklihood + % liklihood. Uses simplified formula to calculate the log-likelihood from the + % variance (with denominator n) of the the residuals from a fitted linear model. % See Konishi & Kitagawa, "Bootstrap Information Criterion". In: Information % Criteria and Statistical Modeling. Springer Series in Statistics. Springer, NY. - LogLik = @(var) -n / 2 * log (2 * pi) - n / 2 * log (var) - n / 2; + LogLik = @(var) 0.5 * (-n * (log (2 * pi) + log (var) + 1)); S_LL = LogLik (S_ERR); % Simple estimate of expected log-likelihood A_LL = LogLik (A_ERR); % Apparent estimates of log-likelihood b = sum (A_LL - S_LL, 2) / NBOOT; % Bootstrap bias estimate of log-likelihood