Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

tvarGIRF with external variable threshold in TVAR #8

Open
ninowski opened this issue Sep 30, 2022 · 0 comments
Open

tvarGIRF with external variable threshold in TVAR #8

ninowski opened this issue Sep 30, 2022 · 0 comments

Comments

@ninowski
Copy link

I want to estimate a TVAR with a threshold external to the model.
I cannot get the state-dependent GIRFs and the relative confidence interval. Specifically, I would like to get confidence bound from the empirical distribution of simulated GIRFs, assuming normality.

I run the below code:

data(zeroyld)
x=rnorm(482)
xx=as.vector(x)
xx=as.vector(x,mode="any")
t5<-TVAR(zeroyld, lag=3, nthresh=1, thDelay=1, thVar=xx, gamma=0.248, trim=0.1, mTh=2, plot=FALSE)
library(tvarGIRF)

c1=GIRF(t5, c(0,1),restrict.to=1)

I get an error: c1=GIRF(t5, c(0,1),restrict.to=1)
Error: Simulations of models with external transition variables (argument thVar in TVAR) not supported

So i detach the package tvarGIRF and I calculate the GIRF with GIRF {tsDyn}.
detach("package:tvarGIRF", unload = TRUE)

c2<-GIRF(t5)
A<-plot(c2,
plot_type = c( "line"),
n.ahead = c(1, 5, 10),
var = unique(c2$var)[1],
n_simu = c(50))

This command works but I can not obtain the state-dependent GIRF and the relative confidence intervals.

Thank you in advance,
Antonino

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant