Skip to contents

Counts strict turning points and z-scores against the i.i.d. expectation 2(n-2)/3. |z| < 1.96 is consistent with weak stationarity at the 5 percent level.

Usage

morie_dsp_turning_points(x)

Arguments

x

Numeric vector.

Value

List with turning_points, expected, z_statistic, stationary.

References

Rangayyan & Krishnan (2015), Ch. 3, sec. 3.2.

Examples

set.seed(1L)
morie_dsp_turning_points(rnorm(500))
#> $turning_points
#> [1] 331
#> 
#> $expected
#> [1] 332
#> 
#> $z_statistic
#> [1] -0.1062588
#> 
#> $stationary
#> [1] TRUE
#>