Am 31.01.2008 14:32, Riccardo (Jack) Lucchetti schrieb:
On Thu, 31 Jan 2008, Sven Schreiber wrote:
> Hi,
>
> is it possible (in a script) to access the test results from Hausman
> and Sargan tests after TSLS estimation? Since they are automatically
> calculated and not after a special test command, it seems that the
> normal gretl ways ($pvalue and such) don't apply.
>
> If not, I would file a feature request, because the general gretl
> principle seems to be that all tests should be accessible.
Interesting idea. Would two accessors $hausman and $sargan do? You can
always compute pvalues via genr (speaking of $sargan, we already have a
$gmmcrit accessor -- I wonder if the two could be merged).
Glad you like the idea...
If this issue is addressed I don't think it should stop halfway, so
p-values and/or d.o.f. should be accessible as well without making any
home-cooked genr magic necessary.
So either make things like $hausman and $sargan matrices with two or
three elements each: test statistic, possibly d.o.f., p-value.
Or maybe enable an accessor syntax after TSLS like $test(hausman) and
$pvalue(hausman), similar to $coeff(myvariable)
Or yet another option: extend the 'hausman' command to cover the case
of testing IV vs. OLS (now it seems to be only for random effects in
panels). And accordingly introduce a 'sargan' command.
Right now I'm not sure which option I like best, and there are probably
others as well.
thanks,
sven