[R-meta] Model with intercept gives 0 heterogeneity but without intercept is ok
Viechtbauer, Wolfgang (SP)
wo||g@ng@v|echtb@uer @end|ng |rom m@@@tr|chtun|ver@|ty@n|
Mon Aug 30 23:53:58 CEST 2021
>-----Original Message-----
>From: Luke Martinez [mailto:martinezlukerm using gmail.com]
>Sent: Monday, 30 August, 2021 23:17
>To: Viechtbauer, Wolfgang (SP)
>Cc: R meta
>Subject: Re: [R-meta] Model with intercept gives 0 heterogeneity but without
>intercept is ok
>
>Thank you, Wolfgang. I visited the link you kindly shared. But that link only
>discusses the effect of removing the intercept on the fixed parts, not random
>parts.
>
>Also, in that link the fixed parts only include either a categorical or only a
>continuous moderator, but not both types of moderators together. For example, if
>we have two categorical moderators and one continuous moderator, as in:
>
>data$gender <- sample(c("M","F"),nrow(data),replace = TRUE)
>data$sector <- sample(c("Pr","Pv", "NGO"),nrow(data),replace = TRUE)
>
>Then, removing the intercept is the matter of which categorical moderator appears
>last in the formula! For example, in:
>
>(A): rma.mv(yi ~ 0 + gender + sector + X , vi, random = ~ 1 | study/outcome,
>data = data)
>
>R removes the intercept for "sector" because it appears last. But, in:
>
>(B): rma.mv(yi ~ 0 + sector + gender + X , vi, random = ~ 1 | study/outcome,
>data = data)
>
>R removes the intercept for "gender" because it appears last.
>
>My question is that do these behaviors in the fixed-part, essentially, change the
>meaning/nature (e.g., what average is varying across study levels) of the random
>parts?
In the models above: No. All of the models are above are essentially the same, the fixed effects are just parameterized differently. They have the same log likelihood, the same fitted values, the same residuals, etc. etc.
>Apparently, the random part is not related to the fixed-part in rma.mv(), and
>that's why both (A) and (B), with or without the intercepts (i.e., 4
>specification) all give the exact same estimates of their two variance components?
This is true if the different parameterizations of the fixed effects are ultimately identical (as is the case above).
>Thank you,
>Luke
More information about the R-sig-meta-analysis
mailing list