Stata The Stata listserver
[Date Prev][Date Next][Thread Prev][Thread Next][Date index][Thread index]

st: confidence intervals around point estimates plotted against time ascategorical variable


From   [email protected]
To   <[email protected]>
Subject   st: confidence intervals around point estimates plotted against time ascategorical variable
Date   Fri, 6 May 2005 17:11:19 -0500

Hello 

Many thanks to Nick Cox about the earlier response. I have another 
problem...

The dataset contains: 

1000 patients (observations), each with the following variables: 

date:  day and month patient enrolled
x: "1" for using drug x and "2" for not using drug x.

As suggested by NC, I used: egen medx = mean(100*(2-x)), by(month)
I was able to nicely plot medx vs. month, showing what percentage of 
patients are using drug x in that given  month. 

Now, I wish to add 95% confidence intervals around the percentages for 
each given month.  I've read and downloaded Roger Newson's program and 
tried to use rcap, but cannot seem to figure out how to do this easily, 
much less do it at all. I've been working on this for over 2 hours, so 
thought would ask for help.

Also, when I use box plot, I get data markers on "1" and "0" for a given 
month. 

Thank you in advance, 
Richard Lenhardt



*
*   For searches and help try:
*   http://www.stata.com/support/faqs/res/findit.html
*   http://www.stata.com/support/statalist/faq
*   http://www.ats.ucla.edu/stat/stata/



© Copyright 1996–2024 StataCorp LLC   |   Terms of use   |   Privacy   |   Contact us   |   What's new   |   Site index