GithubHelp home page GithubHelp logo

franzmohr / bvartools Goto Github PK

View Code? Open in Web Editor NEW
29.0 4.0 11.0 31.88 MB

Functions for Bayesian inference of vector autoregressive and vector error correction models

R 59.00% C++ 40.95% C 0.04%
bayesian-var gibbs-sampling vector-autoregression bvar bayesian-inference vector-error-correction-model bayesian r-package bvecm mcmc

bvartools's People

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar

bvartools's Issues

Error in plot(bvar_est_min) package bvartools

hi all,

I run a simpe var(2) with 4 endogenous variables no exogenous variables only constant. After executing draw_posterior() command I use the plot(object,type="trace") in order to inspect posterior draws. when executing plot() I receive the error message
"Error in plot.new() : figure margins too large"
thanks in andvance
Dionysios

Error when updating

When I try to update the bvartools package in R from version 0.03 to 0.1.0. I receive the following error:

> install.packages("bvartools")
also installing the dependencies ‘coda’, ‘Rcpp’, ‘RcppArmadillo’


  There is a binary version available but the source version is later:
          binary source needs_compilation
bvartools  0.0.3  0.1.0              TRUE

Do you want to install from sources the package which needs compilation? (Yes/no/cancel) Yes
trying URL 'https://cran.rstudio.com/bin/macosx/contrib/4.0/coda_0.19-3.tgz'
Content type 'application/x-gzip' length 320842 bytes (313 KB)
==================================================
downloaded 313 KB

trying URL 'https://cran.rstudio.com/bin/macosx/contrib/4.0/Rcpp_1.0.5.tgz'
Content type 'application/x-gzip' length 3215939 bytes (3.1 MB)
==================================================
downloaded 3.1 MB

trying URL 'https://cran.rstudio.com/bin/macosx/contrib/4.0/RcppArmadillo_0.9.900.3.0.tgz'
Content type 'application/x-gzip' length 1871293 bytes (1.8 MB)
==================================================
downloaded 1.8 MB


The downloaded binary packages are in
	/var/folders/y8/3xvvn_bx4zq6p1nv4tmt51580000gn/T//RtmpYiLLLM/downloaded_packages
installing the source package ‘bvartools’

trying URL 'https://cran.rstudio.com/src/contrib/bvartools_0.1.0.tar.gz'
Content type 'application/x-gzip' length 337692 bytes (329 KB)
==================================================
downloaded 329 KB

