Hi,
I and my colleague are writing a function in gretl to estimate Panel
Smooth Transition Regression (PSTR) models and make the related
diagnostic tests:
http://ideas.repec.org/p/uts/rpaper/165.html
http://ideas.repec.org/a/bla/obuest/v68y2006is1p797-812.html
We have already implemented the Taylor expansion-based linearity tests
(and partly the Hansen's version of the test - we are still working on
it).
Now we are trying to make a function to estimate the parameters of PSTR
models.
The problem is that such models are estimated minimizing the
concentrated sum of squared residuals (see for instance Eq. 11 Pag. 7 of
the first paper cited above).
I need a command in gretl to find a (constrained) minimum of this
function.
Given the non linear parameters gamma and c, this function must
calculate the FE panel coefficients and return the SSR.
I thought I could use the mle command with the related log-L:
Log-L = - n/2(ln SSR/n + const)
where SSR could have been the output of the function
The problem is that such function must have vectors as arguments: gamma
and c are vectors whose dimension can change, since they depend on the
number of regimes and location parameters, in turn determined by the
tests or the researcher.
So, it seems quite problematic to adapt the mle command.
In the Matlab code we are currently using for the estimates, the command
FMINSEARCH() has been used for the purpose.
Is there anything like this command in gretl?
After all, gretl is actually able to compute constrained/uncontrained
min/max...
If there is nothing like this in gretl, which is the best way to
circumvent the problem?
Is it better to call R or Octave from gretl?
And what is a good way to do this?
Thanks a lot
Giuseppe