| confint.onls | R Documentation |
Computes bootstrap confidence intervals for all parameters of an onls model.
Confidence limits are obtained from the empirical distribution of parameter estimates generated by nonparametric case-resampling.
Unlike confint.nls, which uses profile likelihoods, confint.onls is based on repeated refitting of the orthogonal nonlinear
least-squares model to bootstrap samples and therefore remains fully consistent with the estimation criterion used by onls.
## S3 method for class 'onls'
confint(object, parm, level = 0.95, k = 200, ...)
object |
an object returned from |
parm |
just for S3 purposes, as all parameters are bootstrapped. |
level |
the confidence level required. |
k |
the number of bootstrap samples. |
... |
additional argument(s) passed to |
Confidence intervals are obtained by nonparametric bootstrap resampling.
Let \hat{\theta} denote the vector of parameter estimates from the original fit. For each bootstrap replicate,
rows of the original data set are sampled with replacement to generate a bootstrap sample of the same size as the original data
the model is refitted to the bootstrap sample using onls
parameter estimates from successful fits are stored
After k successful bootstrap fits have been collected, the confidence interval for each parameter is obtained from the empirical quantiles of its bootstrap distribution
Fits that fail to converge or violate internal orthogonality checks are discarded. Additionally, bootstrap estimates whose absolute deviation from the original estimate exceeds twenty times the corresponding estimated standard error are treated as pathological solutions and excluded.
A matrix (or vector) with columns giving lower and upper confidence limits for each parameter.
Andrej-Nikolai Spiess
set.seed(123)
DNase1 <- subset(DNase, Run == 1)
DNase1$density <- sapply(DNase1$density, function(x) rnorm(1, x, 0.1 * x))
mod1 <- onls(density ~ Asym/(1 + exp((xmid - log(conc))/scal)),
data = DNase1, start = list(Asym = 3, xmid = 0, scal = 1))
confint(mod1, k = 100) # just time optimization, consider k >= 200.
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.