From ca97fd5fbecf0f70c623a9cd4d2e76361336011e Mon Sep 17 00:00:00 2001 From: guilhermebodin Date: Mon, 28 Aug 2023 11:56:27 -0300 Subject: [PATCH] update tests --- test/models/sarima.jl | 2 +- test/models/unobserved_components.jl | 5 +++++ 2 files changed, 6 insertions(+), 1 deletion(-) diff --git a/test/models/sarima.jl b/test/models/sarima.jl index ee9c786..f1bbca7 100644 --- a/test/models/sarima.jl +++ b/test/models/sarima.jl @@ -29,7 +29,7 @@ # Values are very close to 0.0 so we test with absolute tolerance # It attains 1e-3 when we make 10M simulations, which is too much # computation for a rather simple test. - test_scenarios_adequacy_with_forecast(forec, scenarios; atol=1e-1) + test_scenarios_adequacy_with_forecast(forec, scenarios; atol=2e-1) missing_obs = [6, 16, 26, 36, 46, 56, 66, 72, 73, 74, 75, 76, 86, 96] missing_dinternet = copy(dinternet) diff --git a/test/models/unobserved_components.jl b/test/models/unobserved_components.jl index f2c2192..0ce640e 100644 --- a/test/models/unobserved_components.jl +++ b/test/models/unobserved_components.jl @@ -40,4 +40,9 @@ @test minimum(alpha[:, 1]) <= 296 @test maximum(alpha[:, 2]) >= 7.5 @test minimum(alpha[:, 2]) <= -7.5 + + # Testing that it does not break + rj_temp = CSV.File(StateSpaceModels.RJ_TEMPERATURE) |> DataFrame + model = UnobservedComponents(rj_temp.Values; trend = "smooth trend", cycle = "stochastic") + fit!(model) end \ No newline at end of file