View source: R/Wald_test_wildmeta.R
Wald_test_cwb  R Documentation 
Calculate pvalues for single coefficient and multiple contrast hypothesis tests using cluster wild bootstrapping.
Wald_test_cwb(
full_model,
constraints,
R,
cluster = NULL,
auxiliary_dist = "Rademacher",
adjust = "CR0",
type = "CR0",
test = "NaiveF",
seed = NULL,
future_args = NULL
)
full_model 
Model fit using 
constraints 
A q X p constraint matrix be tested. Alternately, a
function to create such a matrix, specified using

R 
Number of bootstrap replications. 
cluster 
Vector of identifiers indicating which observations
belong to the same cluster. If 
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

type 
Character string specifying which smallsample adjustment is used
to calculate the Wald test statistic. The available options are

test 
Character string specifying which (if any) smallsample
adjustment is used in calculating the test statistic. Default is

seed 
Optional seed value to ensure reproducibility. 
future_args 
Optional list of additional arguments passed to the

A data.frame
containing the name of the test, the adjustment
used for the bootstrap process, the type of variancecovariance matrix
used, the type of test statistic, the number of bootstrap replicates, and
the bootstrapped pvalue.
library(clubSandwich)
library(robumeta)
model < robu(d ~ 0 + study_type + hrs + test,
studynum = study,
var.eff.size = V,
small = FALSE,
data = SATcoaching)
C_mat < constrain_equal(1:3, coefs = coef(model))
Wald_test_cwb(full_model = model,
constraints = C_mat,
R = 12)
# Equivalent, using constrain_equal()
Wald_test_cwb(full_model = model,
constraints = constrain_equal(1:3),
R = 12)
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.