diff --git a/R/forecast.mvgam.R b/R/forecast.mvgam.R index 90b9047c..d73ef59b 100644 --- a/R/forecast.mvgam.R +++ b/R/forecast.mvgam.R @@ -676,7 +676,7 @@ forecast_draws = function(object, ending_time = ending_time) } - # Any model in which a an autoregressive process was included should be + # Any model in which an autoregressive process was included should be # considered as VAR1 for forecasting purposes as this will make use of the # faster c++ functions if('Sigma' %in% names(trend_pars) | diff --git a/R/mvgam.R b/R/mvgam.R index 4c9d920b..e6562c0a 100644 --- a/R/mvgam.R +++ b/R/mvgam.R @@ -1915,7 +1915,7 @@ mvgam = function(formula, warmup = burnin, chains = chains, data = model_data, - cores = 1, + cores = min(c(chains, parallel::detectCores() - 1)), init = inits, verbose = FALSE, thin = thin, @@ -1929,7 +1929,7 @@ mvgam = function(formula, warmup = burnin, chains = chains, data = model_data, - cores = min(c(chains, parallel::detectCores() - 1)), + cores = 1, init = inits, verbose = FALSE, thin = thin, diff --git a/R/trends.R b/R/trends.R index cf9962be..9fac6de6 100644 --- a/R/trends.R +++ b/R/trends.R @@ -1122,7 +1122,7 @@ forecast_trend = function(trend_model, use_lv, trend_pars, # Construct VARMA parameters if('Sigma' %in% names(trend_pars)){ - Sigma <- trend_pars$sigma + Sigma <- trend_pars$Sigma } else { Sigma <- rlang::missing_arg() } @@ -1231,7 +1231,7 @@ forecast_trend = function(trend_model, use_lv, trend_pars, Sigmamat <- matrix(0, nrow = length(trend_pars$last_lvs), ncol = length(trend_pars$last_lvs), byrow = TRUE) - diag(Sigmamat) <- 1 / sqrt(trend_pars$tau) + diag(Sigmamat) <- 1 / trend_pars$tau } diff --git a/src/mvgam.dll b/src/mvgam.dll index 0d00c5a1..2fc4de66 100644 Binary files a/src/mvgam.dll and b/src/mvgam.dll differ diff --git a/tests/testthat/Rplots.pdf b/tests/testthat/Rplots.pdf index d4d55f4e..de4dd13c 100644 Binary files a/tests/testthat/Rplots.pdf and b/tests/testthat/Rplots.pdf differ