run_cwb  R Documentation 
Calculate bootstrap outcomes or test statistics using cluster
wild bootstrapping for metaanalytic models fit using
robumeta::robu()
, metafor::rma.mv()
, and metafor::rma.uni()
.
run_cwb(
model,
cluster,
R,
f = NULL,
...,
auxiliary_dist = "Rademacher",
adjust = "CR0",
simplify = FALSE,
seed = NULL,
future_args = NULL,
future_f_args = NULL
)
model 
Fitted 
cluster 
Vector indicating which observations belong to the same cluster. 
R 
Number of bootstrap replications. 
f 
Optional function to be used to calculate bootstrap test statistics
based on the bootstrapped outcomes. If f is 
... 
Optional arguments to be passed to the function specified in

auxiliary_dist 
Character string indicating the auxiliary distribution to be used for cluster wild bootstrapping, with available options: "Rademacher", "Mammen", "Webb six", "uniform", "standard normal". The default is set to "Rademacher." We recommend the Rademacher distribution for models that have at least 10 clusters. For models with less than 10 clusters, we recommend the use of "Webb six" distribution. 
adjust 
Character string specifying which smallsample adjustment
should be used to multiply the residuals by. The available options are

simplify 
Logical, with 
seed 
Optional seed value to ensure reproducibility. 
future_args 
Optional list of additional arguments passed to the

future_f_args 
Optional list of additional arguments passed to the

A list or matrix containing either the bootstrapped outcomes or bootstrapped test statistics.
library(clubSandwich)
library(robumeta)
model < robu(d ~ 0 + study_type + hrs + test,
studynum = study,
var.eff.size = V,
small = FALSE,
data = SATcoaching)
bootstraps < run_cwb(
model = model,
cluster = model$data.full$study,
R = 12,
adjust = "CR2",
simplify = FALSE
)
bootstraps
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.