tests/testthat/test_case_lake.R

test_that("case_lake", {

  data("LakeHuron")

  y <- LakeHuron - 570
  x <- 1:length(y)

  est_gas <- gas(y = y, x = x, distr = "norm", regress = "sep", par_static = c(FALSE, TRUE))
  expect_s3_class(est_gas, "gas")
  expect_equal(coef(est_gas), setNames(c(9.989, -0.020, 0.464, 0.665, 0.457), c("mean_omega", "mean_beta1", "mean_alpha1", "mean_phi1", "var")), tolerance = 1e-3)

})

Try the gasmodel package in your browser

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

gasmodel documentation built on Aug. 19, 2025, 1:15 a.m.