Hi all,
when programming some stuff with Hansl functions, one of the recurring
problems is that gretl's estimation commands work on series and list
types, not on matrix stuff. (And yes, I know about mols().) Even after
all these years it's not always clear to me how to work around this
limitation, especially when auxiliary estimation routines are performed
on kind of interim data (matrix-es) that do not really correspond well
to the incoming dataset from the outer scope.
Let me give an arbitrary example which does not work:
<hansl>
# test an aux dataset inside a function
function void internalar (matrix x, int p)
x = vec(x)
T = rows(x)
nulldata T # not allowed -> error
setobs 1 1 --time-series
series s = x
ar p ; x
end function
open abdata # panel dataset just for the heck of it, but can be omitted
internalar(mnormal(50), 2)
</hansl>
In this example, I cannot use gretl's "ar" estimation command inside the
function. (This is just an example, the question is about other commands
as well, so please no answers on how to perform the equivalent by hand.)
Any fairly general hints and ideas on how to overcome this kind of problem?
thanks
sven