The hardware and bandwidth for this mirror is donated by dogado GmbH, the Webhosting and Full Service-Cloud Provider. Check out our Wordpress Tutorial.
If you wish to report a bug, or if you are interested in having us mirror your free-software or open-source project, please feel free to contact us at mirror[@]dogado.de.
This example fitted the STCCGEV model for regions Dufferin and Wellington with covariates cdd, frost_days, rx1day, tg_mean, and txgt_25 and predicted crop yields and compared them with actual data.
``` r
bsts_Dufferin <- fit_bsts(yy_train[,1], zz_train[,1,], lags = 2, MCMC.iter = 10)
#> =-=-=-=-= Iteration 0 Wed Mar 26 01:39:06 2025 =-=-=-=-=
#> =-=-=-=-= Iteration 1 Wed Mar 26 01:39:06 2025 =-=-=-=-=
#> =-=-=-=-= Iteration 2 Wed Mar 26 01:39:06 2025 =-=-=-=-=
#> =-=-=-=-= Iteration 3 Wed Mar 26 01:39:06 2025 =-=-=-=-=
#> =-=-=-=-= Iteration 4 Wed Mar 26 01:39:06 2025 =-=-=-=-=
#> =-=-=-=-= Iteration 5 Wed Mar 26 01:39:06 2025 =-=-=-=-=
#> =-=-=-=-= Iteration 6 Wed Mar 26 01:39:06 2025 =-=-=-=-=
#> =-=-=-=-= Iteration 7 Wed Mar 26 01:39:06 2025 =-=-=-=-=
#> =-=-=-=-= Iteration 8 Wed Mar 26 01:39:06 2025 =-=-=-=-=
#> =-=-=-=-= Iteration 9 Wed Mar 26 01:39:06 2025 =-=-=-=-=
bsts_Wellington <- fit_bsts(yy_train[,2], zz_train[,2,], lags = 2, MCMC.iter = 10)
#> =-=-=-=-= Iteration 0 Wed Mar 26 01:39:06 2025 =-=-=-=-=
#> =-=-=-=-= Iteration 1 Wed Mar 26 01:39:06 2025 =-=-=-=-=
#> =-=-=-=-= Iteration 2 Wed Mar 26 01:39:06 2025 =-=-=-=-=
#> =-=-=-=-= Iteration 3 Wed Mar 26 01:39:06 2025 =-=-=-=-=
#> =-=-=-=-= Iteration 4 Wed Mar 26 01:39:06 2025 =-=-=-=-=
#> =-=-=-=-= Iteration 5 Wed Mar 26 01:39:06 2025 =-=-=-=-=
#> =-=-=-=-= Iteration 6 Wed Mar 26 01:39:06 2025 =-=-=-=-=
#> =-=-=-=-= Iteration 7 Wed Mar 26 01:39:06 2025 =-=-=-=-=
#> =-=-=-=-= Iteration 8 Wed Mar 26 01:39:06 2025 =-=-=-=-=
#> =-=-=-=-= Iteration 9 Wed Mar 26 01:39:06 2025 =-=-=-=-=
list_bsts_sample <- list(bsts_Dufferin, bsts_Wellington)
Gaussianforecasts_G <- simulation_generalized(nsim = 10,
n_train = n_train,
n_test = n_test,
copula = "Gaussian",
init_params = init_params_full_G,
fn = log_likelihood_Generalized,
U_train = uu,
Z_train = zz_train,
X = xx_train,
Y_test = yy_test,
BSTS_list = list_bsts_sample)
Dufferin_Gaussian_plot<- plot_forecast(forecast = Gaussianforecasts_G[[3]][,,1],
data_train = yy_train[,1],
data_test = yy_test[,1],
time = time_all,
quant_high = 0.95,
quant_low = 0.05,
observed_col = "#e23345",
forecast_col = "#CF9FFF",
title = "Dufferin - Gaussian copula forecast")
Wellington_Gaussian_plot<- plot_forecast(forecast = Gaussianforecasts_G[[3]][,,2],
data_train = yy_train[,2],
data_test = yy_test[,2],
time = time_all,
quant_high = 0.95,
quant_low = 0.05,
observed_col = "#6195c4",
forecast_col = "#CF9FFF",
title = "Wellington - Gaussian copula forecast")
print(Dufferin_Gaussian_plot)
These binaries (installable software) and packages are in development.
They may not be fully stable and should be used with caution. We make no claims about them.
Health stats visible at Monitor.