pub struct DeterministicProcess { /* private fields */ }Expand description
Builder for a matrix of deterministic time-series terms.
Configure with a constant, a polynomial time-trend order, and optional
seasonal dummies of a given period, then call Self::in_sample to
materialise the steps × k term matrix.
Column order is [const?, trend, trend_squared, ..., seasonal dummies?].
When the constant is present the first seasonal period is used as the
reference category and dropped, yielding period - 1 dummy columns named
s(2,period)..s(period,period); otherwise all period dummies are kept.
The time index for the trend terms runs 1, 2, ..., steps.
Implementations§
Source§impl DeterministicProcess
impl DeterministicProcess
Sourcepub fn new(
steps: usize,
constant: bool,
order: usize,
seasonal: bool,
period: usize,
) -> Result<Self>
pub fn new( steps: usize, constant: bool, order: usize, seasonal: bool, period: usize, ) -> Result<Self>
Create a process spanning steps in-sample observations.
constant toggles the intercept column, order is the degree of the
polynomial time trend (0 disables it), and seasonal toggles seasonal
dummies with the given period (which must be at least 2 when seasonal
terms are requested).
Sourcepub fn ncols(&self) -> usize
pub fn ncols(&self) -> usize
Total number of deterministic columns produced by Self::in_sample.