nlsBoot | R Documentation |
Bootstrap resampling
nlsBoot (nls, niter = 999)
## S3 method for class 'nlsBoot'
plot(x, type = c("pairs", "boxplot"),
mfr = c(ceiling(sqrt(ncol(x$coefboot))),
ceiling(sqrt(ncol(x$coefboot)))),
ask = FALSE, ...)
## S3 method for class 'nlsBoot'
print(x, ...)
## S3 method for class 'nlsBoot'
summary(object, ...)
nls |
an object of class 'nls' |
niter |
number of iterations |
x , object |
an object of class 'nlsBoot' |
type |
type of representation (options are "pairs" or "boxplot") |
mfr |
layout definition (number of rows and columns in the graphics device) |
ask |
if TRUE, draw plot interactively |
... |
further arguments passed to or from other methods |
Non-parametric bootstrapping is used. Mean centered residuals are bootstrapped. By default, 999 resampled data sets are created from which parameter estimates are obtained by fitting the model on each of these data sets. Whenever the fit fails to converge, a flag reports the number of non-convergences. If the fitting procedure fails to converge in more than 50% of the cases, the procedure is interrupted with a flag and no result is given. The function summary
returns the bootstrap estimates (mean and std. dev. of the bootstrapped estimates) and the median and 95 percent confidence intervals (50, 2.5, and 97.5 percentiles of the bootstrapped estimates). The bootstrapped estimate distributions can be visualized using the function plot.nlsBoot
either by plotting the bootstrapped sample for each pair of parameters or by displaying the boxplot representation of the bootstrapped sample for each parameter. Notice that nlsBoot
does not currently handle transformed dependent variables specified in the left side of the nls
formula.
nlsBoot
returns a list of 5 objects:
coefboot |
contains the bootstrap parameter estimates |
bootCI |
contains the bootstrap medians and the bootstrap 95% confidence intervals |
estiboot |
contains the means and std. errors of the bootstrap parameter estimates |
rse |
is the vector of bootstrap residual errors |
nls |
the object of class 'nls' given in input |
Florent Baty, Marie-Laure Delignette-Muller
Bates DM and Watts DG (1988) Nonlinear regression analysis and its applications. Wiley, Chichester, UK.
Huet S, Bouvier A, Poursat M-A, Jolivet E (2003) Statistical tools for nonlinear regression: a practical guide with S-PLUS and R examples. Springer, Berlin, Heidelberg, New York.
formulaExp <- as.formula(VO2 ~ (t <= 5.883) * VO2res + (t > 5.883) *
(VO2res + (VO2peak - VO2res) *
(1 - exp(-(t - 5.883) / mu))))
O2K.nls1 <- nls(formulaExp, start = list(VO2res = 400, VO2peak = 1600,
mu = 1), data = O2K)
O2K.boot1 <- nlsBoot(O2K.nls1, niter = 200)
plot(O2K.boot1)
plot(O2K.boot1, type = "boxplot", ask = FALSE)
summary(O2K.boot1)
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.