Page 1 of 9

Threshold Structural VAR

Posted: Mon Apr 04, 2016 7:51 pm
by dakila
This thread is about the thsvar add-in that estimates threshold structural VAR.

Re: Threshold Structural VAR

Posted: Tue Apr 05, 2016 6:32 am
by trubador
Another necessary and useful add-in. Thank you very much for the effort and sharing.

Re: Threshold Structural VAR

Posted: Mon Apr 25, 2016 7:59 am
by Tarieg
Hi,

I installed the THSVAR add-in (I also installed TVAR, R, Statconn which work fine) on Eviews 7, but when I run it I receive the following error message:
"error 105 in encrypted program"

Any idea on what could be the problem ?


Thanks for your help

Re: Threshold Structural VAR

Posted: Mon Apr 25, 2016 4:53 pm
by dakila
Maybe you should upgrade your eviews.

Re: Threshold Structural VAR

Posted: Mon Apr 25, 2016 6:02 pm
by Tarieg
Thanks for your assistance,

which version would you recommend, is the latest one truly needed to run this add-in ?

Re: Threshold Structural VAR

Posted: Mon Apr 25, 2016 6:11 pm
by dakila
version 9

Re: Threshold Structural VAR

Posted: Tue May 10, 2016 11:31 am
by NielsJM
Hello,

Quick question. I see you replied to some TVAR discussions that this TVAR add-in does not necessarily have to be used any longer. But can a TVAR actually be estimated with this THSVAR? I mean, a VAR and a SVAR do impose somewhat different restrictions in the details. I ask, because I too am now having this error with R and for efficiency's sake am wondering whether it is worth-wile to alleviate this problem.

Thanks,

Niels

Edit: Silly me, I should really learn to read the documentation first. This is a method based on Balke's (2000) paper, so in that respect I am fine.

Re: Threshold Structural VAR

Posted: Sun May 29, 2016 9:07 pm
by vicdell37
dakila wrote:This thread is about the thsvar add-in that estimates threshold structural VAR.


Thanks a lot for the useful add-in. I noticed that the add-in can be implemented either using the dialog box or the command line. If one opted to use the command line, may I know the default values of the options that the user would leave unspecified. For example, using the command line the user may choose not to specify the degrees of freedom adjustment and the length of moving average? In the example provided in the add-in, the degrees of freedom adjustment using the dialog box is 3? What was the formula used? Thank you.

Vic

Re: Threshold Structural VAR

Posted: Tue May 31, 2016 2:50 am
by dakila
the default values
- number of bootstrap = 50
- number of horizons = 20 if data is quarterly (60 if data is monthly)
- length of moving average = 2
- delay parameter = 1
- fraction of buffer period = 0.15
- degrees of freedom adjustment = 0
- sample size = the workfile size
- generalized impulse response = 0

The degrees of freedom adjustment is used to compute the number of threshold of values excluded at the beginning and the end of sample.
The formulae: b = ob*(end-start+1)+nvar-dfa
- ob = fraction of buffer period
- start = start of sample
- end = end of sample
- nvar = number of variable
- dfa = degrees of freedom

Re: Threshold Structural VAR

Posted: Sat Jun 18, 2016 6:59 am
by monsreyleak
Dear,

Thanks for the useful add-in. Anyway, I have problem when running the threshold VAR. I got the error message "near singular matrix". May I know how to solve this problem?

Another question, can I use threshold VAR with panel data? if so, how?

Thanks in advanced. I am really getting stuck with these!! really need your help.

Best,

Sreyleak

Re: Threshold Structural VAR

Posted: Sun Jun 19, 2016 1:03 am
by dakila
You should select your variables carefully.
For panel data, it won't work.

Re: Threshold Structural VAR

Posted: Thu Jul 14, 2016 1:23 pm
by jwojnilower
Hello,

While trying to run the THSVAR program I received the following error message: "Invalid (or out of range) coefficient or matrix index 0."

I'm trying to run a VAR with the following five variables: rgdp_growth, inflation, fedfunds, baa_gs10, and assetsgr. The threshold variable is baa_gs10_ma.

I've tried various combinations of the variables along with different sample periods and options but cannot produce the impulse response functions.

Any help is greatly appreciated. Thanks in advance!

Re: Threshold Structural VAR

Posted: Thu Jul 14, 2016 11:59 pm
by dakila
Hello,

First of all, there are some problems with your workfile. It is undated and linked.
1. You should change sample (1.proc- 2.structure/resize current page... on the menu)
For example, I guess your data is time series, quarterly, and starts with 1954q4.
2. You should make the workfile unlinked. (click on the manage button when you open the workfile)

The main problem is your threshold variable is exogenous. Have you read Balke's paper?
For instance, change baa_gs10_ma to baa_gs10.

After all these changes, e.g. the following command works for me.
thsvar(girf=1, sample="1959q1 2014q4") 2 baa_gs10 rgdp_growth @ rgdp_growth inflation fedfunds baa_gs10 assetsgr

Re: Threshold Structural VAR

Posted: Fri Jul 15, 2016 8:24 am
by jwojnilower
Thank you for the suggestions! I made the recommended changes and the program is now working.

For my current research it also might be useful to try and create figures similar to Figures 3 and 4 in the Balke (2000) paper. Do you have any suggestions for determining the probability of a regime change or the change in forecast as a result of shocks using the results obtained from your program?

Thanks again!

Re: Threshold Structural VAR

Posted: Sat Jul 16, 2016 8:56 pm
by dakila
Sorry, No time to replicate these figures.