tests/testthat/test-stationarity_test.R

test_that("Stationarity Test", {
  set.seed(1234)
  bb <- generate_brownian_motion(100, v = seq(0, 1, length.out = 20))
  res <- stationarity_test(bb, critical = "resample", statistic = "Mn")
  expect_equal(res$pvalue, 0.431)

  res <- stationarity_test(electricity)
  expect_equal(res$pvalue, 0)
})

Try the fChange package in your browser

Any scripts or data that you put into this service are public.

fChange documentation built on June 21, 2025, 9:08 a.m.