Mike,
-help collapse- shows that pweights are allowed with -collapse-. Therefore,
collapse drugA drugB drugC [pweight=pwt], by(year)
followed by a -twoway line- ought to give you what you need.
Eva
2008/9/25 Mike Schmitt <[email protected]>:
> Hi all,
>
> Using the Bar Chart, I can use sample weights and graph the mean of
> each of my variables to get the plot of interest. I was wondering if
> I could get a line graph showing same data (ie, lines instead of
> bars). Using Stata 10.1, it seems that there is no way to enter in
> sample weights for a basic twoway line graph, unless I'm over looking
> something.
>
> My current bar chart syntax is:
> graph bar (mean) drugA (mean) drugB (mean) drugC [pweight = pwt], over(year)
>
> And the bar chart is spot on, like it should be, however I'm dumb
> founded of how to coerce stata into giving me the same graph only with
> lines. Thanks to previous help from this listserv, I know that I can
> collapse the data to get Stata to get a line graph of means, however
> I'm unsure of how that can be done while maintaining the weighting
> procedure and hence I'm a tad apprehensive to do that. If I could
> just swap the bars I'd be happy. Any thoughts? Thanks,
>
*
* 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/