Skip to content
Prev 3942 / 5636 Next

[R-meta] A possible bug in clubSandwich::Wald_test()

Stefanou,

I don't think this is a bug per se. The error occurs because your
variance-covariance matrix is not positive-definite (and therefore cannot
be inverted for a Wald test). This happens because two of the levels you're
trying to test occur in just a single study each:
+   group_by(teaching_level, time) %>%
+   summarise(
+     effects = n(),
+     studies = n_distinct(study)
+   )
# A tibble: 9 x 4
# Groups:   teaching_level [3]
  teaching_level time        effects studies
  <chr>          <chr>         <int>   <int>
1 elementary     Baseline         11       8
2 elementary     Post-test 1      18      11
3 mixed          Baseline          5       5
4 mixed          Post-test 1       9       8
5 mixed          Post-test 2       1       1
6 mixed          Post-test 3       1       1
7 secondary      Baseline          8       8
8 secondary      Post-test 1      12       9
9 secondary      Post-test 2       3       3

Sandwich estimators will simply not work for such tests.

Apart from this, it's not clear to me why you would want to simultaneously
test all nine coefficients in this model. The null being tested is that the
average effect size is equal to zero in each of the nine groups.

James

On Sun, Mar 13, 2022 at 1:01 PM Stefanou Revesz <stefanourevesz at gmail.com>
wrote: