summary.fwb | R Documentation |
fwb
Outputsummary()
creates a regression summary-like table that displays the bootstrap estimates, their empirical standard errors, and their confidence intervals. confint()
produces just the confidence intervals, which are computed using fwb.ci()
, and is called internally by summary()
.
## S3 method for class 'fwb'
summary(
object,
conf = 0.95,
ci.type = "bc",
p.value = FALSE,
index = 1L:ncol(object$t),
...
)
## S3 method for class 'fwb'
confint(object, parm, level = 0.95, ci.type = "bc", ...)
object |
an |
conf , level |
the desired confidence level. Default is .95 for 95% confidence intervals. |
ci.type |
the type of confidence interval desired. Allowable options include |
p.value |
|
index , parm |
the index or indices of the position of the quantity of interest in |
... |
ignored. |
For summary()
, a summary.fwb
object, which is a matrix with the following columns:
Estimate
: the statistic estimated in the original sample
Std. Error
: the standard deviation of the bootstrap estimates
CI {L}%
and CI {U}%
, the upper and lower confidence interval bounds computed using the argument to ci.type
.
When p.value = TRUE
, two additional columns, z value
and Pr(>|z|)
, are included containing the z-statistic and p-value for each computed statistic, respectively.
For confint()
, a matrix with a row for each statistic and a column for the upper and lower confidence interval limits.
fwb()
for performing the fractional weighted bootstrap; fwb.ci()
for computing multiple confidence intervals for a single bootstrapped quantity
set.seed(123, "L'Ecuyer-CMRG")
data("infert")
fit_fun <- function(data, w) {
fit <- glm(case ~ spontaneous + induced, data = data,
family = "quasibinomial", weights = w)
coef(fit)
}
fwb_out <- fwb(infert, fit_fun, R = 199,
verbose = FALSE)
# Basic confidence interval for both estimates
summary(fwb_out, ci.type = "basic")
# Just for "induced" coefficient; p-values requested
summary(fwb_out, index = "induced", p.value = TRUE)
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.