[Gretl-devel] $coeff misbehavior
Allin Cottrell
cottrell at wfu.edu
Mon Apr 28 20:47:58 EDT 2008
On Tue, 29 Apr 2008, Stefano Balietti wrote:
> I resuscitated this old post because there is still something
> which is not going like it should (IHMO).
>
> $coeff without any extra-parameter between brackets is supposed
> to return a matrix, whereas actually, after an ols estimation
> with only one regressor, it returns a scalar instead of a matrix
> 1x1. Surprisingly (or not) if I try to access $coeff[1] it gives
> no error.
It'll go either way, just give gretl some guidance as to what you
want.
<script1>
open data4-1
ols 1 2
scalar b = $coeff
</script1>
<script2>
open data4-1
ols 1 2
matrix b = $coeff
b
</script2>
> Moreover there is another issue connected somehow with $coeff
> and loops, but i couldn't replicate a minimal test-case.
> After the first iteration it's like $coeff weren't available
> anymore and any attempt to access to it produces an error...
OK, please post if you find a reproducible case.
Allin
More information about the Gretl-devel
mailing list