kthohr / bmr Goto Github PK
View Code? Open in Web Editor NEWBayesian Macroeconometrics in R
Home Page: https://www.kthohr.com/bmr.html
License: GNU General Public License v2.0
Bayesian Macroeconometrics in R
Home Page: https://www.kthohr.com/bmr.html
License: GNU General Public License v2.0
Hi!
I'm having a little trouble trying to install the package. I get the following error:
I have Rtools version 3.5.0.4 installed and it seems to be working fine. Also, I'm using Windows 10 and R 3.5. What would you recommend me to do?
Thank you in advance!
Dear author!
I am trying to deal with your package. I have some experience with Dynare. Your package, as I understand it, is an analogue of Dynare for R. I ask for your help. Problems arose with MCMC:
obj$estim_mcmc(x,50,100,100)
Error in doTryCatch(return(expr), name, parentenv, handler) :
object 'tryCatchList' not found
3 arguments passed to 'length' which requires 1Warning: stack imbalance in '<-', 90 then 30
Error: no function to return from, jumping to top level
Error during wrapup: not a BUILTIN function
Error during wrapup: bad value
Hi,
Can you say how to obtain parameter estimates and standard errors at the posterior mode for dsge var? I used the package in your old version and now i need to actualize my estimates.
I have been trying to install the"BMR" package, but unfortunately, I failed. I received this statement:
Skipping install of 'BMR' from a github remote, the SHA1 (33c0fbb) has not changed since last install.
Use force = TRUE
to force installation.
Please, any help will be really appreciated.
Why function DSGEVAR is not working anymore?
Hi,
How do I get the percentiles c(0.05,0.32,0.5,0.68,0.95) in the forecast function, i.e 4 confidence bands along with the median here.
Apparently it just gives me 4 columns with the last column being the index number.
I believe it just computes the 5th, Mean and 95th percentile.
Is there a way to get all the bands at once.
Thanks
Hello,
I was trying to install BMR via RStudio on Ubuntu using the devtools package. It was able to install BMR but found an error while performing a load check. I am pasting the error I recieved below.
** testing if installed package can be loaded
Error in dyn.load(file, DLLpath = DLLpath, ...) :
unable to load shared object '/home/ron/R-dev/BMR/libs/BMR.so':
/home/ron/R-dev/BMR/libs/BMR.so: undefined symbol: zgesdd_
Error: loading failed
Execution halted
ERROR: loading failed
I am not sure if this is a problem specific to me, or a general issue. I am just gettng started with DSGE on R and any help will be appreciated.
I hope that I do not bother you. Thank you so much for this wonderful package. I really want to use the IRF function, could you please explain how can I compute it or mention to a good a reference? also what does (horizon) mean in the IRF plot?
Thanks in advance.
Hi,
I have a problem with installing BMR since R gives me this error all the time:
Warning message:
In i.p(...) :
installation of package ‘C:/Users/Patrik/AppData/Local/Temp/RtmpC8TKZC/file1ca861d077e/BMR_0.11.0.tar.gz’ had a non-zero exit status
I have tried many methods such as:
Deleting and installing R
Using next commands:
Sys.setenv(RREMOTES_STANDALONE="true")
Sys.setenv(R_REMOTES_NO_ERRORS_FROM_WARNINGS="true")
Sys.setenv(R_CHECK_FORCE_SUGGESTS="false")
&
install_github("kthohr/BMR")
devtools::install_github("kthohr/BMR", INSTALL_opts="--no-multiarch")
install_github("kthohr/BMR",force=TRUE)
but I always get that mentioned error.
Console:
Downloading GitHub repo kthohr/BMR@HEAD
Running R CMD build
...
** help
*** installing help indices
converting help for package 'BMR'
finding HTML links ... done
BMR-package html
BMRLSData html
BMRMCData html
BMRVARData html
IRF html
bvarm html
bvars html
bvartvp html
bvarw html
cvar html
dsge html
finding level-2 HTML links ... done
Rd warning: C:/Users/Patrik/AppData/Local/Temp/RtmpcRxBjf/R.INSTALL96021997642/BMR/man/dsge.Rd:26: missing link 'forecast.dsge'
Rd warning: C:/Users/Patrik/AppData/Local/Temp/RtmpcRxBjf/R.INSTALL96021997642/BMR/man/dsge.Rd:26: missing link 'IRF.dsge'
Rd warning: C:/Users/Patrik/AppData/Local/Temp/RtmpcRxBjf/R.INSTALL96021997642/BMR/man/dsge.Rd:26: missing link 'plot.dsge'
Rd warning: C:/Users/Patrik/AppData/Local/Temp/RtmpcRxBjf/R.INSTALL96021997642/BMR/man/dsge.Rd:26: missing link 'states.dsge'
dsgevar html
Rd warning: C:/Users/Patrik/AppData/Local/Temp/RtmpcRxBjf/R.INSTALL96021997642/BMR/man/dsgevar.Rd:26: missing link 'forecast.dsgevar'
Rd warning: C:/Users/Patrik/AppData/Local/Temp/RtmpcRxBjf/R.INSTALL96021997642/BMR/man/dsgevar.Rd:26: missing link 'IRF.dsgevar'
Rd warning: C:/Users/Patrik/AppData/Local/Temp/RtmpcRxBjf/R.INSTALL96021997642/BMR/man/dsgevar.Rd:26: missing link 'plot.dsgevar'
Rd warning: C:/Users/Patrik/AppData/Local/Temp/RtmpcRxBjf/R.INSTALL96021997642/BMR/man/dsgevar.Rd:26: missing link 'states.dsgevar'
forecast html
gensys html
Rd warning: C:/Users/Patrik/AppData/Local/Temp/RtmpcRxBjf/R.INSTALL96021997642/BMR/man/gensys.Rd:57: missing link 'DSGESim'
gtsplot html
mode_check html
plot html
prior html
states html
uhlig html
Rd warning: C:/Users/Patrik/AppData/Local/Temp/RtmpcRxBjf/R.INSTALL96021997642/BMR/man/uhlig.Rd:57: missing link 'DSGESim'
** building package indices
Goodbye at Mon Nov 16 12:35:40 2020
** testing if installed package can be loaded from temporary location
Goodbye at Mon Nov 16 12:35:44 2020
Warning in file.rename(instdir, final_instdir) :
cannot rename file 'C:/Program Files/R/R-4.0.3/library/00LOCK-BMR/00new/BMR' to 'C:/Program Files/R/R-4.0.3/library/BMR', reason 'Access is denied'
ERROR: moving to final location failed
I would appreciate it if someone is willing to help. Thanks in forward.
install_github("kthohr/BMR")
Downloading GitHub repo kthohr/BMR@master
✔ checking for file ‘/private/var/folders/ml/hg1rbdqd39b2vhlzm0pn91yw0000gn/T/RtmpEjvhbA/remotes2c4e748d0efd/kthohr-BMR-63565cd/DESCRIPTION’ ...
─ preparing ‘BMR’:
✔ checking DESCRIPTION meta-information ...
─ cleaning src
─ running ‘cleanup’
─ checking for LF line-endings in source and make files and shell scripts
─ checking for empty or unneeded directories
─ looking to see if a ‘data/datalist’ file should be added
─ building ‘BMR_0.11.0.tar.gz’
Installing package into ‘/Users/ronanalexand/Library/R/3.5/library’
(as ‘lib’ is unspecified)
Some questions, which aren't answered by the vignette: What is the difference between:
$MeanForecast and $PointForecast (The MeanForecast is itself a point forecast)? What are the dimensions of the $Forecasts?
I was trying to replicate one of the DSGE-VAR examples - nkm_dsge.VAR one - and in the line that estimates the model using mcmc the R session just aborts. I could capture the following error:
Error in missing(finally) : non-numeric argument to binary operator Error: no more error handlers available (recursive errors?); invoking 'abort' restart Error: no more error handlers available (recursive errors?); invoking 'abort' restart Error in missing(finally) : non-numeric argument to binary operator 'missing' can only be used for arguments Warning: stack imbalance in 'rbind', 31 then 40
I tried to use a garbage collector to see if it was any memory issues but i didn't work. I tried to look into the code but I don't know to use C++. Not only that, I got kinda different erros when I rerun the example
Warning: stack imbalance in 'rbind', 75 then 59 Warning: stack imbalance in 'cbind', 60 then 62 Error: no more error handlers available (recursive errors?); invoking 'abort' restart Error: no more error handlers available (recursive errors?); invoking 'abort' restart Error in doTryCatch(return(expr), name, parentenv, handler) : bad value Warning: stack imbalance in 'rbind', 73 then -11
If someone could help I would appreciate a lot, I am liking a lot this library.
Hello, Mr O'Hara!
First and foremost let me thank you for the package which I found to be the most useful tool when creating BVARs in R. What I'm curious about is how does the package calculate alpha_pt_mean. I thought it has to be the mean of all draws from the Gibbs sampling procedure, but when I apply bvar_obj$gibbs(1), thus yielding a single beta_draw which is the mean of itself, it does not equal to alpha_pt_means. Are those numbers being estimated via analytical approach?
Just in case, the example is as follows
data(BMRVARData)
bvar_data <- data.matrix(USMacroData[,2:4])
coef_prior <- c(0.9,0.9,0.9)
bvar_obj <- new(bvarm)
bvar_obj$build(bvar_data,TRUE,4)
bvar_obj$prior(coef_prior,1,1,0.5,0.5,100.0,1.0)
bvar_obj$gibbs(1)
bvar_obj$beta_draws
matrix(bvar_obj$alpha_pt_mean,ncol=3)
Thank you in advance!
Dear Hohr, I install BMR by the following commands, and 'Lapack-3.5.0' has been compiled,
'>library(devtools)
>install_github("kthohr/BMR")
installing to /usr/local/lib/R/site-library/BMR/libs
** R
** data
** preparing package for lazy loading
** help
*** installing help indices
** building package indices
** testing if installed package can be loaded
Error in dyn.load(file, DLLpath = DLLpath, ...) :
unable to load shared object '/usr/local/lib/R/site-library/BMR/libs/BMR.so':
/usr/local/lib/R/site-library/BMR/libs/BMR.so: undefined symbol: zgesdd_
Error: loading failed
Execution halted
ERROR: loading failed
I have already read the closed previous issues, and know need to add a new file Makevar in BMR/src with the content " PKG_LIBS = $(R_HOME)/bin/Rscript -e "Rcpp:::LdFlags()"
But I do not know how to finish it.
I download from the github, and add the Makevar file to BMR/src, and tar the files as BMR.tar.gz.
and use R CMD INSTALL BMR.tar.gz to install. However, it does not work.
How should I do to accomplish it, and could you give a cookbook method. Thanks
My codes are as follows:
bvar_obj <- new(bvarm)
bvar_obj$build(data,TRUE,20)
bvar_obj$prior(c(0.5,0.5))
bvar_obj$gibbs(10000)
#Create the plot with R code
IRF.Rcpp_bvarm(bvar_obj, 20, var_names = colnames(data), save = FALSE)
Then I get some plots like that:
My question is when I get the response pulse plots, where could I find the values of estimate and variance of these plots?
Hello,
I am trying to get the draws of factors that form the distribution, using which I plan to take mean/median later on. I tried running: "bvar_obj$beta_draws". But, I am not able to print/export the full data/matrix.
Is this 'beta_draws' the correct place where draws are stored? And is there any way I can export the matrix/table without printing? Because the matrix will be huge.
Request you to please help.
Thanks in advance!
This would be really useful for our work in analysing power demand
Sorry I'm inexperienced in R.
Some functions are not working, for example, stationarity, gacf, gpacf, etc. Please, could you help me?
Hi..Could you tell me how to get the confidence interval series from the forecast object for the BVARM model. The forecast object has the following arrays: MeanForecast, PointForecast and Forecasts. Could you tell me what does this last array represent?
Hi
There is no BVARS, BVARM function in the new script. Which function is used to estimate the posterior of the parameters for Bayesian VAR model?
Thanks for helping!
yours,
weiwei
When i install the BMR package i get:
Warning: this package has a non-empty 'configure.win' file, so building only the main architecture.
When i later install a package that depend upon BMR i get the error
Error : package 'BMR' is not installed for 'arch = i386'
Platform: Windows 10
R-version: 3.4.2
Hi,
I am estimating a BVARM model using 4 vars and 9 lags.
I need to determine the estimated covariance matrix. For the above e.g, its dimension should be 3636.
Currently the model only has the prior covariance matrix (dimension: 144144) .
Is there a way to obtain the estimated covariance matrix.
Thanks
Since upgrading from R 3.5.1 to 3.5.2, the installation of BMR fails on Windows with the following message
Error: (converted from warning) this package has a non-empty 'configure.win' file,
so building only the main architecture
You can avoid the warning error conversion by setting R_REMOTES_NO_ERRORS_FROM_WARNINGS=true
,
with the following command
Sys.setenv(R_REMOTES_NO_ERRORS_FROM_WARNINGS="true")
I just had some trouble with that and I thought to mention that. Maybe you can include some further instructions to the installation section in README.
Hi!
I had to reinstall R and all packages. I've tried to install BMR as instructed, but I keep getting error messages (I've installed the package in other R versions before without any problems. I'm using Windows). I've tried a few suggestions from here, but nothing worked:
Downloading GitHub repo kthohr/BMR@master
checking for file 'C:\Users\Patricia\AppData\Local\Temp\RtmpmIAjei\remotes342853457398\kthohr-BMR-63565cd/DESCRIPTION' ...
checking for file 'C:\Users\Patricia\AppData\Local\Temp\RtmpmIAjei\remotes342853457398\kthohr-BMR-63565cd/DESCRIPTION' ...
√ checking for file 'C:\Users\Patricia\AppData\Local\Temp\RtmpmIAjei\remotes342853457398\kthohr-BMR-63565cd/DESCRIPTION'
I've tried a few sugestions from closed issues like install_github("kthohr/BMR", INSTALL_opts="--no-multiarch") and also install_github("kthohr/BMR",force=TRUE)
Thanks in advance
clang++ -I/Library/Frameworks/R.framework/Resources/include -DNDEBUG -std=gnu++11 -fopenmp -DARMA_USE_OPENMP -DUSE_RCPP_ARMADILLO -DARMA_NO_DEBUG -DSTATS_GO_INLINE -I./modules -I./bmlib/include -I./bmlib/include/mcmc -I./bmlib/include/optim -I"/Library/Frameworks/R.framework/Versions/3.4/Resources/library/Rcpp/include" -I"/Library/Frameworks/R.framework/Versions/3.4/Resources/library/RcppArmadillo/include" -I/usr/local/include -fPIC -Wall -g -O2 -c bmlib/src/optim/line_search/more_thuente.cpp -o bmlib/src/optim/line_search/more_thuente.o
clang: error: unsupported option '-fopenmp'
make: *** [bmlib/src/optim/line_search/more_thuente.o] Error 1
ERROR: compilation failed for package ‘BMR’
Hi,
Could you help me out as I can not install bmr package? I get this warning:
C:/Program Files/Rtools/mingw_64/bin/g++ -I"C:/PROGRA1/R/R-341.3/include" -DNDEBUG -std=gnu++11 -fopenmp -DUSE_RCPP_ARMADILLO -DARMA_NO_DEBUG -DSTATSLIB_GO_INLINE -I./modules -I./bmlib/include -I./bmlib/include/mcmc -I./bmlib/include/optim -I"C:/Users/hp/Documents/R/win-library/3.4/Rcpp/include" -I"C:/Users/hp/Documents/R/win-library/3.4/RcppArmadillo/include" -O2 -Wall -mtune=generic -c bmlib/src/optim/unconstrained/de.cpp -o bmlib/src/optim/unconstrained/de.o
C:/Program: not found
make: *** [bmlib/src/optim/unconstrained/de.o] Error 127
followed by: running command 'make -f "Makevars.win" -f "C:/PROGRA1/R/R-341.3/etc/x64/Makeconf" -f "C:/PROGRA1/R/R-341.3/share/make/winshlib.mk" SHLIB="BMR.dll" WIN=64 TCLBIN=64 OBJECTS=""' has received status 2.
What should I do in order to fix it?
Dear All,
I am trying to install the BMR package, and have been following the instructions detailed on this website: http://bayes.squarespace.com/bmr/ .I installed the three packages, and then devtools (after downloading and installing rtools 3.3) and then gave the command install_github("kthohr/BMR")
. When I did I got the following output:
Downloading GitHub repo kthohr/BMR@master
Installing BMR
Installing 13 packages: dichromat, doParallel, foreach, ggplot2, gtable, iterators, labeling, munsell, plyr, RColorBrewer, RcppArmadillo, reshape2, scales
package ‘dichromat’ successfully unpacked and MD5 sums checked
package ‘doParallel’ successfully unpacked and MD5 sums checked
package ‘foreach’ successfully unpacked and MD5 sums checked
package ‘ggplot2’ successfully unpacked and MD5 sums checked
package ‘gtable’ successfully unpacked and MD5 sums checked
package ‘iterators’ successfully unpacked and MD5 sums checked
package ‘labeling’ successfully unpacked and MD5 sums checked
package ‘munsell’ successfully unpacked and MD5 sums checked
package ‘plyr’ successfully unpacked and MD5 sums checked
package ‘RColorBrewer’ successfully unpacked and MD5 sums checked
package ‘RcppArmadillo’ successfully unpacked and MD5 sums checked
package ‘reshape2’ successfully unpacked and MD5 sums checked
package ‘scales’ successfully unpacked and MD5 sums checked
"C:/PROGRA~1/R/R-32~1.3/bin/x64/R" --no-site-file --no-environ --no-save --no-restore CMD INSTALL \
"C:/Users/EuanRitchie/AppData/Local/Temp/RtmpWCpOq3/devtools31144c7b1c77/kthohr-BMR-81c957c" --library="C:/Users/EuanRitchie/Documents/R/win-library/3.2" \
--install-tests
* installing *source* package 'BMR' ...
** libs
*** arch - i386
Warning: running command 'make -f "Makevars.win" -f "C:/PROGRA~1/R/R-32~1.3/etc/i386/Makeconf" -f "C:/PROGRA~1/R/R-32~1.3/share/make/winshlib.mk" SHLIB_LDFLAGS='$(SHLIB_CXXLDFLAGS)' SHLIB_LD='$(SHLIB_CXXLD)' SHLIB="BMR.dll" OBJECTS="adfc.o bvarmc.o bvarsc.o bvartvpc.o bvarwc.o cvarc.o dsgec.o dsgevarc.o"' had status 127
ERROR: compilation failed for package 'BMR'
* removing 'C:/Users/EuanRitchie/Documents/R/win-library/3.2/BMR'
Error: Command failed (1)`
I'd be hugely grateful any help. I'm relatively inexperience with R, and software in general, but this tool would be really useful (and I really appreciate it's creation!). I did see that there had been a problem with makevars
in Linux, but to clarify I am using Windows, and have R version 3.2.3. The other packages I have only just installed so I assume they are the latest.
Many thanks
Hi!
I am using the BMR package a bit and especially the Steady-State prior. From the paper by Mattias Villani I gather that it is useful to be able to set the prior variance per variable, to express a varying degree of how determined I am that a variable has a specific steady state.
This was however not possible in the package, but when I investigated the code I realized that it was not too advanced to add it. I have forked the repository and added this change, which can be seen here jonlachmann@e54e00b.
Is this something that would be interesting for you to get a pull request on?
Best regards Jon Lachmann
Hello, I was trying to install the package and got the following error on R-studio. Could you please help me how to solve the problem and install your package
Downloading GitHub repo kthohr/BMR@master
✓ checking for file 'C:\Users\Adr\AppData\Local\Temp\Rtmpiebq4u\remotes10c492b69cf\kthohr-BMR-63565cd/DESCRIPTION' (546ms)
─ preparing 'BMR': (4s)
✓ checking DESCRIPTION meta-information ...
─ cleaning src
─ checking for LF line-endings in source and make files and shell scripts (786ms)
─ checking for empty or unneeded directories (2s)
─ looking to see if a 'data/datalist' file should be added
─ building 'BMR_0.11.0.tar.gz'
Installing package into ‘C:/Users/Adr/Documents/R/win-library/3.6’(as ‘lib’ is unspecified)
Warning: S3 methods ‘modecheck.Rcpp_dsge_gensys’, ‘modecheck.Rcpp_dsgevar_gensys’ were declared in NAMESPACE but not found
How to get residuals over the time on TVP?
When installing, get the following error:
* installing *source* package ‘BMR’ ...
* checking LAPACK_LIBS: R-supplied partial LAPACK found
* gensys solver is not available
.
.
.
ld: warning: directory not found for option '-L/usr/local/lib/gcc/x86_64-apple-darwin13.0.0/4.8.2'
ld: library not found for -lgfortran
clang: error: linker command failed with exit code 1 (use -v to see invocation)
make: *** [BMR.so] Error 1
ERROR: compilation failed for package ‘BMR’
ERROR: Command failed (1)
help!
Hi, I am trying to replicate "6.1 Monte Carlo Study" in the BMR documentation. However, I do get an error: could not find function "BVARM".
I'm sure that I have properly installed the required packages. Could you please help?
6.1 Monte Carlo Study Example
data(BMRMCData)
testbvarm <- BVARM(bvarMCdata,c(0.5,0.5),p=2,constant=TRUE,irf.periods=20,
keep=10000,burnin=5000,VType=1,
HP1=0.5,HP2=0.5,HP3=10)
Hi and sorry to bother you again, is it possible to say that Minnesota prior is a special case from Normal-Inverse Wishart distribution as we are in the Minnesota prior just taking care of the parameters of the mean and the covariance matrix of the parameters of the VAR model?
Thanks in advance.
data(BMRVARData)
testbvarw <- bvarw(USMacroData[,2:4],c(0.9,0.95,0.95),p=4,constant=T,
irf.periods=20,keep=10000,burnin=5000,
XiBeta=4,XiSigma=1,gamma=4)
IRF(testbvarw,percentiles=c(0.05,0.5,0.95),save=FALSE)
After running the last code i am getting the following error. Similar error i am getting if trying to run IRF command in case bvarm. Any help in this regard is appreciable.
The error is
Error in UseMethod("IRF") :
no applicable method for 'IRF' applied to an object of class "c('Rcpp_bvarm', 'C++Object', 'envRefClass', '.environment', 'refClass', 'environment', 'refObject')"
whenever trying to solve a DSGE model using Uhlig's method... getting the following Error:
dsgetest <- uhlig(A,B,C,D,F,G,H,J,K,L,M,N)
Error in uhlig(A, B, C, D, F, G, H, J, K, L, M, N) :
could not find function "uhlig"
Is there a way to specify unit shocks for the impulse response function? Moreover, is there a way to identify via sign restrictions?
Thanks!
Hi Keith,
I am currently using the BVARW function for a study. There is a significant running time when I am estimating on a model with 204 obs, 6 lags and 5 vars. I am currently running this on a 4 core machine.
To compare the performance, I used the BVARW example provided in the vignette with one core . i.e
testbvarw <- BVARW(USMacroData[,2:4],cores=1,c(0.9,0.95,0.95),p=4,constant=T,irf.periods=20,
keep=10000,burnin=5000,XiBeta=4,XiSigma=1,gamma=NULL)
It takes 6 min to run. The run-time is significantly different from the one you have shown in the book which is roughly around 22 sec.
Could you tell me what could be the plausible cause for this difference.
Thanks
Setting the plot option to FALSE in the forecast() function doesn't suppress the plot generation. In the BVARM example, the following still creates plots:
forecasts <- forecast(bvar_obj,shocks=FALSE,var_names=colnames(USMacroData),back_data=10,save=FALSE, plot=FALSE)
Hi, I have problems installing BMR. Mac 10.14.4 Mojave
R version: 3.5.3
I get this error message:
-F/Library/Frameworks/R.framework/.. -framework R -Wl,-framework -Wl,CoreFoundation
/bin/sh: -fopenmp: command not found
make: [libBMR] Error 127 (ignored)
** R
** data
** byte-compile and prepare package for lazy loading
** help
*** installing help indices
** building package indices
** testing if installed package can be loaded
Error: package or namespace load failed for "BMR" in library.dynam (lib, package, package.lib):
shared object ‘BMR.so’ not found
Error: loading failed
Execution halted
ERROR: loading failed
Everything seems to work up to this point.
I use install_github("kthohr/BMR", force = TRUE)
Sorry, I'm really new to this.
Im trying to replicate your BVAR example...I was able to install BMR...but when I tried to run your BVAR example, my R session was aborted and has a fatal error....any help would be greatly appreciated.. Thanks.....Rolando
I'm using: R version 3.1.2 (2014-10-31) -- "Pumpkin Helmet" on Ubuntu 14.04
I have installed the latest versions of Rcpp, RcppArmadillo, ggplot2, and doSNOW
I use the following commands to do the install:
> library(devtools)
> install_github("BMR","kthohr")
and I get the following error:
Error in dyn.load(file, DLLpath = DLLpath, ...) :
unable to load shared object '/home/vapniks/R/x86_64-pc-linux-gnu-library/current_libs/BMR/libs/BMR.so':
/home/vapniks/R/x86_64-pc-linux-gnu-library/current_libs/BMR/libs/BMR.so: undefined symbol: zgesdd_
Error: loading failed
Execution halted
ERROR: loading failed
* removing ‘/home/vapniks/R/x86_64-pc-linux-gnu-library/current_libs/BMR’
Error: Command failed (1)
In addition: Warning message:
Username parameter is deprecated. Please use kthohr/BMR
Help!
Hi,
I have started playing with your package in order to forecast economic variables in a BVAR setting (much in the same way you do in your vignette). One problem I do find is that you only return the mean and percentile values for your forecasts. In order to fully compare forecasts, one would like to get the samples from the MCMC to do density forecast comparison.
Could your forecast methods include this option to return the draws? And perhaps also the n_draws/n_burnin of sampling to be done?
The package documentation for the BVAR with Normal-inverse-Wishart Prior is outdated. The package manual (help) refers to the class bvarw
. However, there is not such class anymore. Instead there are classes:
When attempting to install I'm getting an error:
* installing *source* package ‘BMR’ ...
** libs
g++ -I/usr/share/R/include -DNDEBUG -I"/home/will/R/x86_64-pc-linux-gnu-library/3.2/Rcpp/include" -I"/home/will/R/x86_64-pc-linux-gnu-library/3.2/RcppArmadillo/include" -fpic -g -O2 -fstack-protector --param=ssp-buffer-size=4 -Wformat -Werror=format-security -D_FORTIFY_SOURCE=2 -g -c adfc.cpp -o adfc.o
g++ -I/usr/share/R/include -DNDEBUG -I"/home/will/R/x86_64-pc-linux-gnu-library/3.2/Rcpp/include" -I"/home/will/R/x86_64-pc-linux-gnu-library/3.2/RcppArmadillo/include" -fpic -g -O2 -fstack-protector --param=ssp-buffer-size=4 -Wformat -Werror=format-security -D_FORTIFY_SOURCE=2 -g -c bvarmc.cpp -o bvarmc.o
g++ -I/usr/share/R/include -DNDEBUG -I"/home/will/R/x86_64-pc-linux-gnu-library/3.2/Rcpp/include" -I"/home/will/R/x86_64-pc-linux-gnu-library/3.2/RcppArmadillo/include" -fpic -g -O2 -fstack-protector --param=ssp-buffer-size=4 -Wformat -Werror=format-security -D_FORTIFY_SOURCE=2 -g -c bvarsc.cpp -o bvarsc.o
g++ -I/usr/share/R/include -DNDEBUG -I"/home/will/R/x86_64-pc-linux-gnu-library/3.2/Rcpp/include" -I"/home/will/R/x86_64-pc-linux-gnu-library/3.2/RcppArmadillo/include" -fpic -g -O2 -fstack-protector --param=ssp-buffer-size=4 -Wformat -Werror=format-security -D_FORTIFY_SOURCE=2 -g -c bvartvpc.cpp -o bvartvpc.o
g++ -I/usr/share/R/include -DNDEBUG -I"/home/will/R/x86_64-pc-linux-gnu-library/3.2/Rcpp/include" -I"/home/will/R/x86_64-pc-linux-gnu-library/3.2/RcppArmadillo/include" -fpic -g -O2 -fstack-protector --param=ssp-buffer-size=4 -Wformat -Werror=format-security -D_FORTIFY_SOURCE=2 -g -c bvarwc.cpp -o bvarwc.o
g++ -I/usr/share/R/include -DNDEBUG -I"/home/will/R/x86_64-pc-linux-gnu-library/3.2/Rcpp/include" -I"/home/will/R/x86_64-pc-linux-gnu-library/3.2/RcppArmadillo/include" -fpic -g -O2 -fstack-protector --param=ssp-buffer-size=4 -Wformat -Werror=format-security -D_FORTIFY_SOURCE=2 -g -c cvarc.cpp -o cvarc.o
g++ -I/usr/share/R/include -DNDEBUG -I"/home/will/R/x86_64-pc-linux-gnu-library/3.2/Rcpp/include" -I"/home/will/R/x86_64-pc-linux-gnu-library/3.2/RcppArmadillo/include" -fpic -g -O2 -fstack-protector --param=ssp-buffer-size=4 -Wformat -Werror=format-security -D_FORTIFY_SOURCE=2 -g -c dsgec.cpp -o dsgec.o
In file included from /home/will/R/x86_64-pc-linux-gnu-library/3.2/RcppArmadillo/include/armadillo:515:0,
from /home/will/R/x86_64-pc-linux-gnu-library/3.2/RcppArmadillo/include/RcppArmadilloForward.h:46,
from /home/will/R/x86_64-pc-linux-gnu-library/3.2/RcppArmadillo/include/RcppArmadillo.h:30,
from dsgec.h:22,
from dsgec.cpp:18:
/home/will/R/x86_64-pc-linux-gnu-library/3.2/RcppArmadillo/include/armadillo_bits/auxlib_meat.hpp: In instantiation of ‘static bool arma::auxlib::qz(arma::Mat<std::complex<_Tp> >&, arma::Mat<std::complex<_Tp> >&, arma::Mat<std::complex<_Tp> >&, arma::Mat<std::complex<_Tp> >&, const arma::Base<std::complex<_Tp>, T1>&, const arma::Base<std::complex<_Tp>, T2>&) [with T = double; T1 = arma::Mat<std::complex<double> >; T2 = arma::Mat<std::complex<double> >]’:
/home/will/R/x86_64-pc-linux-gnu-library/3.2/RcppArmadillo/include/armadillo_bits/fn_qz.hpp:38:82: required from ‘typename arma::enable_if2<arma::is_supported_blas_type<typename T1::elem_type>::value, bool>::result arma::qz(arma::Mat<typename T1::elem_type>&, arma::Mat<typename T1::elem_type>&, arma::Mat<typename T1::elem_type>&, arma::Mat<typename T1::elem_type>&, const arma::Base<typename T1::elem_type, T1>&, const arma::Base<typename T1::elem_type, T2>&) [with T1 = arma::Mat<std::complex<double> >; T2 = arma::Mat<std::complex<double> >; typename arma::enable_if2<arma::is_supported_blas_type<typename T1::elem_type>::value, bool>::result = bool; typename T1::elem_type = std::complex<double>; typename T1::elem_type = std::complex<double>]’
dsgec.cpp:416:46: required from here
/home/will/R/x86_64-pc-linux-gnu-library/3.2/RcppArmadillo/include/armadillo_bits/auxlib_meat.hpp:3814:7: error: no matching function for call to ‘cx_gges(char*, char*, char*, arma::blas_int*, arma::blas_int*, std::complex<double>*, arma::blas_int*, std::complex<double>*, arma::blas_int*, arma::blas_int*, std::complex<double>*, std::complex<double>*, std::complex<double>*, arma::blas_int*, std::complex<double>*, arma::blas_int*, std::complex<double>*, arma::blas_int*, double*, double*, arma::blas_int*)’
);
^
/home/will/R/x86_64-pc-linux-gnu-library/3.2/RcppArmadillo/include/armadillo_bits/auxlib_meat.hpp:3814:7: note: candidate is:
In file included from /home/will/R/x86_64-pc-linux-gnu-library/3.2/RcppArmadillo/include/armadillo:141:0,
from /home/will/R/x86_64-pc-linux-gnu-library/3.2/RcppArmadillo/include/RcppArmadilloForward.h:46,
from /home/will/R/x86_64-pc-linux-gnu-library/3.2/RcppArmadillo/include/RcppArmadillo.h:30,
from dsgec.h:22,
from dsgec.cpp:18:
/home/will/R/x86_64-pc-linux-gnu-library/3.2/RcppArmadillo/include/armadillo_bits/wrapper_lapack.hpp:897:3: note: template<class eT> void arma::lapack::cx_gges(char*, char*, char*, char*, arma::blas_int*, eT*, arma::blas_int*, eT*, arma::blas_int*, arma::blas_int*, eT*, eT*, eT*, arma::blas_int*, eT*, arma::blas_int*, eT*, arma::blas_int*, typename eT::value_type*, typename eT::value_type*, arma::blas_int*)
cx_gges
^
/home/will/R/x86_64-pc-linux-gnu-library/3.2/RcppArmadillo/include/armadillo_bits/wrapper_lapack.hpp:897:3: note: template argument deduction/substitution failed:
In file included from /home/will/R/x86_64-pc-linux-gnu-library/3.2/RcppArmadillo/include/armadillo:515:0,
from /home/will/R/x86_64-pc-linux-gnu-library/3.2/RcppArmadillo/include/RcppArmadilloForward.h:46,
from /home/will/R/x86_64-pc-linux-gnu-library/3.2/RcppArmadillo/include/RcppArmadillo.h:30,
from dsgec.h:22,
from dsgec.cpp:18:
/home/will/R/x86_64-pc-linux-gnu-library/3.2/RcppArmadillo/include/armadillo_bits/auxlib_meat.hpp:3814:7: note: cannot convert ‘& selctg’ (type ‘arma::blas_int* {aka int*}’) to type ‘char*’
);
^
make: *** [dsgec.o] Error 1
ERROR: compilation failed for package ‘BMR’
* removing ‘/home/will/R/x86_64-pc-linux-gnu-library/3.2/BMR’
Error: Command failed (1)
After looking around, I found that the selctg
variable being passed to lapack::gges
and lapack::cx_gges
in auxlib_meat.hpp is an integer, but lapack_wrapper.hpp wants characters instead. Unfortunately I don't know what kind of characters the lapack wrapper is looking for, so I don't know how to fix this myself.
IRF.Rcpp_bvartvp(bvar_obj, 20, which_irfs, var_names=colnames(USMacroData), save=T)
works.
IRF(bvar_obj, 20, which_irfs, var_names=colnames(USMacroData), save=T)
does not work. This is a bug, right?
Also, it seems there is a typo here in this code: whichirfs
instead of which_irfs
\method{IRF}{bvartvp}(obj,whichirfs=NULL,percentiles=c(.05,.50,.95),
save=FALSE,height=13,width=13,...)
Could this be causing IRF issues?
Anybody was able to get these graphs? IRF(bvar_obj, 20, which_irfs, var_names=colnames(USMacroData), save=T)
didn't help.
A declarative, efficient, and flexible JavaScript library for building user interfaces.
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google ❤️ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.