Notice: On April 23, 2014, Statalist moved from an email list to a forum, based at statalist.org.
From | XU XIAO <mail2xuxiao@gmail.com> |
To | statalist@hsphsun2.harvard.edu |
Subject | st: plotting median and its confidence interval |
Date | Tue, 21 Jan 2014 14:33:14 +0200 |
Hi, I am treating the data which have 3 time points, say 1965, 1985, 1995. Also, I have a bunch of vars on each time point. var1 | var2 | var3———var8 | characteristic_vars | year 1 2 3 4 . . . Now, since there is some skewness in the data, I want to plot the medians and their confidence intervals for different groups(based on the characteristic) in each year, and connect the median with a line. Basically, I want to see how the medians of these vars of different groups changed as time went by (going through the 3 time points). What I have tried was: 1. use .bpmedian to find median and ci for one var of one group 2. use .parmest to save it into a dataset 3. do it for each year 4. append the 3 datasets i got from the previous steps 5. use serrbar to plot it After 5 steps, I got the plot for 1 var of 1 group, but I have 30 groups. Is there any easier way to do it? I mean, is there something like ciplot but plotting median and ci of the median instead? Also, how can I show several vars in one plot like what we can do in ciplot? I am looking forward to your reply, Respectfully yours, Xu * * 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/