[R-meta] I2 for a multilevel model with subsets
Tharaka S. Priyadarshana
th@r@k@@@pr|y@d@r@h@n@ @end|ng |rom gm@||@com
Thu Aug 26 13:15:21 CEST 2021
I am trying to calculate I2 for a multilevel model with subsets –
My model looks like as below,
m1<- rma.mv(yi, vi, random = ~ 1 | Study_ID / Sub_sudy_ID, data=dat,
Then I ran,
W <- diag(1/dat$vi) # this work
X <- model.matrix(m1) # this work
P <- W - W %*% X %*% solve(t(X) %*% W %*% X) %*% t(X) %*% W # this does not
Here I get the following error message,
"Error in W %*% X : non-conformable arguments"
Could someone please help me with this.
[[alternative HTML version deleted]]
More information about the R-sig-meta-analysis