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