mboeck11 / BGVAR

Toolbox for the estimation of Bayesian Global Vector Autoregressions in R.
27 stars 20 forks source link

Setting the seed with R and Rcpp #9

Closed mboeck11 closed 1 year ago

mboeck11 commented 2 years ago

C++ does not use the same seed as R. For reasons of reproducibility, it would be nice to have the same seed overall.

mboeck11 commented 2 years ago

R's seed is also used from Rcpp, which is nice. Some checks have shown that this is indeed the case. In case, the package should ensure this in the next update, here's a useful blog article: https://www.r-bloggers.com/2018/09/using-rs-set-seed-to-set-seeds-for-use-in-c-c-including-rcpp/.

mboeck11 commented 1 year ago

seed is taken over from C++, so I'll close this issue.