pub struct ArmaSim<'a> {
pub phi: &'a [f64],
pub theta: &'a [f64],
pub innovations: Innovations,
pub additive_outliers: Option<Contamination>,
pub obs_noise_sd: f64,
pub burn_in: usize,
}Expand description
A simulation design: ARMA(φ, θ) plus the perturbations the benchmark needs.
Fields§
§phi: &'a [f64]§theta: &'a [f64]§innovations: Innovations§additive_outliers: Option<Contamination>Applied to the observed series, after generation.
obs_noise_sd: f64Standard deviation of Gaussian measurement noise added to the observed series (0 = none).
burn_in: usizeTransient discarded at the start.
Implementations§
Source§impl ArmaSim<'_>
impl ArmaSim<'_>
Sourcepub fn simulate(&self, n: usize, seed: u64) -> Result<Vec<f64>>
pub fn simulate(&self, n: usize, seed: u64) -> Result<Vec<f64>>
Simulate n observations. Draw order is fixed (innovations first, then
one uniform per observation for outliers plus a sign when one fires,
then one normal per observation if obs_noise_sd > 0), so results are
reproducible for a given seed whatever the configuration.
Trait Implementations§
impl<'a> Copy for ArmaSim<'a>
Auto Trait Implementations§
impl<'a> Freeze for ArmaSim<'a>
impl<'a> RefUnwindSafe for ArmaSim<'a>
impl<'a> Send for ArmaSim<'a>
impl<'a> Sync for ArmaSim<'a>
impl<'a> Unpin for ArmaSim<'a>
impl<'a> UnsafeUnpin for ArmaSim<'a>
impl<'a> UnwindSafe for ArmaSim<'a>
Blanket Implementations§
Source§impl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
Source§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more