[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


Dear all,

I am trying to calculate I2 for a multilevel model with subsets –
following this,
https://www.metafor-project.org/doku.php/tips:i2_multilevel_multivariate

My model looks like as below,
m1<- rma.mv(yi, vi, random = ~ 1 | Study_ID / Sub_sudy_ID, data=dat,
subset=(Taxa_treatment=="Abundance")&(Taxa_fine=="Coleoptera"))

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
work
Here I get the following error message,
"Error in W %*% X : non-conformable arguments"

Could someone please help me with this.

Thank you,
Tharaka

	[[alternative HTML version deleted]]



More information about the R-sig-meta-analysis mailing list