\Header{mle}{Maximum likelihood estimation}
\keyword{models}{mle}
\begin{Description}\relax
Estimate parameters by the method of maximum likelihood.\end{Description}
\begin{Usage}
\begin{verbatim}
mle(minuslogl, start = formals(minuslogl), method = "BFGS", fixed = list(), ...)
\end{verbatim}
\end{Usage}
\begin{Arguments}
\begin{ldescription}
\item[\code{minuslogl}] Function to calculate negative log-likelihood
\item[\code{start}] Named list. Initial values for optimizer
\item[\code{method}] Optimization method to use. See \code{optim}
\item[\code{fixed}] Named list. Parameter values to keep fixed during
optimization
\item[\code{...}] Further arguments to pass to \code{optim}
\end{ldescription}
\end{Arguments}
\begin{Details}\relax
The \code{optim} optimizer is used to find the minimum of the negative
log-likelihood. An approximate covariance matrix for the parameters is
obtained by inverting the Hessian matrix at the optimum.\end{Details}
\begin{Value}
An object of class \code{"mle"}\end{Value}
\begin{Note}\relax
Be careful to note that the argument is -log L (not -2 log L). It
is for the user to ensure that the likelihood is correct, and that
asymptotic likelihood inference is valid.\end{Note}
\begin{SeeAlso}\relax
\code{\Link{mle-class}}\end{SeeAlso}
\begin{Examples}
\begin{ExampleCode}
x <- 0:10
y <- c(26, 17, 13, 12, 20, 5, 9, 8, 5, 4, 8)
ll <- function(ymax=15,xhalf=6)
    -sum(dpois(y,lambda=ymax/(1+x/xhalf),log=TRUE))
mle(ll)
mle(ll,fixed=list(xhalf=6))
\end{ExampleCode}
\end{Examples}

