diff --git a/DESCRIPTION b/DESCRIPTION index fb2c230..8c4ef2c 100644 --- a/DESCRIPTION +++ b/DESCRIPTION @@ -1,6 +1,6 @@ Package: bvartools Title: Bayesian Inference of Vector Autoregressive and Error Correction Models -Version: 0.2.3.9000 +Version: 0.2.4 Date: 2023-08-23 Authors@R: person(c("Franz", "X."), "Mohr", email = "franz.x.mohr@outlook.com", role = c("aut","cre"), comment = c(ORCiD = "0009-0003-8890-7781")) Description: Assists in the set-up of algorithms for Bayesian inference of vector autoregressive (VAR) and error correction (VEC) models. Functions for posterior simulation, forecasting, impulse response analysis and forecast error variance decomposition are largely based on the introductory texts of Chan, Koop, Poirier and Tobias (2019, ISBN: 9781108437493), Koop and Korobilis (2010) and Luetkepohl (2006, ISBN: 9783540262398). diff --git a/NEWS.md b/NEWS.md index d1ac63d..3ee3c1e 100644 --- a/NEWS.md +++ b/NEWS.md @@ -1,5 +1,6 @@ # bvartools 0.2.4 +* Dropped some error messages to fix a security concern with `Rcpp::stop`. * `stochvol_ocsn2007` can handle multi-column input. * `stochvol_ksc1998` can handle multi-column input. * Added `post_gamma_state_variance` for posterior simulation of constant error variances of the state equation. diff --git a/src/stochvol_ksc1998.cpp b/src/stochvol_ksc1998.cpp index 232d00b..8de0fc5 100644 --- a/src/stochvol_ksc1998.cpp +++ b/src/stochvol_ksc1998.cpp @@ -59,9 +59,9 @@ // [[Rcpp::export]] arma::mat stochvol_ksc1998(arma::mat y, arma::mat h, arma::vec sigma, arma::vec h_init, arma::vec constant) { - if (y.has_nan()) { - Rcpp::stop("Argument 'y' contains NAs."); - } + // if (y.has_nan()) { + // Rcpp::stop("Argument 'y' contains NAs."); + // } // Components of the mixture model arma::rowvec p_i(7), mu(7), sigma2(7); diff --git a/src/stochvol_ocsn2007.cpp b/src/stochvol_ocsn2007.cpp index b7f801e..5a8c015 100644 --- a/src/stochvol_ocsn2007.cpp +++ b/src/stochvol_ocsn2007.cpp @@ -52,16 +52,16 @@ // [[Rcpp::export]] arma::mat stochvol_ocsn2007(arma::vec y, arma::vec h, double sigma, double h_init, double constant) { - if (y.has_nan()) { - Rcpp::stop("Argument 'y' contains NAs."); - } + // if (y.has_nan()) { + // Rcpp::stop("Argument 'y' contains NAs."); + // } // Prepare series y = log(arma::pow(y, 2) + constant); arma::uword tt = y.n_elem; - if (y.n_elem != h.n_elem) { - Rcpp::stop("Arguments 'y' and 'h' do not have the same length."); - } + // if (y.n_elem != h.n_elem) { + // Rcpp::stop("Arguments 'y' and 'h' do not have the same length."); + // } // Components of the mixture model arma::rowvec p_i(10), mu(10), sigma2(10);