Skip to content

Commit 5e69ff9

Browse files
Merge pull request #61 from LAMPSPUC/handle_nan_residuals_simulation
avoid simulating NaN residuals in residuals boostrapping
2 parents e3db644 + ee616a0 commit 5e69ff9

File tree

2 files changed

+4
-4
lines changed

2 files changed

+4
-4
lines changed

Project.toml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
name = "StateSpaceLearning"
22
uuid = "971c4b7c-2c4e-4bac-8525-e842df3cde7b"
33
authors = ["andreramosfc <[email protected]>"]
4-
version = "2.0.0"
4+
version = "2.0.1"
55

66
[deps]
77
Distributions = "31c24e10-a181-5473-b8eb-7969acd0382f"

src/models/structural_model.jl

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1465,13 +1465,13 @@ function simulate_states(
14651465
start_idx = 1
14661466
final_idx = T
14671467
outlier_values = model.output.components["o"]["Coefs"]
1468-
#stochastic_outliers_set = get_stochastic_values(outlier_values, steps_ahead, T, 1, T, seasonal_innovation_simulation)
14691468
stochastic_outliers_set = rand(outlier_values, steps_ahead)
14701469
end
14711470

14721471
if !punctual
1473-
#stochastic_residuals_set = get_stochastic_values(model.output.ε, steps_ahead, T, 1, T, seasonal_innovation_simulation)
1474-
stochastic_residuals_set = rand(model.output.ε, steps_ahead)
1472+
stochastic_residuals_set = rand(
1473+
model.output.ε[findall(i -> !isnan(i), model.output.ε)], steps_ahead
1474+
)
14751475
end
14761476

14771477
for t in (T + 1):(T + steps_ahead)

0 commit comments

Comments
 (0)