| bootbsw | R Documentation |
bsw()bootbsw() applies nonparametric bootstrapping to an object of class "bsw"
and computes bias-corrected accelerated confidence intervals (BCa) for the estimated Relative Risk.
bootbsw(object, ci_level = 0.95, R = 1000L, maxit = NULL, conswitch = NULL)
object |
An object of the class |
ci_level |
A value between 0 and 1 indicating the confidence interval.
Provides bias-corrected accelerated bootstrap confidence intervals
of the original estimated model parameters of |
R |
A positive integer greater than or equal to 1000 giving the number of bootstrap replicates. |
maxit |
A positive integer giving the maximum number of iterations in the |
conswitch |
Specifies how the constraint matrix is constructed:
If |
An object of class "bsw_boot", which is a list containing:
The original call to the bsw() function used to fit the model.
The number of bootstrap replicates that were completed successfully.
A character string with a status message indicating how many bootstrap samples succeeded.
A matrix with the original estimated model parameters (Orig. Est.), the mean of the bootstrap estimates (Boot. Est.), the standard error of the bootstrap estimates (Boot. SE), the difference between the bootstrap mean and the original estimate (bias), the Risk Difference (equal to the estimate; RD), and the bias-corrected accelerated confidence intervals at the specified level.
An object of class "boot" (from the boot package) containing the full bootstrap output,
including replicates and metadata. This can be used for further analyses or plotting.
Julius Johannes Weise, Thomas Wolf, Stefan Wagenpfeil
set.seed(123)
x <- rnorm(100, 50, 10)
y <- rbinom(100, 1, exp(-4 + x * 0.04))
fit <- bsw(formula = y ~ x, data = data.frame(y = y, x = x))
result <- bootbsw(fit, ci_level = 0.90)
print(result)
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.