Skip to main content

linear_reset

Function linear_reset 

Source
pub fn linear_reset(
    endog: &Array1<f64>,
    exog: &Array2<f64>,
    power: usize,
    test_type: ResetAug,
    use_f: bool,
) -> Result<(f64, f64)>
Expand description

Ramsey’s RESET test for neglected nonlinearity.

Refits the model with the design augmented by powers 2, …, power of either the original fitted values (ResetAug::Fitted) or the non-constant, non-binary exog columns (ResetAug::Exog), then performs a Wald test of the null that all added coefficients are zero. With use_f = false the chi-squared form is returned; with use_f = true the F form. power must be ≥ 2 and exog must contain at least one non-constant column. Returns (statistic, pvalue). Mirrors the reference linear_reset.