Balke(2000) Threshold VAR
Re: Balke(2000) Threshold VAR
Hi, Tom,
I got the upper and lower regime covariance\correlation matrices. I want to put it in my paper to demonstrate regime difference. However, almost all covariance pair show zeors, which does not show regime-distinctive enough. Does that look acceptable? Or, how can I increase the decimals in the matrices ?
Thank you,
J
I got the upper and lower regime covariance\correlation matrices. I want to put it in my paper to demonstrate regime difference. However, almost all covariance pair show zeors, which does not show regime-distinctive enough. Does that look acceptable? Or, how can I increase the decimals in the matrices ?
Thank you,
J
- Attachments
-
- tvar_vcv.JPG (120.35 KiB) Viewed 22407 times
Re: Balke(2000) Threshold VAR
If you're using logged variables, the simplest solution is to switch to 100*log's which will shift the scale on the variances by 10^4. However, you can reformat the existing numbers by using Window-Report Windows to reload the report, and then View-Change Layout.
Re: Balke(2000) Threshold VAR
Dear TomDoan
I have a question. Let say I take V as my threshold variable, since its level has a unit root, I decide to take first difference of V, as denoted by DV. I then take the absolute value of DV and name it as AV.
In this case, the threshold variable is in fact AV, but the variable that should enter the VAR model is DV.
So I just replace the threshold variable 'credit' as 'AV' in your tvar_estimate.rpf and tvar_irf.rpf, but for the VAR system, I put DV as dependent variable.
Is that all I need to do? Will I run into any potential problem for doing so?
Thanks.
I have a question. Let say I take V as my threshold variable, since its level has a unit root, I decide to take first difference of V, as denoted by DV. I then take the absolute value of DV and name it as AV.
In this case, the threshold variable is in fact AV, but the variable that should enter the VAR model is DV.
So I just replace the threshold variable 'credit' as 'AV' in your tvar_estimate.rpf and tvar_irf.rpf, but for the VAR system, I put DV as dependent variable.
Is that all I need to do? Will I run into any potential problem for doing so?
Thanks.
Re: Balke(2000) Threshold VAR
I'm a bit confused. The threshold variable should be whatever you think triggers the change in regime---if it has a unit root, it has a unit root. The estimation itself only requires that you are able to compute the threshold variable so in that sense it doesn't matter how it relates to the actual data. Where that matters is when try to do impulse responses since that has to include an identity for defining the threshold based upon the simulated data.
Re: Balke(2000) Threshold VAR
Hi, Tom,
I got another question about Covariance\Correlation Matrix. I'm not sure whether what I got looks right. I have five series in percent. After estimation, their vcv in upper, lower and linear,regimes:
Does it seem right in terms of magnitudes?
Thank you,
J
I got another question about Covariance\Correlation Matrix. I'm not sure whether what I got looks right. I have five series in percent. After estimation, their vcv in upper, lower and linear,regimes:
Does it seem right in terms of magnitudes?
Thank you,
J
Re: Balke(2000) Threshold VAR
Obviously a .00004 correlation is really small, but if you look at all three correlations for that pair, they're effectively zero so it may be a bit of a fluke, but isn't unreasonable.
Re: Balke(2000) Threshold VAR
Thank you. Is the "7014" co-variance/variance ok?TomDoan wrote:Obviously a .00004 correlation is really small, but if you look at all three correlations for that pair, they're effectively zero so it may be a bit of a fluke, but isn't unreasonable.
Re: Balke(2000) Threshold VAR
Why wouldn't it be? This is your model and your data---it looks like a noisy series and the three values for that 1st variable variance are all relatively similar, so I'm not sure what you think is the problem.
Re: Balke(2000) Threshold VAR
Thanks. It's just too large. But I think the calculation is right.(It's real oil return. )TomDoan wrote:Why wouldn't it be? This is your model and your data---it looks like a noisy series and the three values for that 1st variable variance are all relatively similar, so I'm not sure what you think is the problem.
Re: Balke(2000) Threshold VAR
Dear tom,
my modified nonlinear impulse response of Balke(2000) runs OK,but i find the IRFs lacks of confidence interval, so i wonder if there is a way to construct the confidence interval or regarding code?
Best Regards,
Zhuorui YI
my modified nonlinear impulse response of Balke(2000) runs OK,but i find the IRFs lacks of confidence interval, so i wonder if there is a way to construct the confidence interval or regarding code?
Best Regards,
Zhuorui YI
Re: Balke(2000) Threshold VAR
The IRF's themselves are generated as the mean of a double bootstrap. I haven't seen anyone describe how to do confidence bands on those.
Re: Balke(2000) Threshold VAR
Dear tom,
i am confused about the following code:
set fiddlef = %ran(1.0)
do i=1,%nvar
set fiddled(i) = fiddlef*u(i)
end do i
why do you multiply fiddlef by u(i)?
thanks
i am confused about the following code:
set fiddlef = %ran(1.0)
do i=1,%nvar
set fiddled(i) = fiddlef*u(i)
end do i
why do you multiply fiddlef by u(i)?
thanks
Re: Balke(2000) Threshold VAR
That's part of the fixed regressor bootstrap. If you want to understand that better, you'll have to read Hansen's paper or get the 2nd edition of the Structural Breaks and Switching Models course, which covers that.
Re: Balke(2000) Threshold VAR
Dear Tom,
I have two questions related to the Balke IRF code:
First:
what does the "&" infromt of the loop index ("i") within the following loop do?
do i=1,nvar
frml tvarf(i) depvars(i) = %if(thrfrml{d}>thresh,$
fitud(&i,1)+%dot(%xrow(sup,&i),bootres),$
fitud(&i,2)+%dot(%xrow(sdn,&i),bootres))
end do i
Second:
Within the bootstrap, when the residals are drawn from their empirical distribution (gset bootuv wstart wend = %if(%ranflip(.5),+1,-1)*stdu(rentries(t))), why do we need this factor %if(%ranflip(.5),+1,-1)? It draws from a binominal a 1 or a -1 both with probability 0.5. Why do we need this random sign flip of the residual draws?
Thanks
Best Jules
I have two questions related to the Balke IRF code:
First:
what does the "&" infromt of the loop index ("i") within the following loop do?
do i=1,nvar
frml tvarf(i) depvars(i) = %if(thrfrml{d}>thresh,$
fitud(&i,1)+%dot(%xrow(sup,&i),bootres),$
fitud(&i,2)+%dot(%xrow(sdn,&i),bootres))
end do i
Second:
Within the bootstrap, when the residals are drawn from their empirical distribution (gset bootuv wstart wend = %if(%ranflip(.5),+1,-1)*stdu(rentries(t))), why do we need this factor %if(%ranflip(.5),+1,-1)? It draws from a binominal a 1 or a -1 both with probability 0.5. Why do we need this random sign flip of the residual draws?
Thanks
Best Jules
Re: Balke(2000) Threshold VAR
See Defining FRML's in a loop. It forces the I references to be resolved immediately, while the FRML's are being defined.Jules89 wrote:Dear Tom,
I have two questions related to the Balke IRF code:
First:
what does the "&" infromt of the loop index ("i") within the following loop do?
do i=1,nvar
frml tvarf(i) depvars(i) = %if(thrfrml{d}>thresh,$
fitud(&i,1)+%dot(%xrow(sup,&i),bootres),$
fitud(&i,2)+%dot(%xrow(sdn,&i),bootres))
end do i
We don't need to do the random sign flip. That's a simple case of a wild bootstrap, which adjusts the raw residuals to produce a set which has particular properties---symmetry in this case.Jules89 wrote: Second:
Within the bootstrap, when the residals are drawn from their empirical distribution (gset bootuv wstart wend = %if(%ranflip(.5),+1,-1)*stdu(rentries(t))), why do we need this factor %if(%ranflip(.5),+1,-1)? It draws from a binominal a 1 or a -1 both with probability 0.5. Why do we need this random sign flip of the residual draws?