MathGroup Archive 2004

[Date Index] [Thread Index] [Author Index]

Search the Archive

Re: Maximum Problem

"sabbri" <sabrinacasagrande at> wrote in message
news:c0fsdd$c2t$1 at
> I have to maximize a function (the Likelihood function) in order to
> obtain the estimators of two parameter (say B e S). So I think I need
> to derive the function,(first respect to B, then respect to S) and
> equalize the 2 derivatives to zero. In other words I give the command:
> DSolve[{D[L[x,y],B]==0,D[L[x,y],S]==0},B,s]
> but Mathematica doesn't run. Where do I make mistakes? Perhaps I need
> to define the function L[x,y,B,S]??

I assume that by "derive" you mean "take the derivative of".  In that case,
yes, you need to define the functional dependence of your likelihood
function on the parameters you want to fit.

Also, you are taking the derivative and setting it equal to zero.  You want
to solve the resulting algebraic equation for the parameters.  The equation
does not involve the derivative of unknown functions, so you should use
Solve (or perhaps FindRoot), not DSolve.

ymodel[x_,m_,b_]:=m x + b

ydata[x_]:=(10+Random[]) x +11



{{m -> 10.2223, b -> 13.0053}}

  • Prev by Date: Re: how to plot with logarithmic scale on X-axis ?
  • Next by Date: Re: how to plot with logarithmic scale on X-axis ?
  • Previous by thread: Re: Maximum Problem
  • Next by thread: Re: how to explain this weird effect? Integrate