Description Usage Arguments Value References Examples
Generates adjusted p-values using the algorithm described in Westfall and Young (1993).
1 2 3 |
full_formulas |
A list of objects of class |
null_formulas |
A list of objects of class |
data |
A data frame containing the variables in the models. |
coef_list |
A character vector specifying the variable for each model for which the p-value is to be adjusted. |
weights |
An optional list of weights to be used in the fitting process.
Each element of the list should be a numeric vector with length equals to
the number of rows in |
cluster |
An optional character string indicating the column in the data frame that records the cluster to which an observation belongs (for computing standard errors that account for clustering). |
nboots |
The number of bootstrap replicates, a single positive integer. |
boot_type |
A character string indicating the type of resampling
required. Possible values are |
parallel |
logical, indicating if parallel operation is to be used. If
|
pb |
logical. Should a progress bar be displayed if |
A data frame reporting unadjusted and adjusted p-values for each
hypothesis provided in full_formulas
and null_formulas
.
Westfall, Peter H., and S. Stanley Young. 1993. Resampling- Based Multiple Testing: Examples and Methods for P-Value Adjustment. John Wiley & Sons, New York.
1 2 3 4 5 6 7 8 9 10 11 | # Replicate Casey et al 2012, Table II Column 3
F <- lapply(sprintf("zscore_%d ~ 0 + t + tothhs + road + ward", 1:12),
as.formula)
pvals <- boot_stepdown(full_formulas = F,
null_formulas = lapply(F, update, . ~ . - t),
data = gobifo,
coef_list = "t",
nboots = 100, # small nboots for demonstration only
parallel = FALSE,
boot_type = "pairs")
dplyr::mutate_if(pvals, is.numeric, round, 3)
|
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.