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(est_gas$fit$coef_est[4], setNames(0.665, "mean_phi1"), 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. 30, 2023, 1:09 a.m.