Skip to content

Commit

Permalink
need to sort changepoint times in forecasts
Browse files Browse the repository at this point in the history
  • Loading branch information
nicholasjclark committed Nov 22, 2023
1 parent 8c33790 commit 4b7d708
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions R/trends.R
Original file line number Diff line number Diff line change
Expand Up @@ -1408,7 +1408,7 @@ forecast_trend = function(trend_model, use_lv, trend_pars,

# Combine with changepoints from the history
deltas <- c(trend_pars$delta_trend[[x]], deltas_new)
changepoint_ts <- c(trend_pars$changepoints, t_change_new)
changepoint_ts <- sort(c(trend_pars$changepoints, t_change_new))

# Generate a trend draw
draw <- piecewise_linear(t = 1:max(time),
Expand Down Expand Up @@ -1441,7 +1441,7 @@ forecast_trend = function(trend_model, use_lv, trend_pars,

# Combine with changepoints from the history
deltas <- c(trend_pars$delta_trend[[x]], deltas_new)
changepoint_ts <- c(trend_pars$changepoints, t_change_new)
changepoint_ts <- sort(c(trend_pars$changepoints, t_change_new))

# Get historical capacities
oldcaps <- trend_pars$cap[[x]]
Expand Down
Binary file modified src/mvgam.dll
Binary file not shown.

0 comments on commit 4b7d708

Please sign in to comment.