Nothing
# Generated by noinst/extensive/generate.R -- do not edit by hand.
#
# One block per example call in noinst/extensive/ex_run.csv. See the
# generator for what is checked and for the list of known issues.
test_that("example case 1 runs, matches the benchmark, and is reproducible", {
skip_if_not_extensive()
seas(AirPassengers, x11 = "", arima.model = "(0 1 1)")
m <- seas(AirPassengers, x11 = "", arima.model = c(0, 1, 1))
expect_s3_class(m, "seas")
# numerical regression against the stored benchmark, at a tolerance
# loose enough to absorb the last-digit differences between the X-13
# builds on different platforms
expect_matches_benchmark(m, 1)
# update() reproduces the model
expect_equal(final(update(m)), final(m))
# writing the spc and reading it back gives the same series
expect_spc_roundtrip(m)
# static() reproduces the model
expect_no_error(static(m, fail = TRUE))
})
test_that("example case 2 runs, matches the benchmark, and is reproducible", {
skip_if_not_extensive()
m <- seas(AirPassengers, x11 = "", transform.function = "log", arima.model = "(2 1 0)(0 1 1)")
expect_s3_class(m, "seas")
# numerical regression against the stored benchmark, at a tolerance
# loose enough to absorb the last-digit differences between the X-13
# builds on different platforms
expect_matches_benchmark(m, 2)
# update() reproduces the model
expect_equal(final(update(m)), final(m))
# writing the spc and reading it back gives the same series
expect_spc_roundtrip(m)
# static() reproduces the model
expect_no_error(static(m, fail = TRUE))
})
test_that("example case 3 runs, matches the benchmark, and is reproducible", {
skip_if_not_extensive()
m <- seas(AirPassengers, x11 = "", transform.function = "log", regression.variables = c("seasonal",
"const"), arima.model = "(0 1 1)")
expect_s3_class(m, "seas")
# numerical regression against the stored benchmark, at a tolerance
# loose enough to absorb the last-digit differences between the X-13
# builds on different platforms
expect_matches_benchmark(m, 3)
# update() reproduces the model
expect_equal(final(update(m)), final(m))
# writing the spc and reading it back gives the same series
expect_spc_roundtrip(m)
# static() reproduces the model
expect_no_error(static(m, fail = TRUE))
})
test_that("example case 4 runs, matches the benchmark, and is reproducible", {
skip_if_not_extensive()
m <- seas(AirPassengers, x11 = "", arima.model = "([2] 1 0)")
expect_s3_class(m, "seas")
# numerical regression against the stored benchmark, at a tolerance
# loose enough to absorb the last-digit differences between the X-13
# builds on different platforms
expect_matches_benchmark(m, 4)
# update() reproduces the model
expect_equal(final(update(m)), final(m))
# writing the spc and reading it back gives the same series
expect_spc_roundtrip(m)
# static() reproduces the model
expect_no_error(static(m, fail = TRUE))
})
test_that("example case 5 runs, matches the benchmark, and is reproducible", {
skip_if_not_extensive()
m <- seas(AirPassengers, x11 = "", transform.function = "log", regression.variables = c("const"),
arima.model = "(0 1 1)12")
expect_s3_class(m, "seas")
# numerical regression against the stored benchmark, at a tolerance
# loose enough to absorb the last-digit differences between the X-13
# builds on different platforms
expect_matches_benchmark(m, 5)
# update() reproduces the model
expect_equal(final(update(m)), final(m))
# writing the spc and reading it back gives the same series
expect_spc_roundtrip(m)
# static() reproduces the model
expect_no_error(static(m, fail = TRUE))
})
test_that("example case 6 runs, matches the benchmark, and is reproducible", {
skip_if_not_extensive()
m <- seas(AirPassengers, x11 = "", transform.function = "log", regression.variables = c("const",
"seasonal"), arima.model = "(1 1 0)(1 0 0)3(0 0 1)")
expect_s3_class(m, "seas")
# numerical regression against the stored benchmark, at a tolerance
# loose enough to absorb the last-digit differences between the X-13
# builds on different platforms
expect_matches_benchmark(m, 6)
# update() reproduces the model
expect_equal(final(update(m)), final(m))
# writing the spc and reading it back gives the same series
expect_spc_roundtrip(m)
# static() reproduces the model
expect_no_error(static(m, fail = TRUE))
})
test_that("example case 7 runs, matches the benchmark, and is reproducible", {
skip_if_not_extensive()
m <- seas(AirPassengers, x11 = "", transform.function = "log", arima.model = "(0 1 1)(0 1 1)12",
arima.ma = " , 1.0f")
expect_s3_class(m, "seas")
# numerical regression against the stored benchmark, at a tolerance
# loose enough to absorb the last-digit differences between the X-13
# builds on different platforms
expect_matches_benchmark(m, 7)
# update() reproduces the model
expect_equal(final(update(m)), final(m))
# writing the spc and reading it back gives the same series
expect_spc_roundtrip(m)
# static() reproduces the model
expect_no_error(static(m, fail = TRUE))
})
test_that("example case 8 runs, matches the benchmark, and is reproducible", {
skip_if_not_extensive()
m <- seas(AirPassengers, x11 = "", regression.variables = c("td",
"seasonal"))
expect_s3_class(m, "seas")
# numerical regression against the stored benchmark, at a tolerance
# loose enough to absorb the last-digit differences between the X-13
# builds on different platforms
expect_matches_benchmark(m, 8)
# update() reproduces the model
expect_equal(final(update(m)), final(m))
# writing the spc and reading it back gives the same series
expect_spc_roundtrip(m)
# static() reproduces the model
expect_no_error(static(m, fail = TRUE))
})
test_that("example case 9 runs, matches the benchmark, and is reproducible", {
skip_if_not_extensive()
m <- seas(AirPassengers, x11 = "", regression.variables = c("td"),
automdl.diff = c(1, 1), automdl.maxorder = "3, ")
expect_s3_class(m, "seas")
# numerical regression against the stored benchmark, at a tolerance
# loose enough to absorb the last-digit differences between the X-13
# builds on different platforms
expect_matches_benchmark(m, 9)
# update() reproduces the model
expect_equal(final(update(m)), final(m))
# writing the spc and reading it back gives the same series
expect_spc_roundtrip(m)
# static() reproduces the model
expect_no_error(static(m, fail = TRUE))
})
test_that("example case 10 runs, matches the benchmark, and is reproducible", {
skip_if_not_extensive()
m <- seas(AirPassengers, x11 = "", regression.aictest = c("td"), automdl.savelog = "amd")
expect_s3_class(m, "seas")
# numerical regression against the stored benchmark, at a tolerance
# loose enough to absorb the last-digit differences between the X-13
# builds on different platforms
expect_matches_benchmark(m, 10)
# update() reproduces the model
expect_equal(final(update(m)), final(m))
# writing the spc and reading it back gives the same series
expect_spc_roundtrip(m)
# static() reproduces the model
expect_no_error(static(m, fail = TRUE))
})
test_that("example case 11 runs, matches the benchmark, and is reproducible", {
skip_if_not_extensive()
m <- seas(AirPassengers, x11 = "", arima.model = "(0 1 1)(0 1 1)",
check.print = "all")
expect_s3_class(m, "seas")
# numerical regression against the stored benchmark, at a tolerance
# loose enough to absorb the last-digit differences between the X-13
# builds on different platforms
expect_matches_benchmark(m, 11)
# update() reproduces the model
expect_equal(final(update(m)), final(m))
# writing the spc and reading it back gives the same series
expect_spc_roundtrip(m)
# static() reproduces the model
expect_no_error(static(m, fail = TRUE))
})
test_that("example case 12 runs, matches the benchmark, and is reproducible", {
skip_if_not_extensive()
m <- seas(AirPassengers, x11 = "", regression.variables = c("td",
"ao1951.jun", "ls1953.jun", "easter[14]"), arima.model = c(0,
1, 1, 0, 1, 1), check.print = c("all", "-pacf", "-pacfplot"),
check.maxlag = 36)
expect_s3_class(m, "seas")
# numerical regression against the stored benchmark, at a tolerance
# loose enough to absorb the last-digit differences between the X-13
# builds on different platforms
expect_matches_benchmark(m, 12)
# update() reproduces the model
expect_equal(final(update(m)), final(m))
# writing the spc and reading it back gives the same series
expect_spc_roundtrip(m)
# static() reproduces the model
expect_no_error(static(m, fail = TRUE))
})
test_that("example case 13 runs, matches the benchmark, and is reproducible", {
skip_if_not_extensive()
m <- seas(AirPassengers, x11 = "", regression.variables = c("seasonal"),
arima.model = c(0, 1, 1), arima.ma = "0.25f")
expect_s3_class(m, "seas")
# numerical regression against the stored benchmark, at a tolerance
# loose enough to absorb the last-digit differences between the X-13
# builds on different platforms
expect_matches_benchmark(m, 13)
# update() reproduces the model
expect_equal(final(update(m)), final(m))
# writing the spc and reading it back gives the same series
expect_spc_roundtrip(m)
# static() reproduces the model
expect_no_error(static(m, fail = TRUE))
})
test_that("example case 14 runs, matches the benchmark, and is reproducible", {
skip_if_not_extensive()
m <- seas(AirPassengers, x11 = "", outlier = NULL, transform.function = "log",
regression.variables = c("td", "ao1959.01"), arima.model = c(1,
1, 0, 0, 1, 1), regression.aictest = NULL, estimate.tol = 1e-04,
estimate.maxiter = 100, estimate.exact = "ma")
expect_s3_class(m, "seas")
# numerical regression against the stored benchmark, at a tolerance
# loose enough to absorb the last-digit differences between the X-13
# builds on different platforms
expect_matches_benchmark(m, 14)
# update() reproduces the model
expect_equal(final(update(m)), final(m))
# writing the spc and reading it back gives the same series
expect_spc_roundtrip(m)
# static() reproduces the model
expect_no_error(static(m, fail = TRUE))
})
test_that("example case 15 runs, matches the benchmark, and is reproducible", {
skip_if_not_extensive()
m <- seas(x = AirPassengers, x11 = "", regression.variables = c("td",
"ao1959.01"), estimate.maxiter = 100, estimate.exact = "ma",
arima.model = "(1 1 0)(0 1 1)", regression.aictest = NULL,
outlier = NULL, transform.function = "log", regression.b = c("-0.006263974216f",
"-0.003388544874f", "-0.002629579663f", "-0.002867539316f",
"0.002675064631f", "0.003928729538f", "0.000897413435f"),
arima.ma = "0.574618733f", arima.ar = "-0.2255735128f")
expect_s3_class(m, "seas")
# numerical regression against the stored benchmark, at a tolerance
# loose enough to absorb the last-digit differences between the X-13
# builds on different platforms
expect_matches_benchmark(m, 15)
# update() reproduces the model
expect_equal(final(update(m)), final(m))
# writing the spc and reading it back gives the same series
expect_spc_roundtrip(m)
# static() reproduces the model
expect_no_error(static(m, fail = TRUE))
})
test_that("example case 16 runs, matches the benchmark, and is reproducible", {
skip_if_not_extensive()
m <- seas(AirPassengers, pickmdl = "", x11.seasonalma = "S3X9", force.start = "oct")
expect_s3_class(m, "seas")
# numerical regression against the stored benchmark, at a tolerance
# loose enough to absorb the last-digit differences between the X-13
# builds on different platforms
expect_matches_benchmark(m, 16)
# update() reproduces the model
expect_equal(final(update(m)), final(m))
# writing the spc and reading it back gives the same series
expect_spc_roundtrip(m)
# static() reproduces the model
expect_no_error(static(m, fail = TRUE))
})
test_that("example case 17 runs, matches the benchmark, and is reproducible", {
skip_if_not_extensive()
m <- seas(AirPassengers, pickmdl = "", x11.seasonalma = "S3X9", force.start = "oct",
force.type = "regress", force.rho = 0.8)
expect_s3_class(m, "seas")
# numerical regression against the stored benchmark, at a tolerance
# loose enough to absorb the last-digit differences between the X-13
# builds on different platforms
expect_matches_benchmark(m, 17)
# update() reproduces the model
expect_equal(final(update(m)), final(m))
# writing the spc and reading it back gives the same series
expect_spc_roundtrip(m)
# static() reproduces the model
expect_no_error(static(m, fail = TRUE))
})
test_that("example case 18 runs, matches the benchmark, and is reproducible", {
skip_if_not_extensive()
m <- seas(AirPassengers, pickmdl = "", x11.seasonalma = "S3X5", force.type = "none")
expect_s3_class(m, "seas")
# numerical regression against the stored benchmark, at a tolerance
# loose enough to absorb the last-digit differences between the X-13
# builds on different platforms
expect_matches_benchmark(m, 18)
# update() reproduces the model
expect_equal(final(update(m)), final(m))
# writing the spc and reading it back gives the same series
expect_spc_roundtrip(m)
# static() reproduces the model
expect_no_error(static(m, fail = TRUE))
})
test_that("example case 19 runs, matches the benchmark, and is reproducible", {
skip_if_not_extensive()
m <- seas(AirPassengers, transform.function = "log", regression.variables = "td",
arima.model = "(0 1 1)(0 1 1)12", forecast = "")
expect_s3_class(m, "seas")
# numerical regression against the stored benchmark, at a tolerance
# loose enough to absorb the last-digit differences between the X-13
# builds on different platforms
expect_matches_benchmark(m, 19)
# update() reproduces the model
expect_equal(final(update(m)), final(m))
# writing the spc and reading it back gives the same series
expect_spc_roundtrip(m)
# static() reproduces the model
expect_no_error(static(m, fail = TRUE))
})
test_that("example case 20 runs, matches the benchmark, and is reproducible", {
skip_if_not_extensive()
m <- seas(AirPassengers, transform.function = "log", regression.variables = "td",
arima.model = "(0 1 1)(0 1 1)12", forecast.maxlead = 24)
expect_s3_class(m, "seas")
# numerical regression against the stored benchmark, at a tolerance
# loose enough to absorb the last-digit differences between the X-13
# builds on different platforms
expect_matches_benchmark(m, 20)
# update() reproduces the model
expect_equal(final(update(m)), final(m))
# writing the spc and reading it back gives the same series
expect_spc_roundtrip(m)
# static() reproduces the model
expect_no_error(static(m, fail = TRUE))
})
test_that("example case 21 runs, matches the benchmark, and is reproducible", {
skip_if_not_extensive()
m <- seas(AirPassengers, x11 = "", transform.function = "log", regression.variables = "td",
arima.model = "(0 1 1)(0 1 1)12", forecast.maxlead = 15,
forecast.probability = 0.9, forecast.exclude = 10)
expect_s3_class(m, "seas")
# numerical regression against the stored benchmark, at a tolerance
# loose enough to absorb the last-digit differences between the X-13
# builds on different platforms
expect_matches_benchmark(m, 21)
# update() reproduces the model
expect_equal(final(update(m)), final(m))
# writing the spc and reading it back gives the same series
expect_spc_roundtrip(m)
# static() reproduces the model
expect_no_error(static(m, fail = TRUE))
})
test_that("example case 22 runs, matches the benchmark, and is reproducible", {
skip_if_not_extensive()
seas(window(AirPassengers, end = c(1958, 3)), transform.function = "log",
regression.variables = "td", arima.model = "(0 1 1)(0 1 1)12",
forecast.maxlead = 24)
m <- seas(AirPassengers, series.span = " ,1958.mar", transform.function = "log",
regression.variables = "td", arima.model = "(0 1 1)(0 1 1)12",
forecast.maxlead = 24)
expect_s3_class(m, "seas")
# numerical regression against the stored benchmark, at a tolerance
# loose enough to absorb the last-digit differences between the X-13
# builds on different platforms
expect_matches_benchmark(m, 22)
# update() reproduces the model
expect_equal(final(update(m)), final(m))
# writing the spc and reading it back gives the same series
expect_spc_roundtrip(m)
# static() reproduces the model
expect_no_error(static(m, fail = TRUE))
})
test_that("example case 23 runs, matches the benchmark, and is reproducible", {
skip_if_not_extensive()
m <- seas(AirPassengers, transform.function = "log", regression.variables = "td",
arima.model = "(0 1 1)(0 1 1)12", forecast.maxback = 12,
x11 = "")
expect_s3_class(m, "seas")
# numerical regression against the stored benchmark, at a tolerance
# loose enough to absorb the last-digit differences between the X-13
# builds on different platforms
expect_matches_benchmark(m, 23)
# update() reproduces the model
expect_equal(final(update(m)), final(m))
# writing the spc and reading it back gives the same series
expect_spc_roundtrip(m)
# static() reproduces the model
expect_no_error(static(m, fail = TRUE))
})
test_that("example case 24 runs, matches the benchmark, and is reproducible", {
skip_if_not_extensive()
m <- seas(AirPassengers, transform.function = "log", regression.variables = "td",
arima.model = "(0 1 1)(0 1 1)12", forecast.maxlead = 24,
forecast.lognormal = "yes")
expect_s3_class(m, "seas")
# numerical regression against the stored benchmark, at a tolerance
# loose enough to absorb the last-digit differences between the X-13
# builds on different platforms
expect_matches_benchmark(m, 24)
# update() reproduces the model
expect_equal(final(update(m)), final(m))
# writing the spc and reading it back gives the same series
expect_spc_roundtrip(m)
# static() reproduces the model
expect_no_error(static(m, fail = TRUE))
})
test_that("example case 25 runs, matches the benchmark, and is reproducible", {
skip_if_not_extensive()
m <- seas(austres, x11.seasonalma = "S3X9", history.sadjlags = 2)
expect_s3_class(m, "seas")
# numerical regression against the stored benchmark, at a tolerance
# loose enough to absorb the last-digit differences between the X-13
# builds on different platforms
expect_matches_benchmark(m, 25)
# update() reproduces the model
expect_equal(final(update(m)), final(m))
# writing the spc and reading it back gives the same series
expect_spc_roundtrip(m)
# static() reproduces the model
expect_no_error(static(m, fail = TRUE))
})
test_that("example case 26 runs, matches the benchmark, and is reproducible", {
skip_if_not_extensive()
m <- seas(AirPassengers, regression.variables = c("const", "td", "ls1952.may",
"ls1956.oct"), arima.model = "(0 1 2)(1 1 0)", x11.seasonalma = "S3X9",
history.estimates = "fcst", history.fstep = 1, history.start = "1955.jan")
expect_s3_class(m, "seas")
# numerical regression against the stored benchmark, at a tolerance
# loose enough to absorb the last-digit differences between the X-13
# builds on different platforms
expect_matches_benchmark(m, 26)
# update() reproduces the model
expect_equal(final(update(m)), final(m))
# writing the spc and reading it back gives the same series
expect_spc_roundtrip(m)
# static() reproduces the model
expect_no_error(static(m, fail = TRUE))
})
test_that("example case 27 runs, matches the benchmark, and is reproducible", {
skip_if_not_extensive()
m <- seas(AirPassengers, regression.variables = c("const", "td", "ls1952.may",
"ls1956.oct"), arima.model = "(0 1 2)(1 1 0)", history.estimates = "fcst",
history.save = "fch")
expect_s3_class(m, "seas")
# numerical regression against the stored benchmark, at a tolerance
# loose enough to absorb the last-digit differences between the X-13
# builds on different platforms
expect_matches_benchmark(m, 27)
# update() reproduces the model
expect_equal(final(update(m)), final(m))
# writing the spc and reading it back gives the same series
expect_spc_roundtrip(m)
# static() reproduces the model
expect_no_error(static(m, fail = TRUE))
})
test_that("example case 28 runs, matches the benchmark, and is reproducible", {
skip_if_not_extensive()
m <- seas(AirPassengers, regression.variables = "td", arima.model = "(0 1 2)(0 1 1)",
x11.seasonalma = "S3X3", history.estimates = c("sadj", "trend"))
expect_s3_class(m, "seas")
# numerical regression against the stored benchmark, at a tolerance
# loose enough to absorb the last-digit differences between the X-13
# builds on different platforms
expect_matches_benchmark(m, 28)
# update() reproduces the model
expect_equal(final(update(m)), final(m))
# writing the spc and reading it back gives the same series
expect_spc_roundtrip(m)
# static() reproduces the model
expect_no_error(static(m, fail = TRUE))
})
test_that("example case 29 runs, matches the benchmark, and is reproducible", {
skip_if_not_extensive()
m <- seas(AirPassengers, regression.variables = "td", arima.model = "(0 1 1)(0 1 1)",
x11.seasonalma = "S3X3", history.estimates = c("sadj", "trend"))
expect_s3_class(m, "seas")
# numerical regression against the stored benchmark, at a tolerance
# loose enough to absorb the last-digit differences between the X-13
# builds on different platforms
expect_matches_benchmark(m, 29)
# update() reproduces the model
expect_equal(final(update(m)), final(m))
# writing the spc and reading it back gives the same series
expect_spc_roundtrip(m)
# static() reproduces the model
expect_no_error(static(m, fail = TRUE))
})
test_that("example case 30 runs, matches the benchmark, and is reproducible", {
skip_if_not_extensive()
m <- seas(AirPassengers, transform.function = "log", identify.diff = c(0,
1), identify.sdiff = c(0, 1), identify.print = c("none",
"+acf"))
expect_s3_class(m, "seas")
# numerical regression against the stored benchmark, at a tolerance
# loose enough to absorb the last-digit differences between the X-13
# builds on different platforms
expect_matches_benchmark(m, 30)
# update() reproduces the model
expect_equal(final(update(m)), final(m))
# writing the spc and reading it back gives the same series
expect_spc_roundtrip(m)
# static() reproduces the model
expect_no_error(static(m, fail = TRUE))
})
test_that("example case 31 runs, matches the benchmark, and is reproducible", {
skip_if_not_extensive()
m <- seas(AirPassengers, regression.variables = c("const", "seasonal"),
identify.diff = c(0, 1))
expect_s3_class(m, "seas")
# numerical regression against the stored benchmark, at a tolerance
# loose enough to absorb the last-digit differences between the X-13
# builds on different platforms
expect_matches_benchmark(m, 31)
# update() reproduces the model
expect_equal(final(update(m)), final(m))
# writing the spc and reading it back gives the same series
expect_spc_roundtrip(m)
# static() reproduces the model
expect_no_error(static(m, fail = TRUE))
})
test_that("example case 32 runs, matches the benchmark, and is reproducible", {
skip_if_not_extensive()
m <- seas(AirPassengers, transform.function = "log", regression.variables = c("td",
"easter[14]"), identify.diff = 1, identify.sdiff = 1, identify.maxlag = 30,
identify.print = c("none", "+acfplot", "+pacfplot"))
expect_s3_class(m, "seas")
# numerical regression against the stored benchmark, at a tolerance
# loose enough to absorb the last-digit differences between the X-13
# builds on different platforms
expect_matches_benchmark(m, 32)
# update() reproduces the model
expect_equal(final(update(m)), final(m))
# writing the spc and reading it back gives the same series
expect_spc_roundtrip(m)
# static() reproduces the model
expect_no_error(static(m, fail = TRUE))
})
test_that("example case 33 runs, matches the benchmark, and is reproducible", {
skip_if_not_extensive()
m <- seas(AirPassengers, regression.variables = c("ls1952.1"), identify.diff = c(0,
1), identify.sdiff = c(0, 1), identify.maxlag = 16)
expect_s3_class(m, "seas")
# numerical regression against the stored benchmark, at a tolerance
# loose enough to absorb the last-digit differences between the X-13
# builds on different platforms
expect_matches_benchmark(m, 33)
# update() reproduces the model
expect_equal(final(update(m)), final(m))
# writing the spc and reading it back gives the same series
expect_spc_roundtrip(m)
# static() reproduces the model
expect_no_error(static(m, fail = TRUE))
})
test_that("example case 34 runs, matches the benchmark, and is reproducible", {
skip_if_not_extensive()
m <- seas(AirPassengers, arima.model = "(0 1 1)(0 1 1)12", outlier.lsrun = 5,
outlier.types = c("ao", "ls"))
expect_s3_class(m, "seas")
# numerical regression against the stored benchmark, at a tolerance
# loose enough to absorb the last-digit differences between the X-13
# builds on different platforms
expect_matches_benchmark(m, 34)
# update() reproduces the model
expect_equal(final(update(m)), final(m))
# writing the spc and reading it back gives the same series
expect_spc_roundtrip(m)
# static() reproduces the model
expect_no_error(static(m, fail = TRUE))
})
test_that("example case 35 runs, matches the benchmark, and is reproducible", {
skip_if_not_extensive()
m <- seas(window(AirPassengers, start = c(1950, 1), end = c(1959,
12)), regression.variables = c("ls1951.jun", "ls1952.nov"),
arima.model = "(0 1 1)(0 1 1)12", outlier.lsrun = 5, outlier.types = "ao",
outlier.method = "addall", outlier.critical = 4)
expect_s3_class(m, "seas")
# numerical regression against the stored benchmark, at a tolerance
# loose enough to absorb the last-digit differences between the X-13
# builds on different platforms
expect_matches_benchmark(m, 35)
# update() reproduces the model
expect_equal(final(update(m)), final(m))
# writing the spc and reading it back gives the same series
expect_spc_roundtrip(m)
# static() reproduces the model
expect_no_error(static(m, fail = TRUE))
})
test_that("example case 36 runs, matches the benchmark, and is reproducible", {
skip_if_not_extensive()
m <- seas(window(AirPassengers, start = c(1950, 1), end = c(1959,
12)), outlier.types = "ls", outlier.critical = 3, outlier.lsrun = 2,
outlier.span = "1953.jan, 1958.dec")
expect_s3_class(m, "seas")
# numerical regression against the stored benchmark, at a tolerance
# loose enough to absorb the last-digit differences between the X-13
# builds on different platforms
expect_matches_benchmark(m, 36)
# update() reproduces the model
expect_equal(final(update(m)), final(m))
# writing the spc and reading it back gives the same series
expect_spc_roundtrip(m)
# static() reproduces the model
expect_no_error(static(m, fail = TRUE))
})
test_that("example case 37 runs, matches the benchmark, and is reproducible", {
skip_if_not_extensive()
m <- seas(window(AirPassengers, start = c(1950, 1), end = c(1959,
12)), arima.model = "(0 1 1)(0 1 1)12", outlier.critical = c(3,
4.5, 4), outlier.types = "all")
expect_s3_class(m, "seas")
# numerical regression against the stored benchmark, at a tolerance
# loose enough to absorb the last-digit differences between the X-13
# builds on different platforms
expect_matches_benchmark(m, 37)
# update() reproduces the model
expect_equal(final(update(m)), final(m))
# writing the spc and reading it back gives the same series
expect_spc_roundtrip(m)
# static() reproduces the model
expect_no_error(static(m, fail = TRUE))
})
test_that("example case 38 runs, matches the benchmark, and is reproducible", {
skip_if_not_extensive()
m <- seas(AirPassengers, x11 = "", pickmdl.mode = "fcst")
expect_s3_class(m, "seas")
# numerical regression against the stored benchmark, at a tolerance
# loose enough to absorb the last-digit differences between the X-13
# builds on different platforms
expect_matches_benchmark(m, 38)
# update() reproduces the model
expect_equal(final(update(m)), final(m))
# writing the spc and reading it back gives the same series
expect_spc_roundtrip(m)
# static() reproduces the model
expect_no_error(static(m, fail = TRUE))
})
test_that("example case 39 runs, matches the benchmark, and is reproducible", {
skip_if_not_extensive()
m <- seas(AirPassengers, x11 = "", regression.variables = "td", pickmdl.mode = "fcst",
pickmdl.method = "first", pickmdl.fcstlim = 20, pickmdl.qlim = 10,
pickmdl.overdiff = 0.99, pickmdl.identify = "all")
expect_s3_class(m, "seas")
# numerical regression against the stored benchmark, at a tolerance
# loose enough to absorb the last-digit differences between the X-13
# builds on different platforms
expect_matches_benchmark(m, 39)
# update() reproduces the model
expect_equal(final(update(m)), final(m))
# writing the spc and reading it back gives the same series
expect_spc_roundtrip(m)
# static() reproduces the model
expect_no_error(static(m, fail = TRUE))
})
test_that("example case 40 runs, matches the benchmark, and is reproducible", {
skip_if_not_extensive()
m <- seas(AirPassengers, x11 = "", regression.variables = "td", pickmdl.mode = "fcst",
pickmdl.outofsample = "yes")
expect_s3_class(m, "seas")
# numerical regression against the stored benchmark, at a tolerance
# loose enough to absorb the last-digit differences between the X-13
# builds on different platforms
expect_matches_benchmark(m, 40)
# update() reproduces the model
expect_equal(final(update(m)), final(m))
# writing the spc and reading it back gives the same series
expect_spc_roundtrip(m)
# static() reproduces the model
expect_no_error(static(m, fail = TRUE))
})
test_that("example case 41 runs, matches the benchmark, and is reproducible", {
skip_if_not_extensive()
m <- seas(AirPassengers, regression.aictest = NULL, regression.variables = c("const",
"seasonal"), arima.model = "(0 1 1)")
expect_s3_class(m, "seas")
# numerical regression against the stored benchmark, at a tolerance
# loose enough to absorb the last-digit differences between the X-13
# builds on different platforms
expect_matches_benchmark(m, 41)
# update() reproduces the model
expect_equal(final(update(m)), final(m))
# writing the spc and reading it back gives the same series
expect_spc_roundtrip(m)
# static() reproduces the model
expect_no_error(static(m, fail = TRUE))
})
test_that("example case 42 runs, matches the benchmark, and is reproducible", {
skip_if_not_extensive()
m <- seas(AirPassengers, x11 = "", regression.aictest = NULL, regression.variables = c("const",
"sincos[4,5]"), spectrum.savelog = "peaks")
expect_s3_class(m, "seas")
# numerical regression against the stored benchmark, at a tolerance
# loose enough to absorb the last-digit differences between the X-13
# builds on different platforms
expect_matches_benchmark(m, 42)
# update() reproduces the model
expect_equal(final(update(m)), final(m))
# writing the spc and reading it back gives the same series
expect_spc_roundtrip(m)
# static() reproduces the model
expect_no_error(static(m, fail = TRUE))
})
test_that("example case 43 runs, matches the benchmark, and is reproducible", {
skip_if_not_extensive()
m <- seas(AirPassengers, transform.function = "log", regression.aictest = NULL,
regression.variables = c("const", "easter[8]", "thank[3]"),
identify.diff = c(0, 1), identify.sdiff = c(0, 1))
expect_s3_class(m, "seas")
# numerical regression against the stored benchmark, at a tolerance
# loose enough to absorb the last-digit differences between the X-13
# builds on different platforms
expect_matches_benchmark(m, 43)
# update() reproduces the model
expect_equal(final(update(m)), final(m))
# writing the spc and reading it back gives the same series
expect_spc_roundtrip(m)
# static() reproduces the model
expect_no_error(static(m, fail = TRUE))
})
test_that("example case 44 runs, matches the benchmark, and is reproducible", {
skip_if_not_extensive()
m <- seas(AirPassengers, transform.function = "log", regression.aictest = NULL,
regression.variables = c("tdnolpyear", "lom", "easter[8]",
"labor[10]", "thank[3]"), arima.model = "(0 1 1)(0 1 1)")
expect_s3_class(m, "seas")
# numerical regression against the stored benchmark, at a tolerance
# loose enough to absorb the last-digit differences between the X-13
# builds on different platforms
expect_matches_benchmark(m, 44)
# update() reproduces the model
expect_equal(final(update(m)), final(m))
# writing the spc and reading it back gives the same series
expect_spc_roundtrip(m)
# static() reproduces the model
expect_no_error(static(m, fail = TRUE))
})
test_that("example case 45 runs, matches the benchmark, and is reproducible", {
skip_if_not_extensive()
m <- seas(AirPassengers, transform.function = "log", regression.variables = c("tdstock1coef[31]",
"easterstock[8]"), arima.model = "(0 1 1)(0 1 1)", x11 = "")
expect_s3_class(m, "seas")
# numerical regression against the stored benchmark, at a tolerance
# loose enough to absorb the last-digit differences between the X-13
# builds on different platforms
expect_matches_benchmark(m, 45)
# update() reproduces the model
expect_equal(final(update(m)), final(m))
# writing the spc and reading it back gives the same series
expect_spc_roundtrip(m)
# static() reproduces the model
expect_no_error(static(m, fail = TRUE))
})
test_that("example case 46 runs, matches the benchmark, and is reproducible", {
skip_if_not_extensive()
m <- seas(AirPassengers, transform.function = "log", regression.aictest = NULL,
regression.variables = c("ao1950.1", "rp1950.2-1950.4", "ao1951.1",
"td"), arima.model = "(0 1 1)(0 1 1)")
expect_s3_class(m, "seas")
# numerical regression against the stored benchmark, at a tolerance
# loose enough to absorb the last-digit differences between the X-13
# builds on different platforms
expect_matches_benchmark(m, 46)
# update() reproduces the model
expect_equal(final(update(m)), final(m))
# writing the spc and reading it back gives the same series
expect_spc_roundtrip(m)
# static() reproduces the model
expect_no_error(static(m, fail = TRUE))
})
test_that("example case 47 runs, matches the benchmark, and is reproducible", {
skip_if_not_extensive()
m <- seas(AirPassengers, transform.function = "log", regression.aictest = NULL,
regression.variables = c("ao1950.1", "qi1950.2-1950.4", "ao1951.1",
"td"), arima.model = "(0 1 1)(0 1 1)")
expect_s3_class(m, "seas")
# numerical regression against the stored benchmark, at a tolerance
# loose enough to absorb the last-digit differences between the X-13
# builds on different platforms
expect_matches_benchmark(m, 47)
# update() reproduces the model
expect_equal(final(update(m)), final(m))
# writing the spc and reading it back gives the same series
expect_spc_roundtrip(m)
# Known issue: complicated outliers (qi1950.2-1950.4) are not read back from the mdl file
# Pinned so that we notice when it starts working.
expect_error(static(m, fail = TRUE), "does not occur on a valid date")
})
test_that("example case 48 runs, matches the benchmark, and is reproducible", {
skip_if_not_extensive()
tls <- ts(0, start = 1949, end = 1965, freq = 12)
window(tls, start = c(1955, 1), end = c(1957, 12)) <- 1
m <- seas(AirPassengers, xreg = tls, identify.diff = c(0, 1), identify.sdiff = c(0,
1), outlier = NULL)
expect_s3_class(m, "seas")
# numerical regression against the stored benchmark, at a tolerance
# loose enough to absorb the last-digit differences between the X-13
# builds on different platforms
expect_matches_benchmark(m, 48)
# update() reproduces the model
expect_equal(final(update(m)), final(m))
# writing the spc and reading it back gives the same series
expect_spc_roundtrip(m)
# static() reproduces the model
expect_no_error(static(m, fail = TRUE))
})
test_that("example case 49 runs, matches the benchmark, and is reproducible", {
skip_if_not_extensive()
m <- seas(AirPassengers, regression.variables = c("tl1955.01-1957.12"),
identify.diff = c(0, 1), identify.sdiff = c(0, 1), outlier = NULL)
expect_s3_class(m, "seas")
# numerical regression against the stored benchmark, at a tolerance
# loose enough to absorb the last-digit differences between the X-13
# builds on different platforms
expect_matches_benchmark(m, 49)
# update() reproduces the model
expect_equal(final(update(m)), final(m))
# writing the spc and reading it back gives the same series
expect_spc_roundtrip(m)
# static() reproduces the model
expect_no_error(static(m, fail = TRUE))
})
test_that("example case 50 runs, matches the benchmark, and is reproducible", {
skip_if_not_extensive()
# the regressors below are random, the benchmark was generated with
# this seed
set.seed(100)
temp = ts(runif(200), start = 1948, frequency = 12)
precip = ts(runif(200), start = 1948, frequency = 12)
m <- seas(AirPassengers, x11 = "", xreg = cbind(temp, precip), regression.variables = c("seasonal",
"const"), arima.model = "(3 0 0)(0 0 0)", regression.aictest = NULL)
expect_s3_class(m, "seas")
# numerical regression against the stored benchmark, at a tolerance
# loose enough to absorb the last-digit differences between the X-13
# builds on different platforms
expect_matches_benchmark(m, 50)
# update() reproduces the model
expect_equal(final(update(m)), final(m))
# writing the spc and reading it back gives the same series
expect_spc_roundtrip(m)
# static() reproduces the model
expect_no_error(static(m, fail = TRUE))
})
test_that("example case 51 runs, matches the benchmark, and is reproducible", {
skip_if_not_extensive()
m <- seas(AirPassengers, transform.function = "log", regression.variables = c("tdstock[31]",
"ao1950.jul"), arima.model = "(0 1 0)(0 1 1)", regression.aictest = "tdstock")
expect_s3_class(m, "seas")
# numerical regression against the stored benchmark, at a tolerance
# loose enough to absorb the last-digit differences between the X-13
# builds on different platforms
expect_matches_benchmark(m, 51)
# update() reproduces the model
expect_equal(final(update(m)), final(m))
# writing the spc and reading it back gives the same series
expect_spc_roundtrip(m)
# static() reproduces the model
expect_no_error(static(m, fail = TRUE))
})
test_that("example case 52 runs, matches the benchmark, and is reproducible", {
skip_if_not_extensive()
m <- seas(AirPassengers, transform.function = "log", regression.variables = c("td/1952.dec/",
"seasonal/1952.dec/"), arima.model = "(0 1 1)", x11 = "")
expect_s3_class(m, "seas")
# numerical regression against the stored benchmark, at a tolerance
# loose enough to absorb the last-digit differences between the X-13
# builds on different platforms
expect_matches_benchmark(m, 52)
# update() reproduces the model
expect_equal(final(update(m)), final(m))
# writing the spc and reading it back gives the same series
expect_spc_roundtrip(m)
# static() reproduces the model
expect_no_error(static(m, fail = TRUE))
})
test_that("example case 53 runs, matches the benchmark, and is reproducible", {
skip_if_not_extensive()
m <- seas(AirPassengers, transform.function = "log", regression.variables = c("td",
"td//1952.dec/", "seasonal", "seasonal//1952.dec/"), arima.model = "(0 1 1)",
x11 = "")
expect_s3_class(m, "seas")
# numerical regression against the stored benchmark, at a tolerance
# loose enough to absorb the last-digit differences between the X-13
# builds on different platforms
expect_matches_benchmark(m, 53)
# update() reproduces the model
expect_equal(final(update(m)), final(m))
# writing the spc and reading it back gives the same series
expect_spc_roundtrip(m)
# Known issue: seasonal regressors with a span (td//1952.dec/) drift beyond the static tolerance
# Pinned so that we notice when it starts working.
expect_error(static(m, fail = TRUE), "Static series is different")
})
test_that("example case 54 runs, matches the benchmark, and is reproducible", {
skip_if_not_extensive()
m <- seas(AirPassengers, transform.function = "log", regression.variables = c("ao1950.1",
"ls1952.2", "ls1952.3", "ao1951.1"), arima.model = "(0 1 1)(0 1 1)")
expect_s3_class(m, "seas")
# numerical regression against the stored benchmark, at a tolerance
# loose enough to absorb the last-digit differences between the X-13
# builds on different platforms
expect_matches_benchmark(m, 54)
# update() reproduces the model
expect_equal(final(update(m)), final(m))
# writing the spc and reading it back gives the same series
expect_spc_roundtrip(m)
# static() reproduces the model
expect_no_error(static(m, fail = TRUE))
})
test_that("example case 55 runs, matches the benchmark, and is reproducible", {
skip_if_not_extensive()
m <- seas(AirPassengers, transform.function = "log", regression.variables = c("ao1950.1",
"tl1952.2-1952.3", "ao1951.1"), arima.model = "(0 1 1)(0 1 1)")
expect_s3_class(m, "seas")
# numerical regression against the stored benchmark, at a tolerance
# loose enough to absorb the last-digit differences between the X-13
# builds on different platforms
expect_matches_benchmark(m, 55)
# update() reproduces the model
expect_equal(final(update(m)), final(m))
# writing the spc and reading it back gives the same series
expect_spc_roundtrip(m)
# static() reproduces the model
expect_no_error(static(m, fail = TRUE))
})
test_that("example case 56 runs, matches the benchmark, and is reproducible", {
skip_if_not_extensive()
m <- seas(AirPassengers, transform.function = "log", regression.variables = c("ao1950.1",
"ls1952.2-1952.3", "ao1951.1"), arima.model = "(0 1 1)(0 1 1)")
expect_s3_class(m, "seas")
# numerical regression against the stored benchmark, at a tolerance
# loose enough to absorb the last-digit differences between the X-13
# builds on different platforms
expect_matches_benchmark(m, 56)
# update() reproduces the model
expect_equal(final(update(m)), final(m))
# writing the spc and reading it back gives the same series
expect_spc_roundtrip(m)
# static() reproduces the model
expect_no_error(static(m, fail = TRUE))
})
test_that("example case 57 runs, matches the benchmark, and is reproducible", {
skip_if_not_extensive()
m <- seas(AirPassengers, transform.function = "none", regression.variables = c("const",
"td"), x11.mode = "add")
expect_s3_class(m, "seas")
# numerical regression against the stored benchmark, at a tolerance
# loose enough to absorb the last-digit differences between the X-13
# builds on different platforms
expect_matches_benchmark(m, 57)
# update() reproduces the model
expect_equal(final(update(m)), final(m))
# writing the spc and reading it back gives the same series
expect_spc_roundtrip(m)
# static() reproduces the model
expect_no_error(static(m, fail = TRUE))
})
test_that("example case 58 runs, matches the benchmark, and is reproducible", {
skip_if_not_extensive()
# the regressors below are random, the benchmark was generated with
# this seed
set.seed(100)
ser1 = ts(runif(200), start = 1948, frequency = 12)
ser2 = ts(runif(200), start = 1948, frequency = 12)
ser3 = ts(runif(200), start = 1948, frequency = 12)
m <- seas(AirPassengers, transform.function = "none", xreg = cbind(ser1,
ser2, ser3), regression.variables = c("const", "td", "ao1956.oct",
"ls1951.dec", "easter[8]", "seasonal"), arima.model = c(2,
1, 0), x11.appendfcst = "yes")
expect_s3_class(m, "seas")
# numerical regression against the stored benchmark, at a tolerance
# loose enough to absorb the last-digit differences between the X-13
# builds on different platforms
expect_matches_benchmark(m, 58)
# update() reproduces the model
expect_equal(final(update(m)), final(m))
# writing the spc and reading it back gives the same series
expect_spc_roundtrip(m)
# static() reproduces the model
expect_no_error(static(m, fail = TRUE))
})
test_that("example case 59 runs, matches the benchmark, and is reproducible", {
skip_if_not_extensive()
# the regressors below are random, the benchmark was generated with
# this seed
set.seed(100)
ser1 = ts(runif(200), start = 1948, frequency = 12)
ser2 = ts(runif(200), start = 1948, frequency = 12)
ser3 = ts(runif(200), start = 1948, frequency = 12)
m <- seas(AirPassengers, transform.function = "none", xreg = cbind(ser1,
ser2, ser3), regression.usertype = "ao", regression.variables = c("const",
"td", "ao1956.oct", "ls1951.dec", "easter[8]", "seasonal"),
arima.model = c(2, 1, 0), x11.appendfcst = "yes")
expect_s3_class(m, "seas")
# numerical regression against the stored benchmark, at a tolerance
# loose enough to absorb the last-digit differences between the X-13
# builds on different platforms
expect_matches_benchmark(m, 59)
# update() reproduces the model
expect_equal(final(update(m)), final(m))
# writing the spc and reading it back gives the same series
expect_spc_roundtrip(m)
# static() reproduces the model
expect_no_error(static(m, fail = TRUE))
})
test_that("example case 60 runs, matches the benchmark, and is reproducible", {
skip_if_not_extensive()
m <- seas(AirPassengers, transform.function = "log", regression.variables = c("ao1957.jan",
"ls1959.jan", "ls1959.mar", "ls1960.jan", "td"), regression.b = c("-0.7946f",
"-0.8739f", "0.6773f", "-0.6850f", "0.0209", "-0.0107", "-0.0022",
"0.0018", "-0.0088", "-0.0074"), regression.aictest = NULL,
arima.model = "(0 1 2)(0 1 1)", x11 = "")
expect_s3_class(m, "seas")
# numerical regression against the stored benchmark, at a tolerance
# loose enough to absorb the last-digit differences between the X-13
# builds on different platforms
expect_matches_benchmark(m, 60)
# update() reproduces the model
expect_equal(final(update(m)), final(m))
# writing the spc and reading it back gives the same series
expect_spc_roundtrip(m)
# Known issue: fixed regression.b coefficients are written back with the wrong length
# Pinned so that we notice when it starts working.
expect_error(static(m, fail = TRUE), "Number of initial values is not the same")
})
test_that("example case 61 runs, matches the benchmark, and is reproducible", {
skip_if_not_extensive()
m <- seas(AirPassengers, transform.function = "log", regression.variables = c("td",
"easter[8]"), regression.aictest = NULL, arima.model = "(0 1 1)(0 1 1)",
x11.mode = "mult", x11.seasonalma = "S3X3")
expect_s3_class(m, "seas")
# numerical regression against the stored benchmark, at a tolerance
# loose enough to absorb the last-digit differences between the X-13
# builds on different platforms
expect_matches_benchmark(m, 61)
# update() reproduces the model
expect_equal(final(update(m)), final(m))
# writing the spc and reading it back gives the same series
expect_spc_roundtrip(m)
# static() reproduces the model
expect_no_error(static(m, fail = TRUE))
})
test_that("example case 62 runs, matches the benchmark, and is reproducible", {
skip_if_not_extensive()
# the regressors below are random, the benchmark was generated with
# this seed
set.seed(100)
ser1 = ts(runif(200), start = 1948, frequency = 12)
ser2 = ts(runif(200), start = 1948, frequency = 12)
ser3 = ts(runif(200), start = 1948, frequency = 12)
m <- seas(AirPassengers, x11 = "", transform.function = "log", xreg = cbind(ser1,
ser2, ser3), regression.usertype = "seasonal", regression.aictest = NULL,
arima.model = c(0, 1, 1), forecast.maxlead = 24)
expect_s3_class(m, "seas")
# numerical regression against the stored benchmark, at a tolerance
# loose enough to absorb the last-digit differences between the X-13
# builds on different platforms
expect_matches_benchmark(m, 62)
# update() reproduces the model
expect_equal(final(update(m)), final(m))
# writing the spc and reading it back gives the same series
expect_spc_roundtrip(m)
# static() reproduces the model
expect_no_error(static(m, fail = TRUE))
})
test_that("example case 63 runs, matches the benchmark, and is reproducible", {
skip_if_not_extensive()
data(holiday)
cny1 <- genhol(cny, start = -6, end = -1, frequency = 12, center = "calendar")
cny2 <- genhol(cny, start = 0, end = 6, frequency = 12, center = "calendar")
m <- seas(AirPassengers, transform.function = "log", xreg = cbind(cny1,
cny2), regression.usertype = c("holiday", "holiday2"), regression.variables = c("AO1955.Sep",
"AO1957.Jan", "AO1957.Feb"), arima.model = "(0 1 1)(0 1 0)",
forecast.maxlead = 12, x11 = "")
expect_s3_class(m, "seas")
# numerical regression against the stored benchmark, at a tolerance
# loose enough to absorb the last-digit differences between the X-13
# builds on different platforms
expect_matches_benchmark(m, 63)
# update() reproduces the model
expect_equal(final(update(m)), final(m))
# writing the spc and reading it back gives the same series
expect_spc_roundtrip(m)
# static() reproduces the model
expect_no_error(static(m, fail = TRUE))
})
test_that("example case 64 runs, matches the benchmark, and is reproducible", {
skip_if_not_extensive()
m <- seas(AirPassengers, regression.aictest = "td", outlier.types = c("ao",
"ls", "tc"), forecast.maxlead = 36)
expect_s3_class(m, "seas")
# numerical regression against the stored benchmark, at a tolerance
# loose enough to absorb the last-digit differences between the X-13
# builds on different platforms
expect_matches_benchmark(m, 64)
# update() reproduces the model
expect_equal(final(update(m)), final(m))
# writing the spc and reading it back gives the same series
expect_spc_roundtrip(m)
# static() reproduces the model
expect_no_error(static(m, fail = TRUE))
})
test_that("example case 65 runs, matches the benchmark, and is reproducible", {
skip_if_not_extensive()
m <- seas(AirPassengers, regression.aictest = "td", arima.model = "(0 1 1)(0 1 1)",
forecast.maxlead = 12, seats.finite = "yes", history.estimates = c("sadj",
"trend"), history.save = c("sarevisions", "trendrevisions"))
expect_s3_class(m, "seas")
# numerical regression against the stored benchmark, at a tolerance
# loose enough to absorb the last-digit differences between the X-13
# builds on different platforms
expect_matches_benchmark(m, 65)
# update() reproduces the model
expect_equal(final(update(m)), final(m))
# writing the spc and reading it back gives the same series
expect_spc_roundtrip(m)
# static() reproduces the model
expect_no_error(static(m, fail = TRUE))
})
test_that("example case 66 runs, matches the benchmark, and is reproducible", {
skip_if_not_extensive()
bm <- ts(AirPassengers[as.logical(rep(c(1, 0), length.out = length(AirPassengers)))],
start = start(AirPassengers), frequency = 6)
m <- seas(bm, regression.aictest = NULL, outlier.types = c("ao", "ls",
"tc"), forecast.maxlead = 18)
expect_s3_class(m, "seas")
# numerical regression against the stored benchmark, at a tolerance
# loose enough to absorb the last-digit differences between the X-13
# builds on different platforms
expect_matches_benchmark(m, 66)
# update() reproduces the model
expect_equal(final(update(m)), final(m))
# writing the spc and reading it back gives the same series
expect_spc_roundtrip(m)
# static() reproduces the model
expect_no_error(static(m, fail = TRUE))
})
test_that("example case 67 runs, matches the benchmark, and is reproducible", {
skip_if_not_extensive()
m <- seas(AirPassengers)
expect_s3_class(m, "seas")
# numerical regression against the stored benchmark, at a tolerance
# loose enough to absorb the last-digit differences between the X-13
# builds on different platforms
expect_matches_benchmark(m, 67)
# update() reproduces the model
expect_equal(final(update(m)), final(m))
# writing the spc and reading it back gives the same series
expect_spc_roundtrip(m)
# static() reproduces the model
expect_no_error(static(m, fail = TRUE))
})
test_that("example case 68 runs, matches the benchmark, and is reproducible", {
skip_if_not_extensive()
seas(window(AirPassengers, start = c(1950, 1), end = c(1959,
12)))
m <- seas(AirPassengers, series.span = "1950.1, 1959.12")
expect_s3_class(m, "seas")
# numerical regression against the stored benchmark, at a tolerance
# loose enough to absorb the last-digit differences between the X-13
# builds on different platforms
expect_matches_benchmark(m, 68)
# update() reproduces the model
expect_equal(final(update(m)), final(m))
# writing the spc and reading it back gives the same series
expect_spc_roundtrip(m)
# static() reproduces the model
expect_no_error(static(m, fail = TRUE))
})
test_that("example case 69 runs, matches the benchmark, and is reproducible", {
skip_if_not_extensive()
m <- seas(AirPassengers)
expect_s3_class(m, "seas")
# numerical regression against the stored benchmark, at a tolerance
# loose enough to absorb the last-digit differences between the X-13
# builds on different platforms
expect_matches_benchmark(m, 69)
# update() reproduces the model
expect_equal(final(update(m)), final(m))
# writing the spc and reading it back gives the same series
expect_spc_roundtrip(m)
# static() reproduces the model
expect_no_error(static(m, fail = TRUE))
})
test_that("example case 70 runs, matches the benchmark, and is reproducible", {
skip_if_not_extensive()
m <- seas(AirPassengers)
expect_s3_class(m, "seas")
# numerical regression against the stored benchmark, at a tolerance
# loose enough to absorb the last-digit differences between the X-13
# builds on different platforms
expect_matches_benchmark(m, 70)
# update() reproduces the model
expect_equal(final(update(m)), final(m))
# writing the spc and reading it back gives the same series
expect_spc_roundtrip(m)
# static() reproduces the model
expect_no_error(static(m, fail = TRUE))
})
test_that("example case 71 runs, matches the benchmark, and is reproducible", {
skip_if_not_extensive()
m <- seas(AirPassengers, series.type = "flow")
expect_s3_class(m, "seas")
# numerical regression against the stored benchmark, at a tolerance
# loose enough to absorb the last-digit differences between the X-13
# builds on different platforms
expect_matches_benchmark(m, 71)
# update() reproduces the model
expect_equal(final(update(m)), final(m))
# writing the spc and reading it back gives the same series
expect_spc_roundtrip(m)
# static() reproduces the model
expect_no_error(static(m, fail = TRUE))
})
test_that("example case 72 runs, matches the benchmark, and is reproducible", {
skip_if_not_extensive()
m <- seas(AirPassengers, series.modelspan = ",1952.dec")
expect_s3_class(m, "seas")
# numerical regression against the stored benchmark, at a tolerance
# loose enough to absorb the last-digit differences between the X-13
# builds on different platforms
expect_matches_benchmark(m, 72)
# update() reproduces the model
expect_equal(final(update(m)), final(m))
# writing the spc and reading it back gives the same series
expect_spc_roundtrip(m)
# static() reproduces the model
expect_no_error(static(m, fail = TRUE))
})
test_that("example case 73 runs, matches the benchmark, and is reproducible", {
skip_if_not_extensive()
m <- seas(AirPassengers)
expect_s3_class(m, "seas")
# numerical regression against the stored benchmark, at a tolerance
# loose enough to absorb the last-digit differences between the X-13
# builds on different platforms
expect_matches_benchmark(m, 73)
# update() reproduces the model
expect_equal(final(update(m)), final(m))
# writing the spc and reading it back gives the same series
expect_spc_roundtrip(m)
# static() reproduces the model
expect_no_error(static(m, fail = TRUE))
})
test_that("example case 74 runs, matches the benchmark, and is reproducible", {
skip_if_not_extensive()
m <- seas(AirPassengers)
expect_s3_class(m, "seas")
# numerical regression against the stored benchmark, at a tolerance
# loose enough to absorb the last-digit differences between the X-13
# builds on different platforms
expect_matches_benchmark(m, 74)
# update() reproduces the model
expect_equal(final(update(m)), final(m))
# writing the spc and reading it back gives the same series
expect_spc_roundtrip(m)
# static() reproduces the model
expect_no_error(static(m, fail = TRUE))
})
test_that("example case 75 runs, matches the benchmark, and is reproducible", {
skip_if_not_extensive()
m <- seas(AirPassengers)
expect_s3_class(m, "seas")
# numerical regression against the stored benchmark, at a tolerance
# loose enough to absorb the last-digit differences between the X-13
# builds on different platforms
expect_matches_benchmark(m, 75)
# update() reproduces the model
expect_equal(final(update(m)), final(m))
# writing the spc and reading it back gives the same series
expect_spc_roundtrip(m)
# static() reproduces the model
expect_no_error(static(m, fail = TRUE))
})
test_that("example case 76 runs, matches the benchmark, and is reproducible", {
skip_if_not_extensive()
m <- seas(AirPassengers, x11.seasonalma = "S3X9")
expect_s3_class(m, "seas")
# numerical regression against the stored benchmark, at a tolerance
# loose enough to absorb the last-digit differences between the X-13
# builds on different platforms
expect_matches_benchmark(m, 76)
# update() reproduces the model
expect_equal(final(update(m)), final(m))
# writing the spc and reading it back gives the same series
expect_spc_roundtrip(m)
# static() reproduces the model
expect_no_error(static(m, fail = TRUE))
})
test_that("example case 77 runs, matches the benchmark, and is reproducible", {
skip_if_not_extensive()
m <- seas(AirPassengers, transform.function = "log", x11.seasonalma = c("S3x9",
"S3x9", "S3x5", "S3x5", "S3x5", "S3x5", "S3x5", "S3x5", "S3x5",
"S3x5", "S3x5", "S3x5"), x11.trendma = 7, x11.mode = "logadd",
slidingspans.cutseas = 5, slidingspans.cutchng = 5)
expect_s3_class(m, "seas")
# numerical regression against the stored benchmark, at a tolerance
# loose enough to absorb the last-digit differences between the X-13
# builds on different platforms
expect_matches_benchmark(m, 77)
# update() reproduces the model
expect_equal(final(update(m)), final(m))
# writing the spc and reading it back gives the same series
expect_spc_roundtrip(m)
# static() reproduces the model
expect_no_error(static(m, fail = TRUE))
})
test_that("example case 78 runs, matches the benchmark, and is reproducible", {
skip_if_not_extensive()
m <- seas(AirPassengers, regression.variables = c("const", "td", "rp1952.may-1952.oct"),
arima.model = "(0 1 2)(0 1 1)", x11.mode = "add", transform.function = "none",
slidingspans.outlier = "keep", slidingspans.length = 50)
expect_s3_class(m, "seas")
# numerical regression against the stored benchmark, at a tolerance
# loose enough to absorb the last-digit differences between the X-13
# builds on different platforms
expect_matches_benchmark(m, 78)
# update() reproduces the model
expect_equal(final(update(m)), final(m))
# writing the spc and reading it back gives the same series
expect_spc_roundtrip(m)
# static() reproduces the model
expect_no_error(static(m, fail = TRUE))
})
test_that("example case 79 runs, matches the benchmark, and is reproducible", {
skip_if_not_extensive()
m <- seas(AirPassengers, regression.variables = c("const", "td", "rp1952.may-1952.oct"),
arima.model = "(0 1 2)(0 1 1)", slidingspans.outlier = "keep",
slidingspans.length = 50)
expect_s3_class(m, "seas")
# numerical regression against the stored benchmark, at a tolerance
# loose enough to absorb the last-digit differences between the X-13
# builds on different platforms
expect_matches_benchmark(m, 79)
# update() reproduces the model
expect_equal(final(update(m)), final(m))
# writing the spc and reading it back gives the same series
expect_spc_roundtrip(m)
# static() reproduces the model
expect_no_error(static(m, fail = TRUE))
})
test_that("example case 80 runs, matches the benchmark, and is reproducible", {
skip_if_not_extensive()
m <- seas(AirPassengers, transform.function = "log", regression.variables = c("const",
"seasonal", "tdnolpyear"), arima.model = "(3 1 0)", x11.appendfcst = "yes",
slidingspans.fixmdl = "no")
expect_s3_class(m, "seas")
# numerical regression against the stored benchmark, at a tolerance
# loose enough to absorb the last-digit differences between the X-13
# builds on different platforms
expect_matches_benchmark(m, 80)
# update() reproduces the model
expect_equal(final(update(m)), final(m))
# writing the spc and reading it back gives the same series
expect_spc_roundtrip(m)
# static() reproduces the model
expect_no_error(static(m, fail = TRUE))
})
test_that("example case 81 runs, matches the benchmark, and is reproducible", {
skip_if_not_extensive()
m <- seas(AirPassengers, x11.seasonalma = "S3X9", slidingspans.length = 40,
slidingspans.numspans = 3)
expect_s3_class(m, "seas")
# numerical regression against the stored benchmark, at a tolerance
# loose enough to absorb the last-digit differences between the X-13
# builds on different platforms
expect_matches_benchmark(m, 81)
# update() reproduces the model
expect_equal(final(update(m)), final(m))
# writing the spc and reading it back gives the same series
expect_spc_roundtrip(m)
# static() reproduces the model
expect_no_error(static(m, fail = TRUE))
})
test_that("example case 82 runs, matches the benchmark, and is reproducible", {
skip_if_not_extensive()
m <- seas(AirPassengers, transform.function = "log", spectrum.start = "1952.jan",
spectrum.print = "specorig", spectrum.savelog = "all")
expect_s3_class(m, "seas")
# numerical regression against the stored benchmark, at a tolerance
# loose enough to absorb the last-digit differences between the X-13
# builds on different platforms
expect_matches_benchmark(m, 82)
# update() reproduces the model
expect_equal(final(update(m)), final(m))
# writing the spc and reading it back gives the same series
expect_spc_roundtrip(m)
# static() reproduces the model
expect_no_error(static(m, fail = TRUE))
})
test_that("example case 83 runs, matches the benchmark, and is reproducible", {
skip_if_not_extensive()
# the regressors below are random, the benchmark was generated with
# this seed
set.seed(100)
tf <- ts(runif(250), start = c(1945, 1), frequency = 12)
m <- seas(AirPassengers, x11 = "", xtrans = tf, transform.mode = "ratio",
transform.adjust = "lom", transform.function = "log", regression.aictest = NULL)
expect_s3_class(m, "seas")
# numerical regression against the stored benchmark, at a tolerance
# loose enough to absorb the last-digit differences between the X-13
# builds on different platforms
expect_matches_benchmark(m, 83)
# update() reproduces the model
expect_equal(final(update(m)), final(m))
# writing the spc and reading it back gives the same series
expect_spc_roundtrip(m)
# static() reproduces the model
expect_no_error(static(m, fail = TRUE))
})
test_that("example case 84 runs, matches the benchmark, and is reproducible", {
skip_if_not_extensive()
m <- seas(AirPassengers, transform.constant = 45)
expect_s3_class(m, "seas")
# numerical regression against the stored benchmark, at a tolerance
# loose enough to absorb the last-digit differences between the X-13
# builds on different platforms
expect_matches_benchmark(m, 84)
# update() reproduces the model
expect_equal(final(update(m)), final(m))
# writing the spc and reading it back gives the same series
expect_spc_roundtrip(m)
# static() reproduces the model
expect_no_error(static(m, fail = TRUE))
})
test_that("example case 85 runs, matches the benchmark, and is reproducible", {
skip_if_not_extensive()
# the regressors below are random, the benchmark was generated with
# this seed
set.seed(100)
tf <- ts(runif(250), start = c(1945, 1), frequency = 12)
m <- seas(AirPassengers, x11 = "", xtrans = tf, transform.function = "log")
expect_s3_class(m, "seas")
# numerical regression against the stored benchmark, at a tolerance
# loose enough to absorb the last-digit differences between the X-13
# builds on different platforms
expect_matches_benchmark(m, 85)
# update() reproduces the model
expect_equal(final(update(m)), final(m))
# writing the spc and reading it back gives the same series
expect_spc_roundtrip(m)
# static() reproduces the model
expect_no_error(static(m, fail = TRUE))
})
test_that("example case 86 runs, matches the benchmark, and is reproducible", {
skip_if_not_extensive()
# the regressors below are random, the benchmark was generated with
# this seed
set.seed(100)
tf <- ts(runif(250), start = c(1945, 1), frequency = 12)
m <- seas(AirPassengers, x11 = "", xtrans = tf, transform.type = "temporary",
transform.function = "log")
expect_s3_class(m, "seas")
# numerical regression against the stored benchmark, at a tolerance
# loose enough to absorb the last-digit differences between the X-13
# builds on different platforms
expect_matches_benchmark(m, 86)
# update() reproduces the model
expect_equal(final(update(m)), final(m))
# writing the spc and reading it back gives the same series
expect_spc_roundtrip(m)
# static() reproduces the model
expect_no_error(static(m, fail = TRUE))
})
test_that("example case 87 runs, matches the benchmark, and is reproducible", {
skip_if_not_extensive()
m <- seas(AirPassengers, transform.function = "none", transform.power = 0.3333)
expect_s3_class(m, "seas")
# numerical regression against the stored benchmark, at a tolerance
# loose enough to absorb the last-digit differences between the X-13
# builds on different platforms
expect_matches_benchmark(m, 87)
# update() reproduces the model
expect_equal(final(update(m)), final(m))
# writing the spc and reading it back gives the same series
expect_spc_roundtrip(m)
# Known issue: the static call writes the aic selected td1coef back as a plain regressor, and X-13 then fits an additional 'Leap Year' term that the original run does not have
# Pinned so that we notice when it starts working.
expect_error(static(m, fail = TRUE), "Static series is different")
})
test_that("example case 88 runs, matches the benchmark, and is reproducible", {
skip_if_not_extensive()
# the regressors below are random, the benchmark was generated with
# this seed
set.seed(100)
cpi <- ts(runif(250), start = c(1945, 1), frequency = 12)
strike <- ts(runif(250), start = c(1945, 1), frequency = 12)
m <- seas(AirPassengers, xtrans = cbind(cpi, strike), transform.type = c("temporary",
"permanent"), transform.function = "log")
expect_s3_class(m, "seas")
# numerical regression against the stored benchmark, at a tolerance
# loose enough to absorb the last-digit differences between the X-13
# builds on different platforms
expect_matches_benchmark(m, 88)
# update() reproduces the model
expect_equal(final(update(m)), final(m))
# writing the spc and reading it back gives the same series
expect_spc_roundtrip(m)
# static() reproduces the model
expect_no_error(static(m, fail = TRUE))
})
test_that("example case 89 runs, matches the benchmark, and is reproducible", {
skip_if_not_extensive()
m <- seas(AirPassengers, transform.aicdiff = 0)
expect_s3_class(m, "seas")
# numerical regression against the stored benchmark, at a tolerance
# loose enough to absorb the last-digit differences between the X-13
# builds on different platforms
expect_matches_benchmark(m, 89)
# update() reproduces the model
expect_equal(final(update(m)), final(m))
# writing the spc and reading it back gives the same series
expect_spc_roundtrip(m)
# static() reproduces the model
expect_no_error(static(m, fail = TRUE))
})
test_that("example case 90 runs, matches the benchmark, and is reproducible", {
skip_if_not_extensive()
m <- seas(AirPassengers, x11 = "")
expect_s3_class(m, "seas")
# numerical regression against the stored benchmark, at a tolerance
# loose enough to absorb the last-digit differences between the X-13
# builds on different platforms
expect_matches_benchmark(m, 90)
# update() reproduces the model
expect_equal(final(update(m)), final(m))
# writing the spc and reading it back gives the same series
expect_spc_roundtrip(m)
# static() reproduces the model
expect_no_error(static(m, fail = TRUE))
})
test_that("example case 91 runs, matches the benchmark, and is reproducible", {
skip_if_not_extensive()
m <- seas(AirPassengers, regression.aictest = NULL, x11.seasonalma = "s3x9",
x11.trendma = 23, x11regression.variables = "td", x11regression.aictest = "td")
expect_s3_class(m, "seas")
# numerical regression against the stored benchmark, at a tolerance
# loose enough to absorb the last-digit differences between the X-13
# builds on different platforms
expect_matches_benchmark(m, 91)
# update() reproduces the model
expect_equal(final(update(m)), final(m))
# writing the spc and reading it back gives the same series
expect_spc_roundtrip(m)
# static() reproduces the model
expect_no_error(static(m, fail = TRUE))
})
test_that("example case 92 runs, matches the benchmark, and is reproducible", {
skip_if_not_extensive()
m <- seas(AirPassengers, x11.seasonalma = c("s3x3", "s3x3", "s3x3",
"s3x3", "s3x3", "s3x3", "s3x3", "s3x3", "s3x3", "s3x3", "s3x5",
"s3x5"), x11.trendma = 7)
expect_s3_class(m, "seas")
# numerical regression against the stored benchmark, at a tolerance
# loose enough to absorb the last-digit differences between the X-13
# builds on different platforms
expect_matches_benchmark(m, 92)
# update() reproduces the model
expect_equal(final(update(m)), final(m))
# writing the spc and reading it back gives the same series
expect_spc_roundtrip(m)
# static() reproduces the model
expect_no_error(static(m, fail = TRUE))
})
test_that("example case 93 runs, matches the benchmark, and is reproducible", {
skip_if_not_extensive()
m <- seas(AirPassengers, transform.function = "none", regression.variables = c("const",
"td", "ls1960.may", "ls1960.oct"), arima.model = "(0 1 2)(1 1 0)",
forecast.maxlead = 0, x11.mode = "add", x11.sigmalim = c(2,
3.5))
expect_s3_class(m, "seas")
# numerical regression against the stored benchmark, at a tolerance
# loose enough to absorb the last-digit differences between the X-13
# builds on different platforms
expect_matches_benchmark(m, 93)
# update() reproduces the model
expect_equal(final(update(m)), final(m))
# writing the spc and reading it back gives the same series
expect_spc_roundtrip(m)
# static() reproduces the model
expect_no_error(static(m, fail = TRUE))
})
test_that("example case 94 runs, matches the benchmark, and is reproducible", {
skip_if_not_extensive()
m <- seas(AirPassengers, transform.function = "none", regression.variables = c("const",
"td", "ls1960.may", "ls1960.oct"), arima.model = "(0 1 2)(1 1 0)",
forecast.maxlead = 0, x11.mode = "add", x11.sigmalim = c(2,
3.5))
expect_s3_class(m, "seas")
# numerical regression against the stored benchmark, at a tolerance
# loose enough to absorb the last-digit differences between the X-13
# builds on different platforms
expect_matches_benchmark(m, 94)
# update() reproduces the model
expect_equal(final(update(m)), final(m))
# writing the spc and reading it back gives the same series
expect_spc_roundtrip(m)
# static() reproduces the model
expect_no_error(static(m, fail = TRUE))
})
test_that("example case 95 runs, matches the benchmark, and is reproducible", {
skip_if_not_extensive()
m <- seas(AirPassengers, transform.function = "log", regression.variables = c("ao1956.feb",
"ao1958.feb", "ls1960.feb", "ls1952.nov", "ao1954.feb"),
arima.model = "(0 1 2)(0 1 1)", forecast.maxlead = 60, x11.seasonalma = "s3x9")
expect_s3_class(m, "seas")
# numerical regression against the stored benchmark, at a tolerance
# loose enough to absorb the last-digit differences between the X-13
# builds on different platforms
expect_matches_benchmark(m, 95)
# update() reproduces the model
expect_equal(final(update(m)), final(m))
# writing the spc and reading it back gives the same series
expect_spc_roundtrip(m)
# static() reproduces the model
expect_no_error(static(m, fail = TRUE))
})
test_that("example case 96 runs, matches the benchmark, and is reproducible", {
skip_if_not_extensive()
m <- seas(AirPassengers, x11 = "", regression.aictest = NULL, x11regression.variables = "td")
expect_s3_class(m, "seas")
# numerical regression against the stored benchmark, at a tolerance
# loose enough to absorb the last-digit differences between the X-13
# builds on different platforms
expect_matches_benchmark(m, 96)
# update() reproduces the model
expect_equal(final(update(m)), final(m))
# writing the spc and reading it back gives the same series
expect_spc_roundtrip(m)
# static() reproduces the model
expect_no_error(static(m, fail = TRUE))
})
test_that("example case 97 runs, matches the benchmark, and is reproducible", {
skip_if_not_extensive()
m <- seas(AirPassengers, x11 = "", regression.aictest = NULL, x11regression.variables = "td",
x11regression.aictest = c("td", "easter"))
expect_s3_class(m, "seas")
# numerical regression against the stored benchmark, at a tolerance
# loose enough to absorb the last-digit differences between the X-13
# builds on different platforms
expect_matches_benchmark(m, 97)
# update() reproduces the model
expect_equal(final(update(m)), final(m))
# writing the spc and reading it back gives the same series
expect_spc_roundtrip(m)
# static() reproduces the model
expect_no_error(static(m, fail = TRUE))
})
test_that("example case 98 runs, matches the benchmark, and is reproducible", {
skip_if_not_extensive()
m <- seas(AirPassengers, x11 = "", regression.aictest = NULL, x11regression.variables = "td",
x11regression.tdprior = c(1.4, 1.4, 1.4, 1.4, 1.4, 0, 0),
transform.function = "log")
expect_s3_class(m, "seas")
# numerical regression against the stored benchmark, at a tolerance
# loose enough to absorb the last-digit differences between the X-13
# builds on different platforms
expect_matches_benchmark(m, 98)
# update() reproduces the model
expect_equal(final(update(m)), final(m))
# writing the spc and reading it back gives the same series
expect_spc_roundtrip(m)
# static() reproduces the model
expect_no_error(static(m, fail = TRUE))
})
test_that("example case 99 runs, matches the benchmark, and is reproducible", {
skip_if_not_extensive()
m <- seas(AirPassengers, x11 = "", regression.aictest = NULL, x11regression.variables = c("td",
"easter[8]"), x11regression.critical = 5, x11regression.b = c("0.4453f",
"0.8550f", "-0.3012f", "0.2717f", "-0.1705f", "0.0983f",
"-0.0082"))
expect_s3_class(m, "seas")
# numerical regression against the stored benchmark, at a tolerance
# loose enough to absorb the last-digit differences between the X-13
# builds on different platforms
expect_matches_benchmark(m, 99)
# update() reproduces the model
expect_equal(final(update(m)), final(m))
# writing the spc and reading it back gives the same series
expect_spc_roundtrip(m)
# Known issue: the fixed (3 1 1)(0 1 1) model is re-estimated to a different optimum (the original MA-Nonseasonal-01 of -0.94 sits close to the invertibility boundary)
# Pinned so that we notice when it starts working.
expect_error(static(m, fail = TRUE), "Static series is different")
})
test_that("example case 100 runs, matches the benchmark, and is reproducible", {
skip_if_not_extensive()
m <- seas(AirPassengers, x11 = "", regression.aictest = NULL, x11regression.variables = c("td/1950.1/",
"easter[8]", "labor[10]", "thank[10]"), x11.seasonalma = "x11default",
x11.sigmalim = c(1.8, 2.9), x11.appendfcst = "yes", )
expect_s3_class(m, "seas")
# numerical regression against the stored benchmark, at a tolerance
# loose enough to absorb the last-digit differences between the X-13
# builds on different platforms
expect_matches_benchmark(m, 100)
# update() reproduces the model
expect_equal(final(update(m)), final(m))
# writing the spc and reading it back gives the same series
expect_spc_roundtrip(m)
# static() reproduces the model
expect_no_error(static(m, fail = TRUE))
})
test_that("example case 101 runs, matches the benchmark, and is reproducible", {
skip_if_not_extensive()
m <- seas(AirPassengers, x11 = "", transform.function = "log", regression.variables = "const",
regression.aictest = NULL, arima.model = "(0 1 1)(0 1 1)",
outlier = NULL, x11regression.variables = c("td", "easter[8]"))
expect_s3_class(m, "seas")
# numerical regression against the stored benchmark, at a tolerance
# loose enough to absorb the last-digit differences between the X-13
# builds on different platforms
expect_matches_benchmark(m, 101)
# update() reproduces the model
expect_equal(final(update(m)), final(m))
# writing the spc and reading it back gives the same series
expect_spc_roundtrip(m)
# static() reproduces the model
expect_no_error(static(m, fail = TRUE))
})
test_that("example case 102 runs, matches the benchmark, and is reproducible", {
skip_if_not_extensive()
m <- seas(AirPassengers, x11 = "", transform.function = "log", arima.model = "(2 1 0)(0 1 1)")
expect_s3_class(m, "seas")
# numerical regression against the stored benchmark, at a tolerance
# loose enough to absorb the last-digit differences between the X-13
# builds on different platforms
expect_matches_benchmark(m, 102)
# update() reproduces the model
expect_equal(final(update(m)), final(m))
# writing the spc and reading it back gives the same series
expect_spc_roundtrip(m)
# static() reproduces the model
expect_no_error(static(m, fail = TRUE))
})
Any scripts or data that you put into this service are public.
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.