Threshold Structural VAR

For questions about EViews Add-ins available from the EViews Add-ins webpage. Note each add-in available on our webpage will have its own individual thread.

Moderators: EViews Gareth, EViews Moderator, EViews Esther

dakila
Posts: 479
Joined: Tue Nov 24, 2015 4:57 pm

Threshold Structural VAR

Postby dakila » Mon Apr 04, 2016 7:51 pm

This thread is about the thsvar add-in that estimates threshold structural VAR.
Last edited by dakila on Sat Jan 05, 2019 3:01 pm, edited 2 times in total.

trubador
Did you use forum search?
Posts: 1518
Joined: Thu Nov 20, 2008 12:04 pm

Re: Threshold Structural VAR

Postby trubador » Tue Apr 05, 2016 6:32 am

Another necessary and useful add-in. Thank you very much for the effort and sharing.

Tarieg
Posts: 2
Joined: Mon Apr 25, 2016 7:48 am

Re: Threshold Structural VAR

Postby Tarieg » Mon Apr 25, 2016 7:59 am

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

dakila
Posts: 479
Joined: Tue Nov 24, 2015 4:57 pm

Re: Threshold Structural VAR

Postby dakila » Mon Apr 25, 2016 4:53 pm

Maybe you should upgrade your eviews.

Tarieg
Posts: 2
Joined: Mon Apr 25, 2016 7:48 am

Re: Threshold Structural VAR

Postby Tarieg » Mon Apr 25, 2016 6:02 pm

Thanks for your assistance,

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

dakila
Posts: 479
Joined: Tue Nov 24, 2015 4:57 pm

Re: Threshold Structural VAR

Postby dakila » Mon Apr 25, 2016 6:11 pm

version 9

NielsJM
Posts: 1
Joined: Tue May 10, 2016 11:17 am

Re: Threshold Structural VAR

Postby NielsJM » Tue May 10, 2016 11:31 am

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.

vicdell37
Posts: 1
Joined: Sun May 29, 2016 8:46 pm

Re: Threshold Structural VAR

Postby vicdell37 » Sun May 29, 2016 9:07 pm

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

dakila
Posts: 479
Joined: Tue Nov 24, 2015 4:57 pm

Re: Threshold Structural VAR

Postby dakila » Tue May 31, 2016 2:50 am

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

monsreyleak
Posts: 1
Joined: Sat Jun 18, 2016 6:54 am

Re: Threshold Structural VAR

Postby monsreyleak » Sat Jun 18, 2016 6:59 am

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

dakila
Posts: 479
Joined: Tue Nov 24, 2015 4:57 pm

Re: Threshold Structural VAR

Postby dakila » Sun Jun 19, 2016 1:03 am

You should select your variables carefully.
For panel data, it won't work.

jwojnilower
Posts: 7
Joined: Thu Jul 14, 2016 1:18 pm

Re: Threshold Structural VAR

Postby jwojnilower » Thu Jul 14, 2016 1:23 pm

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!
Attachments
credit tvar v5.wf1
(102.71 KiB) Downloaded 1072 times

dakila
Posts: 479
Joined: Tue Nov 24, 2015 4:57 pm

Re: Threshold Structural VAR

Postby dakila » Thu Jul 14, 2016 11:59 pm

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

jwojnilower
Posts: 7
Joined: Thu Jul 14, 2016 1:18 pm

Re: Threshold Structural VAR

Postby jwojnilower » Fri Jul 15, 2016 8:24 am

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!

dakila
Posts: 479
Joined: Tue Nov 24, 2015 4:57 pm

Re: Threshold Structural VAR

Postby dakila » Sat Jul 16, 2016 8:56 pm

Sorry, No time to replicate these figures.


Return to “Add-in Support”

Who is online

Users browsing this forum: No registered users and 9 guests