Page 1 of 1

SUR Gibbs sampling problem

Posted: Sat Feb 08, 2014 10:17 pm
by HypatiaCU
Hi,

I am working on a VECM and use Gibbs sampling to construct the confidence interval for the coefficients.

Firstly, I run the VECM. Then I identify non-significant coefficients. In the second step, I restrict the non-significant coefficients to be 0. So the VECM model becomes SUR. Afterwards, I run this SUR and use Gibbs sampling to calculate coefficients confidence interval.

My question is that I manually calculated the error correction term and put it into SUR as one independent variable. However, it is actually correlated with other variables; and in Gibbs sampling step I can't do correct draws without telling RATs it is correlated with other variables. Could I use VECM instead and restrict certain coefficients to be 0 then do Gibbs sampling? Or is there a method I could let RATs know variables in SUR have some relationship?

Code: Select all


*step 1 run VECM
EQUATION(COEFFS=||1||,NOCONSTANT) RISKPRE S
# FV
SYSTEM(MODEL=VECMRP)
VAR FV S
LAGS 1 to 2
DET CONSTANT
ECT RISKPRE
END(SYSTEM)
ESTIMATE(OUTSIGMA=SE, RESIDUALS=RESIDSECM, COEFFICIENTS=A)
*

*read results
*step 2 get rid off variables with non-significant coeff, estimate using SUR
DIFF FV / DFV
DIFF S / DS
*rp is the error correction term
SET RP = FV - S
*
*SUR
LINREG(NOPRINT, DEFINE=EQ1) DFV
# CONSTANT DFV{1}
LINREG(NOPRINT, DEFINE=EQ2) DS
# CONSTANT RP{1} DS{1}
SYSTEM EQ1 EQ2
END(SYSTEM)
SUR(NOPRINT, OUTSIGMA=V) 2
#EQ1; #EQ2

*step 3 Gibbs Sampling 
GROUP SHOCKS EQ1 EQ2
@SURGibbsSetup shocks
........



The problem in the SUR and Gibbs sampling is the variable 'RP'. In SUR, I have DS, DFV, RP, that the first two are first difference variables. Actually RP = FV - S. If I do Gibbs sampling the way I did here, RATs will consider 'RP' as an independent variable which is not correlated with DS and DFV. Would this affect my estimation? How could I fix this problem in RATs?

Thanks a lot.
Hypatia

Re: SUR Gibbs sampling problem

Posted: Sun Feb 09, 2014 9:17 am
by TomDoan
Gibbs sampling in a VECM is relatively straightforward if you assume the cointegrating vector is fixed. If you want to allow that to be unknown, it gets quite complicated as the cointegrating vector has a non-standard distribution. See Koop, Gonzalez, and Strachan(2009) for one possible solution to that.

Re: SUR Gibbs sampling problem

Posted: Mon Feb 17, 2014 8:23 am
by HypatiaCU
Thanks a lot.
Could I impose coefficient restrictions on VECM? Is there a command on doing that?

Re: SUR Gibbs sampling problem

Posted: Mon Feb 17, 2014 10:15 am
by TomDoan
HypatiaCU wrote:Thanks a lot.
Could I impose coefficient restrictions on VECM? Is there a command on doing that?
Which types of restrictions and at what point in the analysis? CATS is designed to do VECM's with restrictions.

Re: SUR Gibbs sampling problem

Posted: Mon Feb 17, 2014 10:46 am
by HypatiaCU
TomDoan wrote: Which types of restrictions and at what point in the analysis? CATS is designed to do VECM's with restrictions.
I would like to impose the non-significant coefficients in VECM to be zero. Is there a way to do it in RATs?
For example,

Code: Select all

*step 1 run VECM
EQUATION(COEFFS=||1||,NOCONSTANT) RISKPRE S
# FV
SYSTEM(MODEL=VECMRP)
VAR FV S
LAGS 1 to 2
DET CONSTANT
ECT RISKPRE
END(SYSTEM)
*
In this VECM, the first equation is DFV=beta1*DFV{1}+beta2*DS{1}+beta3*(error correction term){1}. I realize that the coefficient beta2 and beta3 are non-significant after I run this VECM. I would like to impose them to be zero and run VECM again. Then I want to do Gibbs sampling on this restricted VECM.

Thank you.

Re: SUR Gibbs sampling problem

Posted: Mon Feb 17, 2014 10:58 am
by TomDoan
Given the cointegrating vector, that's just a SUR. You have to define separate equations (since they all have different forms) and estimate with SUR and apply the SUR sampling scheme.

Re: SUR Gibbs sampling problem

Posted: Mon Feb 17, 2014 11:06 am
by HypatiaCU
Thank you. That is what I want to do initially:
I manually calculated the error correction term and put it into SUR. But I am worried that in gibbs sampling, it will be treated as independent variables. It is actually correlated with other inputs. Could I build a SUR notifying the relation between RP(error correction term=FV-S) and DFV,DS? Also preserve this relationship in Gibbs sampling? Here is how I build SUR:

Code: Select all

DFV=FV-FV{1}
DS=S-S{1}
*calculate error correction term
set RP=FV-S
*SUR
LINREG(NOPRINT, DEFINE=EQ1) DFV
# CONSTANT DFV{1}
LINREG(NOPRINT, DEFINE=EQ2) DS
# CONSTANT RP{1} DS{1}

system eq1 eq2
end(system)
sur(noprint, outsigma=v) 2
#eq1; #eq2

Re: SUR Gibbs sampling problem

Posted: Mon Feb 17, 2014 11:37 am
by TomDoan
The SUR sampling scheme samples the entire regression at one time so the correlation is taken into account. The disadvantage of sampling the whole model together is that it can get too large to be feasible computationally---in Cushman and Zha JME 1997 an alternative sampling scheme is used because the full regression sampler is too large.