Description Usage Arguments Details Value References See Also Examples
Provides 1-sided or 2-sided nonlinear regression tolerance bounds.
1 2 3 | nlregtol.int(formula, xy.data = data.frame(), x.new = NULL,
side = 1, alpha = 0.05, P = 0.99, maxiter = 50,
...)
|
formula |
A nonlinear model formula including variables and parameters. |
xy.data |
A data frame in which to evaluate the formulas in |
x.new |
Any new levels of the predictor(s) for which to report the tolerance bounds. The number of columns must be
1 less than the number of columns for |
side |
Whether a 1-sided or 2-sided tolerance bound is required (determined by |
alpha |
The level chosen such that |
P |
The proportion of the population to be covered by the tolerance bound(s). |
maxiter |
A positive integer specifying the maximum number of iterations that the nonlinear least squares routine ( |
... |
Optional arguments passed to |
It is highly recommended that the user specify starting values for the nls
routine.
nlregtol.int
returns a data frame with items:
alpha |
The specified significance level. |
P |
The proportion of the population covered by the tolerance bound(s). |
y.hat |
The predicted value of the response for the fitted nonlinear regression model. |
y |
The value of the response given in the first column of |
1-sided.lower |
The 1-sided lower tolerance bound. This is given only if |
1-sided.upper |
The 1-sided upper tolerance bound. This is given only if |
2-sided.lower |
The 2-sided lower tolerance bound. This is given only if |
2-sided.upper |
The 2-sided upper tolerance bound. This is given only if |
Wallis, W. A. (1951), Tolerance Intervals for Linear Regression, in Second Berkeley Symposium on Mathematical Statistics and Probability, ed. J. Neyman, Berkeley: University of CA Press, 43–51.
Young, D. S. (2013), Regression Tolerance Intervals, Communications in Statistics - Simulation and Computation, 42, 2040–2055.
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 |
## 95%/95% 2-sided nonlinear regression tolerance bounds
## for a sample of size 50.
set.seed(100)
x <- runif(50, 5, 45)
f1 <- function(x, b1, b2) b1 + (0.49 - b1)*exp(-b2*(x - 8)) +
rnorm(50, sd = 0.01)
y <- f1(x, 0.39, 0.11)
formula <- as.formula(y ~ b1 + (0.49 - b1)*exp(-b2*(x - 8)))
out <- nlregtol.int(formula = formula,
xy.data = data.frame(cbind(y, x)),
x.new=cbind(c(10, 20)), side = 2,
alpha = 0.05, P = 0.95)
out
plottol(out, x = x, y = y, side = "two", x.lab = "X",
y.lab = "Y")
|
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.