\HeaderA{profile.nls}{Method for Profiling nls Objects}{profile.nls}
\keyword{nonlinear}{profile.nls}
\keyword{regression}{profile.nls}
\keyword{models}{profile.nls}
\begin{Description}\relax
Investigates the profilelog-likelihood function for a fitted model of
class \code{"nls"}.
\end{Description}
\begin{Usage}
\begin{verbatim}
## S3 method for class 'nls':
profile(fitted, which = 1:npar, maxpts = 100, alphamax = 0.01,
        delta.t = cutoff/5, ...)
\end{verbatim}
\end{Usage}
\begin{Arguments}
\begin{ldescription}
\item[\code{fitted}] the original fitted model object.
\item[\code{which}] the original model parameters which should be profiled.
This can be a numeric or character vector.
By default, all non-linear parameters are profiled.
\item[\code{maxpts}] maximum number of points to be used for profiling each
parameter.
\item[\code{alphamax}] maximum significance level allowed for the profile
t-statistics.
\item[\code{delta.t}] suggested change on the scale of the profile
t-statistics.  Default value chosen to allow profiling at about
10 parameter values.
\item[\code{...}] further arguments passed to or from other methods.
\end{ldescription}
\end{Arguments}
\begin{Details}\relax
The profile t-statistics is defined as the square root of change in
sum-of-squares divided by residual standard error with an
appropriate sign.
\end{Details}
\begin{Value}
A list with an element for each parameter being profiled. The elements
are data-frames with two variables 
\begin{ldescription}
\item[\code{par.vals}] a matrix of parameter values for each fitted model.
\item[\code{tau}] the profile t-statistics.
\end{ldescription}
\end{Value}
\begin{Author}\relax
Of the original version, 
Douglas M. Bates and Saikat DebRoy
\end{Author}
\begin{References}\relax
Bates, D. M. and Watts, D. G. (1988), \emph{Nonlinear Regression Analysis
and Its Applications}, Wiley (chapter 6).
\end{References}
\begin{SeeAlso}\relax
\code{\LinkA{nls}{nls}}, \code{\LinkA{profile}{profile}}, \code{\LinkA{plot.profile.nls}{plot.profile.nls}}
\end{SeeAlso}
\begin{Examples}
\begin{ExampleCode}
# obtain the fitted object
fm1 <- nls(demand ~ SSasympOrig( Time, A, lrc ), data = BOD)
# get the profile for the fitted model
pr1 <- profile( fm1 )
# profiled values for the two parameters
pr1$A
pr1$lrc
\end{ExampleCode}
\end{Examples}

