1% File src/library/stats/man/profile.nls.Rd
2% Part of the R package, https://www.R-project.org
3% Copyright 1995-2019 R Core Team
4% Distributed under GPL 2 or later
5
6\name{profile.nls}
7\alias{profile.nls}
8\title{Method for Profiling nls Objects}
9\description{
10  Investigates the profile log-likelihood function for a fitted model of
11  class \code{"nls"}.
12}
13\usage{
14\method{profile}{nls}(fitted, which = 1:npar, maxpts = 100, alphamax = 0.01,
15        delta.t = cutoff/5, \dots)
16}
17\arguments{
18  \item{fitted}{the original fitted model object.}
19  \item{which}{the original model parameters which should be profiled.
20    This can be a numeric or character vector.
21    By default, all non-linear parameters are profiled.}
22  \item{maxpts}{maximum number of points to be used for profiling each
23    parameter.}
24  \item{alphamax}{highest significance level allowed
25    for the profile t-statistics.}
26  \item{delta.t}{suggested change on the scale of the profile
27    t-statistics.  Default value chosen to allow profiling at about
28    10 parameter values.}
29  \item{\dots}{further arguments passed to or from other methods.}
30}
31\value{
32  A list with an element for each parameter being profiled. The elements
33  are data-frames with two variables
34  \item{par.vals}{a matrix of parameter values for each fitted model.}
35  \item{tau}{the profile t-statistics.}
36}
37\details{
38  The profile t-statistics is defined as the square root of change in
39  sum-of-squares divided by residual standard error with an
40  appropriate sign.
41}
42\references{
43  Bates, D. M. and Watts, D. G. (1988), \emph{Nonlinear Regression Analysis
44    and Its Applications}, Wiley (chapter 6).
45}
46\author{
47  Of the original version,
48  Douglas M. Bates and Saikat DebRoy
49}
50\seealso{
51  \code{\link{nls}}, \code{\link{profile}}, \code{\link{plot.profile.nls}}
52}
53\examples{
54\dontshow{od <- options(digits = 4)}
55# obtain the fitted object
56fm1 <- nls(demand ~ SSasympOrig(Time, A, lrc), data = BOD)
57# get the profile for the fitted model: default level is too extreme
58pr1 <- profile(fm1, alphamax = 0.05)
59# profiled values for the two parameters
60## IGNORE_RDIFF_BEGIN
61pr1$A
62pr1$lrc
63## IGNORE_RDIFF_END
64# see also example(plot.profile.nls)
65\dontshow{options(od)}
66}
67\keyword{nonlinear}
68\keyword{regression}
69\keyword{models}
70