library(Rgretl)
library(urca)
wgmacro = open_gdt("wgmacro")
l_income = log(wgmacro$income)
tau = ur.df(l_income, type = "trend",lags=0)@teststat
tau3 = tau[1]
pvalue = punitroot(tau3, N = length(l_income), trend = "ct", statistic = "t")
grscr =
'open wgmacro.gdt -q
adf 0 log(income) --ct -q
matrix test = $test
matrix pval = urcpval($test, $nobs, 1, 3)
'
gradf = run_grcli(grscr,output=list(matr=c("test","pval")))
# checking
abs(tau3 - gradf$test) # tau-stat
abs(pvalue - gradf$pval) #p-values
Am 05.11.18 um 20:27 schrieb Allin Cottrell:
> On Mon, 5 Nov 2018, Sven Schreiber wrote:
>
>> Am 05.11.18 um 16:53 schrieb Allin Cottrell:
>>
>>> But before changing gretl's behavior I'd want to take a look at what
>>> other software does in this sort of case.
>>>
>> That is certainly wise.
>
> "Everyone" (well, so far R and Stata) gives just what we do, namely
> the cdf of the tau (or other relevant) distribution evaluated at the
> observed statistic. So for tau > 0 the quoted p-values are close to
> but less than 1.0.
>
> My specific comparisons were with adf.test and pp.test in R (tseries)
> and "dfuller" in Stata.
Thanks for checking, this is interesting of course. I will look around a
little bit for example in Stata user forums if there has been a
discussion about this issue. So far I still think it's wrong.
>
> I don't think we want to go out on a limb on this point. Also, I think
> it's possible to give a coherent interpretation of those p-values
> close to but short of 1: namely, it's not _impossible_ that you could
> get a positive tau in a finite sample even if the series in question
> were stationary -- just very unlikely.
>
>
I still don't think p-values are meant for this interpretation. I guess
the most glaring incarnation of my problem with this is the case where
your estimate happens to be right at H0: bhat = b_0. (A probability-zero
event I know, but a useful thought experiment nonetheless.) How can you
_not_ have a p-value =1 in this case?? Otherwise it's possible in
principle to reject the null when the point estimate is identical to the
null value. This makes no sense to me.
thanks,
sven
_______________________________________________
Gretl-devel mailing list
Gretl-devel@lists.wfu.edu
http://lists.wfu.edu/mailman/listinfo/gretl-devel