| 42333 |
ripley |
1 |
% File src/library/stats/man/plot.profile.nls.Rd
|
| 68948 |
ripley |
2 |
% Part of the R package, https://www.R-project.org
|
| 59039 |
ripley |
3 |
% Copyright 1995-2011 R Core Team
|
| 42333 |
ripley |
4 |
% Distributed under GPL 2 or later
|
|
|
5 |
|
| 27497 |
ripley |
6 |
\name{plot.profile.nls}
|
| 56186 |
murdoch |
7 |
\alias{plot.profile.nls}
|
| 85997 |
hornik |
8 |
\title{Plot a \code{profile.nls} Object}
|
| 27497 |
ripley |
9 |
\description{
|
|
|
10 |
Displays a series of plots of the profile t function and interpolated
|
|
|
11 |
confidence intervals for the parameters in a nonlinear regression
|
|
|
12 |
model that has been fit with \code{nls} and profiled with
|
|
|
13 |
\code{profile.nls}.
|
|
|
14 |
}
|
|
|
15 |
\usage{
|
| 56115 |
ripley |
16 |
\method{plot}{profile.nls}(x, levels, conf = c(99, 95, 90, 80, 50)/100,
|
| 56117 |
ripley |
17 |
absVal = TRUE, ylab = NULL, lty = 2, \dots)
|
| 27497 |
ripley |
18 |
}
|
|
|
19 |
\arguments{
|
| 49612 |
hornik |
20 |
\item{x}{an object of class \code{"profile.nls"} }
|
|
|
21 |
\item{levels}{levels, on the scale of the absolute value of a t
|
|
|
22 |
statistic, at which to interpolate intervals. Usually \code{conf}
|
|
|
23 |
is used instead of giving \code{levels} explicitly.}
|
| 27497 |
ripley |
24 |
\item{conf}{a numeric vector of confidence levels for profile-based
|
| 49612 |
hornik |
25 |
confidence intervals on the parameters.
|
| 89998 |
hornik |
26 |
Defaults to \code{c(0.99, 0.95, 0.90, 0.80, 0.50)}.}
|
| 27497 |
ripley |
27 |
\item{absVal}{a logical value indicating whether or not the plots
|
| 49612 |
hornik |
28 |
should be on the scale of the absolute value of the profile t.
|
| 56117 |
ripley |
29 |
Defaults to \code{TRUE}.}
|
|
|
30 |
\item{lty}{the line type to be used for axis and dropped lines.}
|
|
|
31 |
\item{ylab, \dots}{other arguments to the \code{\link{plot.default}}
|
|
|
32 |
function can be passed here (but not \code{xlab}, \code{xlim},
|
|
|
33 |
\code{ylim} nor \code{type}).}
|
| 27497 |
ripley |
34 |
}
|
| 56117 |
ripley |
35 |
\details{
|
|
|
36 |
The plots are produced in a set of hard-coded colours, but as these
|
|
|
37 |
are coded by number their effect can be changed by setting the
|
|
|
38 |
\code{\link{palette}}. Colour 1 is used for the axes and 4 for the
|
|
|
39 |
profile itself. Colours 3 and 6 are used for the axis line at zero and
|
|
|
40 |
the horizontal/vertical lines dropping to the axes.
|
|
|
41 |
}
|
| 27497 |
ripley |
42 |
\references{
|
| 88598 |
hornik |
43 |
\bibinfo{R:Bates+Watts:1988}{footer}{Chapter 6.}
|
|
|
44 |
\bibshow{R:Bates+Watts:1988}
|
| 27497 |
ripley |
45 |
}
|
|
|
46 |
\author{Douglas M. Bates and Saikat DebRoy}
|
|
|
47 |
\seealso{
|
|
|
48 |
\code{\link{nls}},
|
|
|
49 |
\code{\link{profile}},
|
|
|
50 |
\code{\link{profile.nls}}
|
|
|
51 |
}
|
|
|
52 |
\examples{
|
| 41508 |
ripley |
53 |
require(graphics)
|
|
|
54 |
|
| 27497 |
ripley |
55 |
# obtain the fitted object
|
| 46091 |
ripley |
56 |
fm1 <- nls(demand ~ SSasympOrig(Time, A, lrc), data = BOD)
|
| 27497 |
ripley |
57 |
# get the profile for the fitted model
|
| 80080 |
hornik |
58 |
pr1 <- profile(fm1, alphamax = 0.05)
|
| 27497 |
ripley |
59 |
opar <- par(mfrow = c(2,2), oma = c(1.1, 0, 1.1, 0), las = 1)
|
|
|
60 |
plot(pr1, conf = c(95, 90, 80, 50)/100)
|
|
|
61 |
plot(pr1, conf = c(95, 90, 80, 50)/100, absVal = FALSE)
|
|
|
62 |
mtext("Confidence intervals based on the profile sum of squares",
|
|
|
63 |
side = 3, outer = TRUE)
|
|
|
64 |
mtext("BOD data - confidence levels of 50\%, 80\%, 90\% and 95\%",
|
|
|
65 |
side = 1, outer = TRUE)
|
|
|
66 |
par(opar)
|
|
|
67 |
}
|
|
|
68 |
\keyword{nonlinear}
|
|
|
69 |
\keyword{regression}
|
|
|
70 |
\keyword{models}
|
| 89418 |
smeyer |
71 |
\keyword{hplot}
|