Schwarz, G. (1978), "Estimating the dimension of a model", The Annals of
Statistics 6(2), 461-464, doi:10.1214/aos/1176344136. The paper was opened
directly (Project Euclid) and its Proposition, page 462, read off a rendered
page image: \(S(Y, n, j) = n sup(Y . theta - b(theta)) - (1/2) k_j log n
+ R\) with R bounded in n. The Bayes solution maximises S, so on the
log-likelihood scale the penalty is (1/2) k log n and on the usual
deviance scale it is BIC = -2 log L_max + k log n.
Value
List with estimate (the selected order), order,
bic, bic_raw, sigma2, coefficients, n,
T, max_p, method.
Details
That factor is the entire content of the criterion and the entire difference from AIC: the penalty per parameter GROWS with the sample, log n against 2, so BIC is consistent for the true order where AIC is not, and for any n > 7 it is the stricter of the two.
For an autoregression of order p fitted by conditional least squares with an
intercept, k = p + 2 – intercept, p coefficients and the innovation
variance. Every candidate order is fitted on the SAME T = n - max_p
observations, so the likelihoods being compared are likelihoods of the same
data; refitting each order on as many observations as it can use makes the
criteria incomparable, which is the standard way this selection is got wrong.
Two scalings are returned. bic_raw is the Schwarz form
-2 log L + k log T. bic is the per-observation form quoted in
the time-series literature, BIC(p) = log(sigma_p^2) + p log(T)/T,
which differs from bic_raw / T by log(2 pi) + 1 + 2 log(T)/T –
a constant in p – and therefore selects the same order. The two are computed
independently here and their agreement on the argmin is a check, not an
assumption.
References
Schwarz, G. (1978), Annals of Statistics 6(2):461-464, doi:10.1214/aos/1176344136, Proposition, p. 462.
Examples
set.seed(1)
Bicarp(as.numeric(filter(rnorm(200), 0.7, method = "recursive")), 4)$order
#> [1] 1
