Page 1 of 1

MHEGY

Posted: Sun Mar 17, 2013 4:38 pm
by newsh101
Hi,
I've been able to run the MHEGY code to calculate the pi t stats for the unit roots. I wondered however if it would be possible to get the R-squared of the model as you can if you use the method denoted below by Enders for the HEGY test:

Code: Select all

calendar 1960 1 4
alllocate 1991:4
open data us.prn
data(format=prn,org=obs) /
statistics gdp85

set lgdp = log(gdp85)
graph 1
# lgdp

set trend = t

set y1 = lgdp + lgdp{1} + lgdp{2} + lgdp{3}
set y2 = lgdp - lgdp{1} + lgdp{2} - lgdp{3}
set y3 = lgdp - lgdp{2}

set y4 = lgdp - lgdp{4}

linreg y4 / resids
# constant trend y1{1} y2{1} y3{1} y3{2}

exclude
# y3{1} y3{2}


cor(qstats,number=4) resids
Thanks

Re: MHEGY

Posted: Mon Mar 18, 2013 12:20 pm
by TomDoan
If you are using the @MHEGY procedure (that's what it sounds like) then it's doing a (silent) LINREG as part of the calculation. That will set the value of %RSQUARED, which you can display however you want after the procedure call.