OK, this is great so far, but one prob:
The gretl documentation says that the interpolated p-value for kpss
"should not be taken too seriously". So I have the test value... and
now I want to compare that to the *critical value* at the 5% level ...
I want to compare 0.403951 (which I know how to access) to 0.473 (see
output below):
T = 40
Lag truncation parameter = 3
Test statistic = 0.403951
10% 5% 1%
Critical values: 0.352 0.473 0.719
Interpolated p-value 0.079
On Sat, May 17, 2014 at 10:56 AM, Logan Kelly <logan.kelly(a)uwrf.edu> wrote:
You can do this in two ways.
First:
smpl 1855 1894
loop i = 1..3
#do stuff
smpl +5 +5
endloop
Second:
string st_yr = "1855 1860 1865 1870"
string ed_yr = "1894 1899 1904 1909"
string st ed
loop i = 1..4
st = strsplit(st_yr,i)
ed = strsplit(ed_yr,i)
smpl @st @ed
#do stuff
endloop
The second option should only be used if your periods do not change in a regular way as
it is slower.
Logan
> -----Original Message-----
> From: gretl-users-bounces(a)lists.wfu.edu [mailto:gr etl-users-
> bounces(a)lists.wfu.edu] On Behalf Of Tim Nall
> Sent: Friday, May 16, 2014 9:10 PM
> To: Gretl list
> Subject: [Gretl-users] sorry, learning hansl question
>
> If you can figure out the iffy psuedo-psuedocode below, I'm trying to run 1 ols
> regression over 4 different date ranges (so total 4
> regressions) with 1 dependnet variable and 1 independant variable..
> but I want to run a kpss test on both the depvar and indvar before doing the
> regression for each date range, then utilize either the variable or its fiorst-
> differenced version depending on the results of the kpss (at 5%, hopefully).
>
> Can this be done in hansl?
>
>
> start_yr = 1855 1860 1865 1870
> end_yr = 1894 1899 1904 1909
>
> ## get MyDepVar and myIndVar from file, then
>
> for i in start_yr, end_yr
>
> smpl start_yr end_yr
>
> kpss 3 myDepVar ## and capture results
> if stationary = True:
> tempDepVar = MyDepVar
> else:
> tempDepVar = d_MyDepvar
>
> kpss 3 myIndVar ## and capture results
>
> if stationary = True:
> tempIndVar = myIndVar
> else:
> tempIndVar = d_myIndVar
>
> ols tempDepVar tempIndVar
>
>
>
>
> --
> Best regards,
> Timothy M. Nall
> Assistant Professor
> National Quemoy University
> Kinmen, Taiwan
> _______________________________________________
> Gretl-users mailing list
> Gretl-users(a)lists.wfu.edu
>
http://lists.wfu.edu/mailman/listinfo/gretl-users
_______________________________________________
Gretl-users mailing list
Gretl-users(a)lists.wfu.edu
http://lists.wfu.edu/mailman/listinfo/gretl-users
--
Best regards,
Timothy M. Nall
Assistant Professor
National Quemoy University
Kinmen, Taiwan