-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathnlsContourRSS.Rd
84 lines (71 loc) · 2.96 KB
/
nlsContourRSS.Rd
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
% Generated by roxygen2: do not edit by hand
% Please edit documentation in R/nlsContourRSS.R
\name{nlsContourRSS}
\alias{nlsContourRSS}
\alias{plot.nlsContourRSS}
\alias{print.nlsContourRSS}
\alias{plot.nlsContourRSS}
\alias{print.nlsContourRSS}
\title{Surface contour of RSS}
\usage{
nlsContourRSS(nls, lseq = 100, exp = 2)
\method{plot}{nlsContourRSS}(x, nlev = 0, col = TRUE,
col.pal = terrain.colors(100), ask = FALSE, useRaster = TRUE, ...)
\method{print}{nlsContourRSS}(x, ...)
}
\arguments{
\item{nls}{an object of class 'nls'}
\item{lseq}{length of the sequences of parameters}
\item{exp}{expansion factor of the parameter intervals defining the grids}
\item{x}{an object of class 'nlsContourRSS'}
\item{nlev}{number of contour levels to add to the likelihood contour at
level 95 percent}
\item{col}{logical. Contours are plotted with colors if \code{TRUE}}
\item{col.pal}{Palette of colors. Colors to be used as background (default
is terrain.colors(100); unused if col is FALSE)}
\item{ask}{if TRUE, draw plot interactively (default is FALSE)}
\item{useRaster}{a bitmap raster is used to plot the image instead of
polygons (default is TRUE)}
\item{...}{further arguments passed to or from other methods}
}
\value{
\code{nlsContourRSS} returns a list of three objects: \item{ seqPara
}{ a matrix with the sequence of grid values for each parameter } \item{
lrss }{ a list of matrices with logarithm values of RSS in the grid for each
pair of parameters } \item{ lrss95 }{ the logarithm of the 95 percent
residual sum of squares threshold according to Beale (1960) }
}
\description{
Provides residual sum of squares (RSS) contours
}
\details{
The aim of these functions is to plot the residual sum of squares (RSS)
contours which correspond to likelihood contours for a Gaussian model. For
each pair of parameters the RSS is calculated on a grid centered on the
least squares estimates of both parameters, the other parameters being fixed
to their least square estimates. The contours of RSS values are then plotted
for each pair of parameters. For each pair of parameters, one of this
contour corresponds to a section of the 95 percent Beale's confidence region
in the plane of these parameters. This contour is plotted in a different
color.
}
\examples{
formulaExp <- as.formula(VO2 ~ (t <= 5.883) * VO2rest + (t > 5.883) *
(VO2rest + (VO2peak - VO2rest) *
(1 - exp(-(t - 5.883) / mu))))
O2K.nls1 <- nls(formulaExp, start = list(VO2rest = 400, VO2peak = 1600,
mu = 1), data = O2K)
O2K.cont1 <- nlsContourRSS(O2K.nls1)
plot(O2K.cont1)
}
\references{
Beale EML (1960) Confidence regions in non-linear estimations.
\emph{Journal of the Royal Statistical Society}, \bold{22B}, 41-88.\cr\cr
Bates DM and Watts DG (1988) Nonlinear regression analysis and its
applications. Wiley, Chichester, UK.\cr
}
\author{
Florent Baty \email{[email protected]}\cr Marie-Laure
Delignette-Muller \email{[email protected]}
}
\keyword{nonlinear}