Created
July 1, 2018 05:59
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
clear | |
input id str16 author year case1 tot1 case0 tot0 dose | |
1 "Eskola" 1990 4 58000 37 56000 3 | |
2 "Lagos" 1996 4 48080 40 46948 3 | |
3 "Mulholland" 1997 5 1397 9 1098 1 | |
3 "Mulholland" 1997 5 1397 9 1098 2 | |
3 "Mulholland" 1997 10 21490 40 21498 3 | |
4 "Santosham" 1991 0 532 8 505 1 | |
4 "Santosham" 1991 1 2588 22 2602 2 | |
4 "Santosham" 1991 | |
5 "Ward" 1990 3 1054 4 1048 1 | |
5 "Ward" 1990 2 991 3 966 2 | |
5 "Ward" 1990 8 1054 12 1048 3 | |
6 "Black" 1991 3 30400 22 30880 3 | |
7 "Booy" 1994 3 18315 22 30680 3 | |
8 "Vadheim" 1993 0 5211 3 5106 3 | |
9 "Gessner" 2005 1 20156 5 19150 3 | |
end | |
list | |
*Calculate RR and log(RR) | |
gen non1=tot1-case1 | |
gen non0=tot0-case0 | |
replace case1 = 0.5 if case1 == 0 | |
replace case0 = 0.5 if case0 == 0 | |
gen rr = (case1/tot1)/(case0/tot0) | |
gen logrr=log((case1/tot1)/(case0/tot0)) | |
gen selogrr=sqrt((non1/(case1*tot1)) + (non0/(case0*tot0))) | |
list id selogrr | |
graph twoway (scatter rr dose, mlabel(id)), /// | |
graphregion( color(white) ) plotregion( fcolor(white) ) /// | |
legend(off) xtitle(dose) ytitle(RR) /// | |
xlabel(1(1)3) | |
*meta-regression | |
xi: metareg logrr i.dose, wsse(selogrr) random eform |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment