Dear all, I'm currently applying a mixed model approach to meta analysis using the package metafor. I use the "model.matrix()" function to create dummy variables. The option btt gives me the combined test for the dummies. Problem is, I don't know which indices I have to use, and can't really figure it out from the help file and the examples. I use following code :
X <- model.matrix(~factor, data=testdata)[,2:5] # to exclude the intercept. Otherwise I get singular issues in the rma model rma(ai, bi, ci, di, mods=X, data=testdata,btt=c(2:5),measure="OR") Now I'm not sure whether btt reads the model intercept of rma as index 1, or the first dummy as index 1. So I'm not sure if I should use : rma(ai, bi, ci, di, mods=X, data=testdata,btt=c(1:4),measure="OR") from the examples in the help files, I should use the first option. But there I see no option used to exclude an intercept from the model matrix. All help greatly appreciated. Thank you in advance Joris -- Joris FA Meys Statistical Consultant Ghent University Faculty of Bioscience Engineering Department of Applied mathematics, biometrics and process control Coupure Links 653 B-9000 Gent tel : 09/ 264 59 87 joris.m...@ugent.be ------------------------------- Disclaimer : http://helpdesk.ugent.be/e-maildisclaimer.php [[alternative HTML version deleted]] ______________________________________________ R-help@r-project.org mailing list https://stat.ethz.ch/mailman/listinfo/r-help PLEASE do read the posting guide http://www.R-project.org/posting-guide.html and provide commented, minimal, self-contained, reproducible code.