\HeaderA{normexp}{Normal + Exponential Log-Likelihood}{normexp}
\methaliasA{normexp.grad}{normexp}{normexp.grad}
\methaliasA{normexp.m2loglik}{normexp}{normexp.m2loglik}
\keyword{models}{normexp}
\begin{Description}\relax
Marginal log-likelihood of foreground values for normal + exponential model and its derivatives.
These functions are called by \code{normexp.fit} and are not normally called directly by the user.
\end{Description}
\begin{Usage}
\begin{verbatim}
normexp.m2loglik(par,x)
normexp.grad(par,x)
\end{verbatim}
\end{Usage}
\begin{Arguments}
\begin{ldescription}
\item[\code{par}] numeric vector of parameters
\item[\code{x}] numeric vector of (background corrected) intensities
\end{ldescription}
\end{Arguments}
\begin{Details}\relax
The parameter vector \code{par} holds the normal mean, the normal log-standard deviation and the exponential mean.

Computes minus twice the log-likelihood based on the $normal(\mu,\sigma^2)+exponential(\alpha)$ convolution model for the foreground intensities.
The elements of \code{par} are $\mu$, $\log(\sigma)$ and $\log(\alpha)$.
\end{Details}
\begin{Value}
\code{normexp.m2loglik} returns a numeric scalar holding minus-twice the log-likelihood.
\code{normexp.grad} returns a numeric vector holding the derivatives with respect to the elements of \code{par}.
\end{Value}
\begin{Author}\relax
Jeremy Silver and Gordon Smyth
\end{Author}
\begin{SeeAlso}\relax
An overview of background correction functions is given in \code{\LinkA{04.Background}{04.Background}}.
\end{SeeAlso}


