[Gretl-devel] omit bug

Sven Schreiber svetosch at gmx.net
Fri May 23 16:27:33 EDT 2008


Am 23.05.2008 20:50, Allin Cottrell schrieb:

> 
> I've now implemented the right fix, namely, when we enter a 
> function we save a pointer to the current "last model" and on exit 
> from a function we restore that pointer.
> 
> Should be OK in CVS and Windows snapshot.
> 

Yes it looks like it, thanks.

However, another new problem just appeared, the context is as follows:

First we do IV estimation:

tsls rpivstand endorhs d_predrhs  ; d_predrhs d1_wox --robust

Then we do various stuff:

 >accessing $coeff, $vcv>
<some 'printf'-ing, 'scalar', 'matrix' operations>
<a function call -- see the previous bug>
<some 'omit' tests>
<some 'restrict' tests>

and then we access the hausman test result and calculate a p-value by 
assuming one d.o.f. less than usual (don't ask why right now):

matrix hausmanresult = $hausman
pvalue X hausmanresult[1,2]-1 hausmanresult[1,1]

-- and this now gives an "invalid argument" error (it didn't in 1.7.4).

Note that the following reformulation of the last line provides a 
workaround, so it seems it has to do with "on-the-fly calculations" (if 
that's the right term):

temp=hausmanresult[1,2]-1
pvalue X temp hausmanresult[1,1]

BTW, on various occasions I noticed that arithmetic expressions cannot 
always be used in place of simple variables. But sometimes it does seem 
to work. Is there some rule when it should work, or is it sheer luck 
when it does?

Thanks,
Sven






More information about the Gretl-devel mailing list