trouble with matrix functions
by nadaud@centre-cired.fr
Hi listers, greetings from Paris !
I am in big trouble with matrix functions under GRETL 1.7.0 under XP.
The problem is the following:
I run system estimation (SUR) on microdata (10 305 households). Then i
use the results (coefficients and fitted values) to compute elasticities
for each household.
however, gretl does not compute them.
here is some code :
matrix vecun = ones(10305,1)
matrix erlog = vecun + (coeffaids[4,1]).*(1/what[,1])
matrix ercar = vecun + (coeffaids[4,2]).*(1/what[,2])
matrix erij = erlog~ercar
matrix er=meanc(erij)
er
but gretl says :
? matrix erlog = vecun + (coeffaids[4,1]).*(1/what[,1])
Data type non conformant for the operation
normally vecun is a column vector of ones (10305,1) ; coeffaids[4,1] is
a scalar (so is promoted to matrix for this step) and 1/what[,1] is the
inverse of the fitted shares for good one, again a column vector
(10305,1). But gretl does not like it much !
This is puzzeling because, in another script, with *exactly the same
data and the same code*, the computations run ok .
Note that i checked the sizes of the other matrices :
I just redo the computation on the main script and it runs ok !
any advice ? I am a bit lost !
cheers
Franck