On Thu, 16 Mar 2017, Alecos Papadopoulos wrote:
In mle estimation, we can constrain the permissible space for the
parameters
under estimation like this:
mle logl = check ? p*ln(ax) - lngamma(p) - ln(x) - ax : NA
series ax = alpha*x
scalar check = (alpha>0) && (p>0)
params alpha p
end mle
Do we use the same syntax when using nls, non-linear least-squares?
The general difference in syntax that I can see, is that in mle we define
directly the function that is to be maximized, while in nls we define the
regression function... so maybe the syntax for the constraint should be
different?
NLS is a special case of MLE. All you have to do is define a nonlinear
function for the mean and plug it into a normal density.
-------------------------------------------------------
Riccardo (Jack) Lucchetti
Dipartimento di Scienze Economiche e Sociali (DiSES)
Università Politecnica delle Marche
(formerly known as Università di Ancona)
r.lucchetti(a)univpm.it
http://www2.econ.univpm.it/servizi/hpp/lucchetti
-------------------------------------------------------