Skip to content
Prev 2415 / 5636 Next

[R-meta] "Categorical" moderator varying within and between studies

Hi Simon,

There are different ways to parameterize contextual effects. With gender,
if you include the regular dummy variables (without group-mean-centering)
plus the cluster-level means, then the contextual effect will be as you
described (gender_M_btw - gender_M_wthn). However, another approach would
be to first group-mean-center the dummy variables. In this approach, for a
male student, gender_M_wthn would be equal to 1 minus the proportion of
male students in the cluster, and for a female student, gender_M_wthn would
be equal to the negative of the proportion of male students in the cluster.
If you do it this way, then the coefficient on gender_M_btw corresponds
exactly to the contextual effect, with no need to subtract out the
coefficient on gender_M_wthn.

All that said, if you have more than two categories you will have more than
one contextual effect. In your example, you have a contextual effect for M,
which would be the average difference in the DV between two units who are
both male, but belong to clusters that differ by 1 percentage point in the
composition of males *and have the same proportion of other-gender students
*(i.e., clusters that have 1 percentage point difference in males, and a -1
percentage point difference in females). And then you have a contextual
effect for other, corresponding the average difference in the DV
between two units who are both other-gender, but belong to clusters that
differ by 1 percentage point in the composition of other *and have the same
proportion of male-gender students *(i.e., clusters that have 1 percentage
point difference in other, and a -1 percentage point difference in females).

James
On Thu, Oct 29, 2020 at 12:24 PM Simon Harmel <sim.harmel at gmail.com> wrote:

            

  
  
Message-ID: <CAFUVuJwZSijD7VPaQJgwrSn8zPDJ9vcWteka5FZ6vfvijXAH4w-1751@mail.gmail.com>
In-Reply-To: <CACgv6yW_goZfPnKAMsmW==t7_A4hzkHT3m-u8xcogC8+KuKMfA@mail.gmail.com>