Am 03.10.2010 18:14, schrieb Berend Hasselman:
> 
> On 03-10-2010, at 17:24, artur tarassow wrote:
> 
>> Hi,
>> 
>> last year the non-linear Wald-Test was implemented. The following 
>> example is given:
>> 
>> <script> function restr (matrix *b) matrix ret = b[1]/b[2] -
>> b[4]/b[5] return matrix ret end function
>> 
>> open data4-10 ols 1 0 2 3 4 5 restrict rfunc = restr end restrict 
>> </script>
>> 
>> But running this script yields the error: ---------------------- ?
>> restrict ? rfunc = restr ? end restrict Data types not conformable
>> for operation
>> 
>> Error executing script: halting
>>> end restrict
>> ----------------------
>> 
>> I am not sure what the exact problem is.
> 
> According to the Gret reference manual (gretl 1.9.1,page 47) the
> function restr should be declared as
> 
> function restr (const matrix b)
> 

Actually I think the new function style would be

function matrix restr(...)
...
return ret
end function

(that is, the return type of the function is stated right after the
'function' keyword)
Maybe the official example for the nonlinear Wald test needs updating.

cheers,
sven

Reply via email to