Calculates p-values for single coefficient and multiple contrast hypothesis tests using cluster wild bootstrapping.

cwb(full_model, indices, R = 999, adjust = FALSE)

Arguments

full_model

a model fit using robu() or rma.mv() that includes all moderators of interest.

indices

indices of the variables to be tested in single coefficient test or multiple contrast hypothesis test.

R

number of bootstrap replications.

adjust

logical indicating whether or not to multiply residuals by CR2 adjustment matrices when bootstrapping.

Value

A tibble containing the name of the test, p-value, and the name of the working model. CE denotes correlated effects and HE denotes hierarchical effects.

Examples

#> Registered S3 method overwritten by 'clubSandwich': #> method from #> bread.mlm sandwich
library(robumeta) full <- robu(d ~ study_type, studynum = study, var.eff.size = V, small = FALSE, data = SATcoaching) cwb(full_model = full, indices = 2:3, R = 99)
#> test working_model p_val #> 1 CWB CE 0.5959596 #> boot_F #> 1 0.204062647, 0.321555201, 0.138502539, 1.022452292, 0.530547925, 0.256763377, 0.644145920, 0.012206572, 0.453837882, 1.092454430, 0.555589724, 0.870274128, 0.139335905, 0.828647319, 0.646777545, 1.948420779, 0.954593394, 0.953536897, 2.164888540, 3.754830030, 1.209216269, 3.667245079, 3.932608835, 2.600702818, 0.960416003, 2.801408845, 0.238239796, 1.924310527, 0.768334220, 0.850257693, 0.936283337, 1.097726416, 0.121568896, 1.158753974, 2.242607655, 5.285942101, 0.825922024, 1.826428115, 4.014053841, 0.124248332, 3.746065347, 0.151698821, 0.752223965, 0.386398423, 0.500226428, 0.797777132, 0.915227023, 2.865816011, 1.043874692, 0.343665845, 0.388098385, 3.330606984, 2.421140107, 0.666626386, 2.438154934, 0.366559531, 0.692380022, 0.280374418, 1.332492243, 0.531383641, 4.597385830, 0.037688785, 1.532628259, 0.654522186, 1.076909373, 1.195725367, 0.004672314, 0.087835355, 2.646223153, 0.016346886, 0.658786859, 1.135266387, 0.534612121, 0.089656599, 3.263233510, 1.362564867, 1.405300025, 0.704568962, 0.725319730, 0.370926762, 2.521753257, 0.302195307, 0.400051411, 1.166008052, 0.415459167, 0.795572739, 1.875192302, 2.894679526, 0.458508789, 0.559746116, 1.353655446, 0.364266767, 0.542986035, 0.947046615, 2.022600377, 0.034822434, 0.198995670, 0.253112328, 0.025482601