# [Gretl-users] R-squared for Prais-winsten in Gretl higher than in stata 8

Bas de Goei bas.degoei at gmail.com
Mon Apr 27 07:11:50 EDT 2009

Hi everybody, I'm new to Gretl and was just trying out a couple of things.

I have one question: when I run a normal OLS on a dataset I have, I
get an R-squared of 0.54 (see below)

Model 4: OLS estimates using the 28 observations 1981-2008
Dependent variable: Market
coefficient   std. error   t-ratio   p-value
--------------------------------------------------------
const      -0.0537645    0.0158677    -3.388    0.0023   ***
GDP         2.61979      0.465478      5.628    6.46e-06 ***
Mean dependent var   0.023904   S.D. dependent var   0.060574
Sum squared resid    0.044660   S.E. of regression   0.041445
F(1, 26)             31.67644   P-value(F)           6.46e-06
Log-likelihood       50.44212   Akaike criterion    -96.88424
Schwarz criterion   -94.21983   Hannan-Quinn        -96.06970
rho                  0.264994   Durbin-Watson        1.356766

This is a time-series, and I wanted to see what a Prais-Winsten
regression output would be like:

Performing iterative calculation of rho...
ITER       RHO        ESS
1      0.26499   0.0401631
2      0.40328   0.0387053
3      0.46859   0.0382796
4      0.49500   0.0381643
5      0.50490   0.0381302
6      0.50850   0.038119
7      0.50980   0.0381152
8      0.51027   0.0381152
Model 5: Prais-Winsten estimates using the 28 observations 1981-2008
Dependent variable: Market
coefficient   std. error   t-ratio   p-value
-------------------------------------------------------
const      -0.0347002    0.0188278    -1.843    0.0768  *
GDP         1.81362      0.426344      4.254    0.0002  ***
Statistics based on the rho-differenced data:
Mean dependent var   0.023904   S.D. dependent var   0.060574
Sum squared resid    0.038114   S.E. of regression   0.038287
F(1, 26)             17.61559   P-value(F)           0.000279
Log-likelihood       52.66109   Akaike criterion    -101.3222
Schwarz criterion   -98.65776   Hannan-Quinn        -100.5076
rho                  0.124797   Durbin-Watson        1.594644

Everything seemed correct, only the R-squared seems to have increased,
whereas my intuition was that it should have decreased. A verification
with Stata (8) gave me that R-squared is 0.40 (all other test-values
and coefficients are the same).

Does this have something to do with the way Gretl calculates R-squared
for Prais-Winsten compared to Stata 8? Or is it a bug somehow..?