summary.fwb {fwb} | R Documentation |
Summarize fwb
Output
Description
summary()
creates a regression summary-like table that displays the bootstrap estimates, their empirical standard errors, their confidence intervals, and, optionally, p-values for tests against a null value. confint()
produces just the confidence intervals, and is called internally by summary()
.
Usage
## S3 method for class 'fwb'
summary(
object,
conf = 0.95,
ci.type = "bc",
p.value = FALSE,
index = seq_len(ncol(object$t)),
null = 0,
simultaneous = FALSE,
...
)
## S3 method for class 'fwb'
confint(object, parm, level = 0.95, ci.type = "bc", simultaneous = FALSE, ...)
Arguments
object |
an |
conf , level |
the desired confidence level. Default is .95 for 95% confidence intervals. Set to 0 to prevent calculation of 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 if more than one was specified in |
null |
|
simultaneous |
|
... |
ignored. |
Details
P-values are computed by inverting the confidence interval for each parameter, i.e., finding the largest confidence level yielding a confidence interval that excludes null
, and taking the p-value to be one minus that level. This ensures conclusions from tests based on the p-value and whether the confidence interval contains the null value always yield the same conclusion. Prior to version 0.5.0, all p-values were based on inverting Wald confidence intervals, regardless of ci.type
.
Simultaneous confidence intervals are computed using the "sup-t" confidence band, which involves modifying the confidence level so that the intersection of all the adjusted confidence intervals contain the whole parameter vector with the specified coverage. This will always be less conservative than Bonferroni or Holm adjustment. See Olea and Plagborg-Møller (2019) for details on implementation for Wald and percentile intervals. Simultaneous p-values are computed by inverting the simultaneous bands. Simultaneous inference is only allowed when ci.type
is "wald"
or "perc"
and index
has length greater than 1. When ci.type = "wald"
, the mvtnorm package must be installed.
tidy()
and print()
methods are available for summary.fwb
objects.
Value
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}%
andCI {U}%
: the upper and lower confidence interval bounds computed using the argument toci.type
(only whenconf
is not 0). -
z value
: whenp.value = TRUE
andci.type = "wald"
, the z-statistic for the test of the estimate against againstnull
. -
Pr(>|z|)
: whenp.value = TRUE
, the p-value for the test of the estimate against againstnull
.
For confint()
, a matrix with a row for each statistic and a column for the upper and lower confidence interval limits.
References
Montiel Olea, J. L., & Plagborg-Møller, M. (2019). Simultaneous confidence bands: Theory, implementation, and an application to SVARs. Journal of Applied Econometrics, 34(1), 1–17. doi:10.1002/jae.2656
See Also
fwb()
for performing the fractional weighted bootstrap; fwb.ci()
for computing multiple confidence intervals for a single bootstrapped quantity
Examples
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,
# no confidence intervals
summary(fwb_out, ci.type = "norm", conf = 0,
index = "induced", p.value = TRUE)