Notice: On April 23, 2014, Statalist moved from an email list to a forum, based at statalist.org.
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
st: RE: RE: RE: Using the metan command
From
Kieran McCaul <[email protected]>
To
"[email protected]" <[email protected]>
Subject
st: RE: RE: RE: Using the metan command
Date
Wed, 10 Jul 2013 09:01:55 +0800
....
One of the RR's is not inside the CI.
gen byte flag = ((uci>=rr) & (rr>=lci))
tab flag
flag | Freq. Percent Cum.
------------+-----------------------------------
0 | 1 1.59 1.59
1 | 62 98.41 100.00
------------+-----------------------------------
Total | 63 100.00
list if flag==0, noobs
+-------------------------------------+
| id rr lci uci group flag |
|-------------------------------------|
| 60 .93 .82 .91 21 0 |
+-------------------------------------+
-----Original Message-----
From: [email protected] [mailto:[email protected]] On Behalf Of Amal Khanolkar
Sent: Tuesday, 9 July 2013 8:03 PM
To: [email protected]
Subject: st: RE: RE: Using the metan command
Hi Carole,
Thanks for the suggestion!
I've got it to work... :)
But however it seems to run only if I include a smaller part of my dataset with say 9 RR. If I run it on a dataset with 66 RR, I get the follwoing error msg:
metan rr lci uci
Effect size and confidence intervals invalid:
order should be {effect size, lower ci limit, upper ci limit}
r(9);
The dataset:
input id rr lci uci group
id rr lci uci group
1. 1 1.12 0.78 1.62 2
2. 2 0.96 0.83 1.30 2
3. 3 0.96 0.85 1.09 2
4. 4 0.84 0.65 1.07 3
5. 5 0.98 0.90 1.07 3
6. 6 0.95 0.88 1.02 3
7. 7 1.11 0.69 1.80 4
8. 8 1.08 0.90 1.30 4
9. 9 0.85 0.73 0.97 4
10. 10 1.76 1.24 2.50 5
11. 11 1.15 0.98 1.34 5
12. 12 0.86 0.75 0.99 5
13. 13 1.57 1.31 1.87 6
14. 14 0.90 0.82 0.97 6
15. 15 1.07 1.01 1.14 6
16. 16 0.86 0.51 1.45 7
17. 17 0.95 0.80 1.14 7
18. 18 1.31 1.16 1.47 7
19. 19 1.30 1.00 1.70 8
20. 20 0.98 0.88 1.10 8
21. 21 0.76 0.70 0.83 8
22. 22 0.99 0.71 1.40 9
23. 23 0.90 0.80 1.04 9
24. 24 0.91 0.81 1.01 9
25. 25 1.27 0.81 2.00 10
26. 26 0.74 0.60 0.93 10
27. 27 2.57 2.31 2.86 10
28. 28 0.87 0.52 1.44 11
29. 29 0.84 0.70 1.00 11
30. 30 0.70 0.60 0.82 11
31. 31 0.99 0.76 1.28 12
32. 32 0.96 0.87 1.06 12
33. 33 0.99 0.91 1.07 12
34. 34 1.67 1.30 2.14 13
35. 35 1.06 0.94 1.12 13
36. 36 0.68 0.62 0.76 13
37. 37 1.52 1.07 2.16 14
38. 38 1.62 1.42 1.84 14
39. 39 0.67 0.58 0.77 14
40. 40 1.27 0.87 1.85 15
41. 41 0.85 0.71 1.02 15
42. 42 1.85 1.67 2.04 15
43. 43 1.51 1.08 2.10 16
44. 44 1.20 1.06 1.36 16
45. 45 0.43 0.37 0.50 16
46. 46 1.53 0.92 2.55 17
47. 47 0.88 0.72 1.13 17
48. 48 0.74 0.60 0.90 17
49. 49 0.60 0.34 1.02 18
50. 50 1.10 0.94 1.28 18
51. 51 0.62 0.53 0.72 18
52. 52 2.03 1.32 3.12 19
53. 53 1.31 1.08 1.60 19
54. 54 0.90 0.74 1.08 19
55. 55 1.56 1.45 1.67 20
56. 56 1.02 0.99 1.05 20
57. 57 0.93 0.91 0.96 20
58. 58 1.10 1.01 1.21 21
59. 59 1.07 1.03 1.11 21
60. 60 0.93 0.82 0.91 21
61. 61 1.55 1.35 1.77 22
62. 62 1.01 0.95 1.07 22
63. 63 0.86 0.82 0.91 22
64. end
Is there a limit on the number of RR that can be included when using metan?
Thanks,
/Amal
________________________________________
From: [email protected] [[email protected]] on behalf of Khairallah, Carole [khaicar] [[email protected]]
Sent: 09 July 2013 12:21
To: [email protected]
Subject: st: RE: Using the metan command
Hi Amal,
Your error comes from the fact that you have 1 data line with value 0 as lower and upper CI.
If you remove this observation, your command will work.
To make the forest plot stratified by e_group, just add in the options: by(e_group)
One option:
metan rr lci uci, ///
nosecsub sgweight ///
by(e_group) ///
effect(Risk ratio in ... ) ///
dp(2) boxsca(30) aspect(0.8) astext(80) textsize(140)
Good luck
-----Original Message-----
From: [email protected] [mailto:[email protected]] On Behalf Of Amal Khanolkar
Sent: 09 July 2013 12:02
To: [email protected]
Subject: st: Using the metan command
Hi all,
Some issues with using the metan command. I've read the help file for the same, but I need some help in better understanding how I use this command.
I have a small dataset as follows:
input id rr lci uci e_group
1 1 0 0 1
2 1.12 0.78 1.62 2
3 0.96 0.83 1.30 2
4 0.96 0.85 1.09 2
5 0.84 0.65 1.07 3
6 0.98 0.90 1.07 3
7 0.95 0.88 1.02 3
8 1.11 0.69 1.80 4
9 1.08 0.90 1.30 4
10 0.85 0.73 0.97 4
11 1.76 1.24 2.50 5
12 1.15 0.98 1.34 5
13 0.86 0.75 0.99 5
14 1.57 1.31 1.87 6
15 0.90 0.82 0.97 6
16 1.07 1.01 1.14 6
17 0.86 0.51 1.45 7
18 0.95 0.80 1.14 7
19 1.31 1.16 1.47 7
20 1.30 1.00 1.70 8
21 0.98 0.88 1.10 8
22 0.76 0.70 0.83 8
The five variables above are: ID, risk ratio (rr), lower confidence limit, upper confidence limit, and ethnic group. In effect it is three RRs for three outcomes for each ethnic group obtained from a multinomial logistic regression model, which I would like to show using a forest plot.
Just to get a basic forest plot I typed:
metan rr lci uci
But I get this in response:
Effect size and confidence intervals invalid:
order should be {effect size, lower ci limit, upper ci limit}
So, I'm not sure if I have to provide the weights as part of the above command to get it to work? If so, how do I generate the weights? This is not a true meta-anaylsis that I'm trying to plot, but just relative risks from a multinomial logistic regression model. Ideally I would also like to group the RR according to the grouping variable above.
Thanks!
/Amal
*
* For searches and help try:
* http://www.stata.com/help.cgi?search
* http://www.stata.com/support/faqs/resources/statalist-faq/
* http://www.ats.ucla.edu/stat/stata/
*
* For searches and help try:
* http://www.stata.com/help.cgi?search
* http://www.stata.com/support/faqs/resources/statalist-faq/
* http://www.ats.ucla.edu/stat/stata/
*
* For searches and help try:
* http://www.stata.com/help.cgi?search
* http://www.stata.com/support/faqs/resources/statalist-faq/
* http://www.ats.ucla.edu/stat/stata/
*
* For searches and help try:
* http://www.stata.com/help.cgi?search
* http://www.stata.com/support/faqs/resources/statalist-faq/
* http://www.ats.ucla.edu/stat/stata/