Bookmark and Share

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: ploting self-computed odd ratios and the 95%CI


From   "PAPANIKOLAOU P." <[email protected]>
To   <[email protected]>
Subject   st: RE: ploting self-computed odd ratios and the 95%CI
Date   Thu, 21 Nov 2013 11:04:28 -0000

Dear Lover
Thank you very much for making the time and lending me your expertise to
provide me with the script how to plot the OR and its 95CI.  
Whilst I follow your script adjusted to my data, unfortunately, STATA
does not produce the right graph that it should, as it did with your
example.
For one reason or another, it puts a few cases (probably 4)to the wrong
month so that there are no observations between September and December
i.e., these observation appear elsewhere.
Could you please be so kind as to advise me how best to resolve this
issue I would be most appreciative.
Thank you ever so much.
I appreciate your input.

. input str5 month point min95 max95

         month      point      min95      max95
  1. J 1.03 0.93 1.15
  2. F 1.04 0.93 1.17
  3. M 1.16 1.05 1.28
  4. A 1.12 1.02 1.12
  5. M 1.16 1.05 1.28
  6. J 1 0.93 1.15
  7. J 0.98 0.88 1.09
  8. A 0.86 0.77 0.96
  9. S 0.93 0.84 1.04
 10. O 0.9 0.8 1
 11. N 0.89 0.8 0.99
 12. D 0.93 0.83 1.03
 13. end

. sencode month, replace

. ecplot point min95 max95 month, hori ylabel(1 "J" 2 "F" 3 "M" 4 "A" 5
"M" 6 "J" 7 "J" 8 "A" 9 "S" 10 "O" 11 "N" 12 "D")
unrecognized command:  ecplot
r(199);

. eclplot point min95 max95 month, hori ylabel(1 "J" 2 "F" 3 "M" 4 "A" 5
"M" 6 "J" 7 "J" 8 "A" 9 "S" 10 "O" 11 "N" 12 "D")

. eclplot point min95 max95 month, xlabel(1 "J" 2 "F" 3 "M" 4 "A" 5 "M"
6 "J" 7 "J" 8 "A" 9 "S" 10 "O" 11 "N" 12 "D")

. eclplot point min95 max95 month, xlabel(1 "Jan" 2 "Feb" 3 "Mar" 4
"Apr" 5 "May" 6 "Jun" 7 "Jul" 8 "Aug" 9 "Sep" 10 "Oct" 11 "Nov" 12
"Dec")

. rename point OR

. eclplot OR min95 max95 month, xlabel(1 "Jan" 2 "Feb" 3 "Mar" 4 "Apr" 5
"May" 6 "Jun" 7 "Jul" 8 "Aug" 9 "Sep" 10 "Oct" 11 "Nov" 12 "Dec")


Kind regards
Panos



-----Original Message-----
From: [email protected]
[mailto:[email protected]] On Behalf Of
[email protected]
Sent: 16 November 2013 09:04
To: Statalist
Subject: st: re. ploting self-computed odd ratios and the 95%CI

Panos asks how to plot point estimates and 95% CIs; there's a package
for that:

******** start example ********

ssc install eclplot
sc install sencode

clear all
input str15 month point min95 max95
1Jan 10 12 14
2Feb 20 17 23
3Mar 30 25 35
end

sencode month, replace

eclplot point min95 max95 month, ///
xlabel(1 "Jan" 2"Feb" 3 "Mar")

eclplot point min95 max95 month, hori ///
ylabel(1 "Jan" 2"Feb" 3 "Mar")
exit

******** end example ********

Formatting data for usage can also be done in other ways (see
-eclplot- helpfile).

Cheers-

Andrew Lover
______________________________________________
Epidemiologist
Centre for Infectious Disease Epidemiology Research (CIDER) Saw Swee
Hock School of Public Health National University of Singapore
*
*   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/


© Copyright 1996–2018 StataCorp LLC   |   Terms of use   |   Privacy   |   Contact us   |   Site index