Hi Sven, thanks for the input, plausible concerns.

The following seems to work just fine (in the sense that it gave results that were validated with other estimation methods). Apart from the xmax operator, it has a density with branches.

<hansl>

catch mle logl = check ? log(A1+A2+A3)  :NA 
   series res = Depvar - lincomb(Reglist,bcoeff)

   scalar m = xmax(a,b)
   series dens1 = (res >= -b)*(res <= a - m)
   series dens2 = (a - m< res)* (res <= m-b)
   series dens3 = (res > m-b)*(res <= a )
  
 
   series d2 = (a-res)/(a*b)
   series d4 = (b+res)/(a*b)
   series A1 = dens1*d4
   series A2 = dens2*(1/m)
   series A3 = dens3*d2
   
scalar check =   (a>0) && (b>0)
params bcoeff  a b
end mle

</hansl>

-- 
Alecos Papadopoulos PhD
Athens University of Economics and Business
web: alecospapadopoulos.wordpress.com/
skype:alecos.papadopoulos

Am 20.02.2020 um 21:37 schrieb Alecos Papadopoulos:

Good evening. Will the mle command in gretl have any compatibility
problem if in the likelihood some of the parameters under estimation
appear also inside binary min and max operators

Spontaneously I'm skeptical, not because of any gretl limitations, but
because a min/max choice always means a discontinuity where derivatives
break down etc. So it doesn't look like a well-behaved problem for
"smooth" optimization. Maybe you would need a kind of switching algorithm.

But I may well be missing something, other input much appreciated.

cheers

sven