unit_root/distrib/
mod.rs

1// Copyright (c) 2022. Sebastien Soudan
2//
3// Licensed under the Apache License, Version 2.0 (the "License");
4// you may not use this file except in compliance with the License.
5// You may obtain a copy of the License at
6//
7//     http:www.apache.org/licenses/LICENSE-2.0
8//
9// Unless required by applicable law or agreed to in writing, software
10// distributed under the License is distributed on an "AS IS" BASIS,
11// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
12// See the License for the specific language governing permissions and
13// limitations under the License.
14pub mod dickeyfuller;
15
16/// Alpha levels
17#[derive(Debug, Clone, Copy, PartialEq, Eq)]
18pub enum AlphaLevel {
19    /// 1%
20    OnePercent,
21    /// 2.5%
22    TwoPointFivePercent,
23    /// 5%
24    FivePercent,
25    /// 10%
26    TenPercent,
27}
28
29#[derive(Debug, Clone, Copy, PartialEq, Eq)]
30/// Constant and trend parameters to include in regression.
31pub enum Regression {
32    /// constant only e.g.  Δy_i = β_0 + β_1*y_{i-1} + ε_i
33    Constant,
34    /// constant and trend e.g. Δy_i = β_0 + β_1*y_{i-1} + β_2*i + ε_i
35    ConstantAndTrend,
36    /// no constant, no trend e.g. Δy_i = β_1*y_{i-1}  + ε_i
37    NoConstantNoTrend,
38}