[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

From |
"Martin Weiss" <martin.weiss1@gmx.de> |

To |
<statalist@hsphsun2.harvard.edu> |

Subject |
st: Re: graph question |

Date |
Sun, 19 Apr 2009 19:35:36 +0200 |

<> With CIs :-) *** clear* qui{ //create data set obs 600 gen arm= cond(_n<301,0,1) lab def arms 0 "control" 1 "experimental" la val arm arms egen float interval = fill(0 1 3 6 9 12 0 1 3 6 9 12) egen float measurement = seq(), from(1) to(50) block(6)

gen mymeasurement=rnormal() } //check mean mymeasurement, over(arm interval) //collapse

gen lb= mean-invnormal(0.975)*semean gen ub= mean+invnormal(0.975)*semean //graph twoway (rcap lb ub interval, sort) (scatter mean interval), /// xlabel(0 1 3 6 9 12) by(, legend(off)) by(arm, note("")) **** HTH Martin _______________________

To: <statalist@hsphsun2.harvard.edu> Cc: <npandis@yahoo.com> Sent: Sunday, April 19, 2009 6:19 PM Subject: st: graph question

Hi to all. I would like to ask the following: I have continuous data for two trial arms (control and experiment). There are 50 measurements per arm. Data is collected at 6 time intervals.I would like to plot a bar chart with the x axis showing the intervals (0,1, 3, 6, 9, 12 months). Within each interval I would like to have one barfor the control and one for the experimental group.The y axis shows the mean of the measurement of interest.Additionally, I would like to show the confidence intervals at eachinterval per treatment group.Alternatively, I would like to draw a line plot with the same y and xaxis information, except that the two lines would represent the controland the experimental groups.Thank you very much, Nick * * For searches and help try: * http://www.stata.com/help.cgi?search * http://www.stata.com/support/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/statalist/faq * http://www.ats.ucla.edu/stat/stata/

**References**:**st: graph question***From:*Nikolaos Pandis <npandis@yahoo.com>

- Prev by Date:
**st: Re: graph question** - Next by Date:
**st: Principal Component Analysis, First Steps** - Previous by thread:
**st: Re: graph question** - Next by thread:
**st: RE: graph question** - Index(es):

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