\HeaderA{logtrans}{Estimate log Transformation Parameter}{logtrans}
\methaliasA{logtrans.default}{logtrans}{logtrans.default}
\methaliasA{logtrans.formula}{logtrans}{logtrans.formula}
\methaliasA{logtrans.lm}{logtrans}{logtrans.lm}
\keyword{regression}{logtrans}
\keyword{models}{logtrans}
\keyword{hplot}{logtrans}
\begin{Description}\relax
Find and optionally plot the marginal (profile) likelihood for alpha
for a transformation model of the form \code{log(y + alpha) \textasciitilde{} x1 + x2 + ...}.
\end{Description}
\begin{Usage}
\begin{verbatim}
logtrans(object, ...)

## Default S3 method:
logtrans(object, ..., alpha = seq(0.5, 6, by = 0.25) - min(y),
         plotit = TRUE, interp =, xlab = "alpha",
         ylab = "log Likelihood")

## S3 method for class 'formula':
logtrans(object, data, ...)

## S3 method for class 'lm':
logtrans(object, ...)
\end{verbatim}
\end{Usage}
\begin{Arguments}
\begin{ldescription}
\item[\code{object}] Fitted linear model object, or formula defining the untransformed
model that is \code{y \textasciitilde{} x1 + x2 + ...}.  The function is generic.

\item[\code{...}] If \code{object} is a formula, this argument may specify a data frame
as for \code{lm}.

\item[\code{alpha}] Set of values for the transformation parameter, alpha.

\item[\code{plotit}] Should plotting be done?

\item[\code{interp}] Should the marginal log-likelihood be interpolated with a spline
approximation?   (Default is \code{TRUE} if plotting is to be done and
the number of real points is less than 100.)

\item[\code{xlab}] as for \code{plot}.

\item[\code{ylab}] as for \code{plot}.

\item[\code{data}] optional \code{data} argument for \code{lm} fit.

\end{ldescription}
\end{Arguments}
\begin{Value}
List with components \code{x} (for alpha) and \code{y} (for the marginal
log-likelihood values).
\end{Value}
\begin{Section}{Side Effects}
A plot of the marginal log-likelihood is produced, if requested,
together with an approximate mle and 95\% confidence interval.
\end{Section}
\begin{References}\relax
Venables, W. N. and Ripley, B. D. (2002)
\emph{Modern Applied Statistics with S.} Fourth edition.  Springer.
\end{References}
\begin{SeeAlso}\relax
\code{\LinkA{boxcox}{boxcox}}
\end{SeeAlso}
\begin{Examples}
\begin{ExampleCode}
logtrans(Days ~ Age*Sex*Eth*Lrn, data = quine,
         alpha = seq(0.75, 6.5, len=20))
\end{ExampleCode}
\end{Examples}