* installing *source* package ‘bvartools’ ...
** package ‘bvartools’ successfully unpacked and MD5 sums checked
** using staged installation
** libs
clang++ -mmacosx-version-min=10.13 -std=gnu++11 -I"/Library/Frameworks/R.framework/Resources/include" -DNDEBUG -DARMA_NO_DEBUG  -I'/Library/Frameworks/R.framework/Versions/4.0/Resources/library/Rcpp/include' -I'/Library/Frameworks/R.framework/Versions/4.0/Resources/library/RcppArmadillo/include' -I/usr/local/include   -fPIC  -Wall -g -O2  -c RcppExports.cpp -o RcppExports.o
clang++ -mmacosx-version-min=10.13 -std=gnu++11 -I"/Library/Frameworks/R.framework/Resources/include" -DNDEBUG -DARMA_NO_DEBUG  -I'/Library/Frameworks/R.framework/Versions/4.0/Resources/library/Rcpp/include' -I'/Library/Frameworks/R.framework/Versions/4.0/Resources/library/RcppArmadillo/include' -I/usr/local/include   -fPIC  -Wall -g -O2  -c bvaralg.cpp -o bvaralg.o
clang++ -mmacosx-version-min=10.13 -std=gnu++11 -I"/Library/Frameworks/R.framework/Resources/include" -DNDEBUG -DARMA_NO_DEBUG  -I'/Library/Frameworks/R.framework/Versions/4.0/Resources/library/Rcpp/include' -I'/Library/Frameworks/R.framework/Versions/4.0/Resources/library/RcppArmadillo/include' -I/usr/local/include   -fPIC  -Wall -g -O2  -c bvecalg.cpp -o bvecalg.o
clang++ -mmacosx-version-min=10.13 -std=gnu++11 -I"/Library/Frameworks/R.framework/Resources/include" -DNDEBUG -DARMA_NO_DEBUG  -I'/Library/Frameworks/R.framework/Versions/4.0/Resources/library/Rcpp/include' -I'/Library/Frameworks/R.framework/Versions/4.0/Resources/library/RcppArmadillo/include' -I/usr/local/include   -fPIC  -Wall -g -O2  -c bvs.cpp -o bvs.o
clang++ -mmacosx-version-min=10.13 -std=gnu++11 -I"/Library/Frameworks/R.framework/Resources/include" -DNDEBUG -DARMA_NO_DEBUG  -I'/Library/Frameworks/R.framework/Versions/4.0/Resources/library/Rcpp/include' -I'/Library/Frameworks/R.framework/Versions/4.0/Resources/library/RcppArmadillo/include' -I/usr/local/include   -fPIC  -Wall -g -O2  -c ir.cpp -o ir.o
clang++ -mmacosx-version-min=10.13 -std=gnu++11 -I"/Library/Frameworks/R.framework/Resources/include" -DNDEBUG -DARMA_NO_DEBUG  -I'/Library/Frameworks/R.framework/Versions/4.0/Resources/library/Rcpp/include' -I'/Library/Frameworks/R.framework/Versions/4.0/Resources/library/RcppArmadillo/include' -I/usr/local/include   -fPIC  -Wall -g -O2  -c kalman_dk.cpp -o kalman_dk.o
clang++ -mmacosx-version-min=10.13 -std=gnu++11 -I"/Library/Frameworks/R.framework/Resources/include" -DNDEBUG -DARMA_NO_DEBUG  -I'/Library/Frameworks/R.framework/Versions/4.0/Resources/library/Rcpp/include' -I'/Library/Frameworks/R.framework/Versions/4.0/Resources/library/RcppArmadillo/include' -I/usr/local/include   -fPIC  -Wall -g -O2  -c loglik_normal.cpp -o loglik_normal.o
clang++ -mmacosx-version-min=10.13 -std=gnu++11 -I"/Library/Frameworks/R.framework/Resources/include" -DNDEBUG -DARMA_NO_DEBUG  -I'/Library/Frameworks/R.framework/Versions/4.0/Resources/library/Rcpp/include' -I'/Library/Frameworks/R.framework/Versions/4.0/Resources/library/RcppArmadillo/include' -I/usr/local/include   -fPIC  -Wall -g -O2  -c post_coint_kls.cpp -o post_coint_kls.o
clang++ -mmacosx-version-min=10.13 -std=gnu++11 -I"/Library/Frameworks/R.framework/Resources/include" -DNDEBUG -DARMA_NO_DEBUG  -I'/Library/Frameworks/R.framework/Versions/4.0/Resources/library/Rcpp/include' -I'/Library/Frameworks/R.framework/Versions/4.0/Resources/library/RcppArmadillo/include' -I/usr/local/include   -fPIC  -Wall -g -O2  -c post_coint_kls_sur.cpp -o post_coint_kls_sur.o
clang++ -mmacosx-version-min=10.13 -std=gnu++11 -I"/Library/Frameworks/R.framework/Resources/include" -DNDEBUG -DARMA_NO_DEBUG  -I'/Library/Frameworks/R.framework/Versions/4.0/Resources/library/Rcpp/include' -I'/Library/Frameworks/R.framework/Versions/4.0/Resources/library/RcppArmadillo/include' -I/usr/local/include   -fPIC  -Wall -g -O2  -c post_normal.cpp -o post_normal.o
clang++ -mmacosx-version-min=10.13 -std=gnu++11 -I"/Library/Frameworks/R.framework/Resources/include" -DNDEBUG -DARMA_NO_DEBUG  -I'/Library/Frameworks/R.framework/Versions/4.0/Resources/library/Rcpp/include' -I'/Library/Frameworks/R.framework/Versions/4.0/Resources/library/RcppArmadillo/include' -I/usr/local/include   -fPIC  -Wall -g -O2  -c post_normal_sur.cpp -o post_normal_sur.o
clang++ -mmacosx-version-min=10.13 -std=gnu++11 -I"/Library/Frameworks/R.framework/Resources/include" -DNDEBUG -DARMA_NO_DEBUG  -I'/Library/Frameworks/R.framework/Versions/4.0/Resources/library/Rcpp/include' -I'/Library/Frameworks/R.framework/Versions/4.0/Resources/library/RcppArmadillo/include' -I/usr/local/include   -fPIC  -Wall -g -O2  -c svss.cpp -o svss.o
clang++ -mmacosx-version-min=10.13 -std=gnu++11 -I"/Library/Frameworks/R.framework/Resources/include" -DNDEBUG -DARMA_NO_DEBUG  -I'/Library/Frameworks/R.framework/Versions/4.0/Resources/library/Rcpp/include' -I'/Library/Frameworks/R.framework/Versions/4.0/Resources/library/RcppArmadillo/include' -I/usr/local/include   -fPIC  -Wall -g -O2  -c vardecomp.cpp -o vardecomp.o
clang++ -mmacosx-version-min=10.13 -std=gnu++11 -dynamiclib -Wl,-headerpad_max_install_names -undefined dynamic_lookup -single_module -multiply_defined suppress -L/Library/Frameworks/R.framework/Resources/lib -L/usr/local/lib -o bvartools.so RcppExports.o bvaralg.o bvecalg.o bvs.o ir.o kalman_dk.o loglik_normal.o post_coint_kls.o post_coint_kls_sur.o post_normal.o post_normal_sur.o svss.o vardecomp.o -L/Library/Frameworks/R.framework/Resources/lib -lRlapack -L/Library/Frameworks/R.framework/Resources/lib -lRblas -L/usr/local/gfortran/lib/gcc/x86_64-apple-darwin18/8.2.0 -L/usr/local/gfortran/lib -lgfortran -lquadmath -lm -F/Library/Frameworks/R.framework/.. -framework R -Wl,-framework -Wl,CoreFoundation
ld: warning: directory not found for option '-L/usr/local/gfortran/lib/gcc/x86_64-apple-darwin18/8.2.0'
ld: warning: directory not found for option '-L/usr/local/gfortran/lib'
ld: library not found for -lgfortran
clang: error: linker command failed with exit code 1 (use -v to see invocation)
make: *** [bvartools.so] Error 1
ERROR: compilation failed for package ‘bvartools’
* removing ‘/Library/Frameworks/R.framework/Versions/4.0/Resources/library/bvartools’
Warning in install.packages :
  installation of package ‘bvartools’ had non-zero exit status

The downloaded source packages are in
	‘/private/var/folders/y8/3xvvn_bx4zq6p1nv4tmt51580000gn/T/RtmpYiLLLM/downloaded_packages’

Do you perhaps have any idea how I could solve this?

Thanks in advance!
Rosa

Question about "new_d" argument in "predict"

Hello!
I have a question about the "new_d" argument in the "predict()" function. The example is unfortunately not very clear to me.
The example dataset e1 has three variables (invest, income, cons) but "new_d" has only one row. How can the function identify for which variable this vector represents deterministic terms?
What if, for example I wanted to provide 10 new datapoints for "income", while predicting the other two variables?
What if I have data for both cons and income, for example? How would I have to change the argument "new_d" in this case? I hope my understanding is not too wrong.
Thank you very much for your help!

summary function for TVP-VECM

When working with TVP-VECMs the summary method for class bvec gives Error in x[[jj]][iseq] <- vjj : replacement has length zero.

Example of TVP-VEC usage

Hello Franz, I appreciate the effort you put into your work. Could you please provide me with an example of how to use your package to run TVP-VEC type models? In case you don't have an example, can you guide me to the .R file which contains the call for the TVP-VEC model? Perhaps I can work on it from there. Thank you for all your hard work!

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.