Threshold Structural VAR
Moderators: EViews Gareth, EViews Moderator, EViews Esther
Threshold Structural VAR
This thread is about the thsvar addin that estimates threshold structural VAR.
Re: Threshold Structural VAR
Another necessary and useful addin. Thank you very much for the effort and sharing.
Re: Threshold Structural VAR
Hi,
I installed the THSVAR addin (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
I installed the THSVAR addin (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
Maybe you should upgrade your eviews.
Re: Threshold Structural VAR
Thanks for your assistance,
which version would you recommend, is the latest one truly needed to run this addin ?
which version would you recommend, is the latest one truly needed to run this addin ?
Re: Threshold Structural VAR
Hello,
Quick question. I see you replied to some TVAR discussions that this TVAR addin 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 worthwile 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.
Quick question. I see you replied to some TVAR discussions that this TVAR addin 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 worthwile 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
dakila wrote:This thread is about the thsvar addin that estimates threshold structural VAR.
Thanks a lot for the useful addin. I noticed that the addin 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 addin, the degrees of freedom adjustment using the dialog box is 3? What was the formula used? Thank you.
Vic
Re: Threshold Structural VAR
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*(endstart+1)+nvardfa
 ob = fraction of buffer period
 start = start of sample
 end = end of sample
 nvar = number of variable
 dfa = degrees of freedom
 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*(endstart+1)+nvardfa
 ob = fraction of buffer period
 start = start of sample
 end = end of sample
 nvar = number of variable
 dfa = degrees of freedom

 Posts: 1
 Joined: Sat Jun 18, 2016 6:54 am
Re: Threshold Structural VAR
Dear,
Thanks for the useful addin. 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
Thanks for the useful addin. 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
You should select your variables carefully.
For panel data, it won't work.
For panel data, it won't work.

 Posts: 7
 Joined: Thu Jul 14, 2016 1:18 pm
Re: Threshold Structural VAR
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!
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 215 times
Re: Threshold Structural VAR
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
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

 Posts: 7
 Joined: Thu Jul 14, 2016 1:18 pm
Re: Threshold Structural VAR
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!
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
Sorry, No time to replicate these figures.
Who is online
Users browsing this forum: No registered users and 2 guests