Skip to main content

Criterion

Enum Criterion 

Source
pub enum Criterion {
    Aic,
    Aicc,
    Bic,
    Hq,
    Fpe,
    Cat,
    Mdl,
}
Expand description

Penalised-likelihood criteria (all “smaller is better”).

Variants§

§

Aic

Akaike (1973): n log σ̂² + 2k. Not consistent; prediction-efficient (Shibata 1980).

§

Aicc

Hurvich & Tsai (1989) small-sample correction: AIC + 2K(K+1)/(n-K-1) with K = k + 1 free parameters (the k AR coefficients plus the innovation variance), the convention of forecast::Arima without constant. The series is demeaned before fitting but the mean is not counted (same as R’s ar()).

§

Bic

Schwarz (1978): n log σ̂² + k log n. Strongly consistent (Hannan 1980).

§

Hq

Hannan & Quinn (1979): n log σ̂² + 2 c k log log n, c = 1 here. Minimal consistent penalty.

§

Fpe

Akaike (1969) final prediction error: σ̂² (n+k)/(n-k). Not consistent.

§

Cat

Parzen (1974, 1977) criterion autoregressive transfer function: CAT(k) = (1/n) Σ_{j=1..k} 1/σ̄²_j − 1/σ̄²_k with the unbiased-adjusted relative variances σ̄²_j = n (σ̂²_j/σ̂²_0) / (n − j) (innovation variance divided by the sample variance, as in the ACF-based recursion Parzen uses), and CAT(0) = −(1 + 1/n). The normalisation makes the value dimensionless and the argmin scale-invariant. Asymptotically equivalent to AIC; not consistent.

§

Mdl

Rissanen (1978) two-part minimum description length: (n/2) log σ̂² + (k/2) log n. In this AR form every value is exactly BIC/2, so the argmin coincides with BIC’s; included so the benchmark can report it under its own name.

Implementations§

Source§

impl Criterion

Source

pub const ALL: [Criterion; 7]

Source

pub fn name(self) -> &'static str

Source

pub fn n_params(k: usize) -> usize

Number of free parameters counted by the penalty for an AR(k) fit: the k coefficients plus the innovation variance. For AIC/BIC/HQ the variance term is a constant shift that does not affect the argmin, so they use k directly as in the textbook formulas; AICc’s correction is nonlinear in K, so there it matters.

Source

pub fn value(self, sigma2: &[f64], k: usize, n: usize) -> f64

Criterion value for an AR(k) fit on n observations. sigma2[j] must hold the innovation variance of the AR(j) fit for j = 0..=k; every criterion except CAT reads only sigma2[k], but CAT accumulates over the whole nested path.

Trait Implementations§

Source§

impl Clone for Criterion

Source§

fn clone(&self) -> Criterion

Returns a duplicate of the value. Read more
1.0.0 (const: unstable) · Source§

fn clone_from(&mut self, source: &Self)

Performs copy-assignment from source. Read more
Source§

impl Copy for Criterion

Source§

impl Debug for Criterion

Source§

fn fmt(&self, f: &mut Formatter<'_>) -> Result

Formats the value using the given formatter. Read more
Source§

impl Eq for Criterion

Source§

impl Hash for Criterion

Source§

fn hash<__H: Hasher>(&self, state: &mut __H)

Feeds this value into the given Hasher. Read more
1.3.0 · Source§

fn hash_slice<H>(data: &[Self], state: &mut H)
where H: Hasher, Self: Sized,

Feeds a slice of this type into the given Hasher. Read more
Source§

impl PartialEq for Criterion

Source§

fn eq(&self, other: &Criterion) -> bool

Equality operator ==. Read more
1.0.0 (const: unstable) · Source§

fn ne(&self, other: &Rhs) -> bool

Inequality operator !=. Read more
Source§

impl StructuralPartialEq for Criterion

Auto Trait Implementations§

Blanket Implementations§

Source§

impl<T> Any for T
where T: 'static + ?Sized,

Source§

fn type_id(&self) -> TypeId

Gets the TypeId of self. Read more
Source§

impl<T> Borrow<T> for T
where T: ?Sized,

Source§

fn borrow(&self) -> &T

Immutably borrows from an owned value. Read more
Source§

impl<T> BorrowMut<T> for T
where T: ?Sized,

Source§

fn borrow_mut(&mut self) -> &mut T

Mutably borrows from an owned value. Read more
Source§

impl<T> CloneToUninit for T
where T: Clone,

Source§

unsafe fn clone_to_uninit(&self, dest: *mut u8)

🔬This is a nightly-only experimental API. (clone_to_uninit)
Performs copy-assignment from self to dest. Read more
Source§

impl<T> From<T> for T

Source§

fn from(t: T) -> T

Returns the argument unchanged.

Source§

impl<T, U> Into<U> for T
where U: From<T>,

Source§

fn into(self) -> U

Calls U::from(self).

That is, this conversion is whatever the implementation of From<T> for U chooses to do.

Source§

impl<T> ToOwned for T
where T: Clone,

Source§

type Owned = T

The resulting type after obtaining ownership.
Source§

fn to_owned(&self) -> T

Creates owned data from borrowed data, usually by cloning. Read more
Source§

fn clone_into(&self, target: &mut T)

Uses borrowed data to replace owned data, usually by cloning. Read more
Source§

impl<T, U> TryFrom<U> for T
where U: Into<T>,

Source§

type Error = Infallible

The type returned in the event of a conversion error.
Source§

fn try_from(value: U) -> Result<T, <T as TryFrom<U>>::Error>

Performs the conversion.
Source§

impl<T, U> TryInto<U> for T
where U: TryFrom<T>,

Source§

type Error = <U as TryFrom<T>>::Error

The type returned in the event of a conversion error.
Source§

fn try_into(self) -> Result<U, <U as TryFrom<T>>::Error>

Performs the conversion.