nlsContourRSS {nlstools}R Documentation

Surface contour of RSS

Description

Provides residual sum of squares (RSS) contours

Usage

nlsContourRSS (nls, lseq = 100, exp = 2)
## S3 method for class 'nlsContourRSS':
plot (x, nlev = 0, col = TRUE, ask = FALSE, ...)
## S3 method for class 'nlsContourRSS':
print (x, ...)

Arguments

nls an object of class 'nls'
lseq length of the sequences of parameters
exp expansion factor of the parameter intervals defining the grids
nlev number of contour levels to add to the likelihood contour at level 95 percent
col logical. Contours are plotted with colors if TRUE
x an object of class 'nlsContourRSS'
ask if TRUE, draw plot interactively (default is FALSE)
... further arguments passed to or from other methods

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.

Value

nlsContourRSS returns a list of three objects:

seqPara a matrix with the sequence of grid values for each parameter
lrss a list of matrices with logarithm values of RSS in the grid for each pair of parameters
lrss95 the logarithm of the 95 percent residual sum of squares threshold according to Beale (1960)

Author(s)

Florent Baty florent.baty@unibas.ch
Marie-Laure Delignette-Muller ml.delignette@vet-lyon.fr

References

Beale EML (1960) Confidence regions in non-linear estimations. Journal of the Royal Statistical Society, 22B, 41-88.

Bates DM and Watts DG (1988) Nonlinear regression analysis and its applications. Wiley, Chichester, UK.

Examples

data(growthcurve4)
nls1 <- nls(gompertzm, growthcurve4,
        list(lag = 10, mumax = 0.1, LOG10N0 = 6, LOG10Nmax = 9))
crss <- nlsContourRSS(nls1)
plot(crss)

[Package nlstools version 0.0-8 Index]