nlsint | R Documentation |
This function computes approximate confidence intervals for the expected response as well as prediction intervals for a nonlinear regression model. It is designed to behave similarly to the predict
function.
nlsint(
object,
newdata = eval(object$call$data),
interval = c("confidence", "prediction"),
fcov = vcov,
level = 0.95,
residuals = FALSE,
...
)
object |
Model object of class |
newdata |
An optional data frame in which to look for variables with which to predict. If omitted the data frame used in creating the model object is used. |
interval |
Type of interval calculation (confidence or prediction). |
fcov |
Function for estimating the variance-covariance matrix of the model parameters. |
level |
Confidence level in (0,1). |
residuals |
Logical to compute leverage values and standardized residuals. |
... |
Arguments to pass to |
Standard errors for confidence intervals are estimated using the delta method. Derivatives are computed numerically rather than analytically to permit a wider range of models. Prediction intervals assume normally-distributed responses with variance inversely proportional to any specified weights, or homoscedastic error if no weights are specified. The approximate leverage ("hat") values are computed using the jacobian matrix and the approximate standardized residuals are equivalent to the "internally" standardized residuals in a linear model (i.e., as would be returned by rstandard in a linear model or rstandard with type = "pearson" in a GLM).
myreg <- nls(rate ~ (t1 + t3 * (state == "treated")) * conc /
(t2 + t4 * (state == "treated") + conc), data = Puromycin,
start = c(t1 = 150, t2 = 0, t3 = 0.05, t4 = 0))
nlsint(myreg, interval = "confidence")
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.