R squared for VAR -Estimation by cointegrated least square

Questions and discussions on Vector Autoregressions
Nadiarock1
Posts: 8
Joined: Fri Aug 07, 2009 3:03 pm

R squared for VAR -Estimation by cointegrated least square

Unread post by Nadiarock1 »

Hi,

I would like to have an advice for getting the R-Squared from a VAR/system - Estimation by Cointegrated least Square.
1. I have estimated a Fm-ols and I saved the coefficients (long run)
2. I use these coefficients in a ECM models to get the short-run parameters. .

But, I got a problem with the variables I specified and I would like to have the R-Square parameter to insure me that my equation system is ok.

How can I get this R squared in a system by cointegrated least squares.

Thank you.
Nadia
moderator
Site Admin
Posts: 269
Joined: Thu Oct 19, 2006 4:33 pm

Re: R squared for VAR -Estimation by cointegrated least square

Unread post by moderator »

What formula for the R-square did you have in mind?

Regards,
Tom Maycock
Nadiarock1
Posts: 8
Joined: Fri Aug 07, 2009 3:03 pm

Re: R squared for VAR -Estimation by cointegrated least square

Unread post by Nadiarock1 »

Hi,

I would like to use the Ajusted R-squared.

I have modified some of the programs I used to incorporate this code (%RBARSQ ) after linreg and it worked.
The next step is to get a R-squared with the VAR/Cointegrated.

Here is my code for the VAR/cointegrated. If I had a @source, I would go it that file and add the command for R-Squared, but with the command "system" I don't know how to use it. If I add it at the end of the following code, I got only 1 R-squared for the entire VAR/cointegrated system.

system(model=ectmodel)
variables y1 y2 x1
lags nlags
det constant tariff d import gdp
ect producersupport
end(system)
estimate

Thank you very much, Nad
TomDoan
Posts: 7814
Joined: Wed Nov 01, 2006 4:36 pm

Re: R squared for VAR -Estimation by cointegrated least square

Unread post by TomDoan »

Nadiarock1 wrote:Hi,

I would like to use the Ajusted R-squared.

I have modified some of the programs I used to incorporate this code (%RBARSQ ) after linreg and it worked.
The next step is to get a R-squared with the VAR/Cointegrated.

Here is my code for the VAR/cointegrated. If I had a @source, I would go it that file and add the command for R-Squared, but with the command "system" I don't know how to use it. If I add it at the end of the following code, I got only 1 R-squared for the entire VAR/cointegrated system.

system(model=ectmodel)
variables y1 y2 x1
lags nlags
det constant tariff d import gdp
ect producersupport
end(system)
estimate

Thank you very much, Nad
I think you want that to be

Code: Select all

lags 1 to nlags
If you add this after your code above, you'll get a vector of the standard centered R-squareds:

Code: Select all

compute varsigma=%sigma
vcv(center,matrix=basesigma) %regstart() %regend()
# dm dy
compute rsquared=1.-%xdiag(varsigma)./%xdiag(basesigma)
The R-bar squared is computed with:

Code: Select all

compute rsquared=1.-(%nobs-1.0)/(%nobs-%nreg)*%xdiag(varsigma)./%xdiag(basesigma)
Is there are particular reason you wanted this? It's not included because it's almost never reported. With non-stationary data, they're generally numbers like .99999.
Nadiarock1
Posts: 8
Joined: Fri Aug 07, 2009 3:03 pm

Re: R squared for VAR -Estimation by cointegrated least square

Unread post by Nadiarock1 »

Hello,
I want to get the R-squared from my VAR/Cointegrated because I have a problem with the signifiance of the ECM for the sort run and the Error correction term. Basically, I have unit roots and cointegration for my variables in my database. I estimate a fmols with good significance with expected coefficient signs and a quite good R².

Then, I want to use these long run coefficients previously estimated with the fmols for the long run and use it with the ECM. When I get the VAR/cointegrated of my systems, the sort run as well as the error correction term become non-significant. As you has written, the r-square is 0.99 in my system...hmmm. Also, there is no multicollinearity..

Do I have to difference my exogeneous variables that have unit root? By definition, the endogenous are differenced in the VAR/Cointegrated. I try to find out why I get the results.

Thanks again.

Nadia
TomDoan
Posts: 7814
Joined: Wed Nov 01, 2006 4:36 pm

Re: R squared for VAR -Estimation by cointegrated least square

Unread post by TomDoan »

If you're using SYSTEM with ECT, then no, you don't difference the variables. The inclusion of the proper forms for the endogenous variables is handled automatically when you do an ESTIMATE.
Post Reply