Statalist


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

Re: st: Re: How to graph point estimate with twoway confidence intervals


From   "Taavi Lai" <taavi.lai@ut.ee>
To   statalist@hsphsun2.harvard.edu
Subject   Re: st: Re: How to graph point estimate with twoway confidence intervals
Date   Tue, 3 Mar 2009 17:10:26 +0200 (EET)

Thank you for the suggestion, I'll this and look into -eclplot- as well.
In the meantime I settled for two overlayed confidence range plots instead
of originally intended ellip.

************
tw pcbarrow ycil cost yciu cost ///
   || pcbarrow yll ccil yll cciu ///
   || scatter yll cost, mcol(black) mlab(grp) mlabcol(black) mlabpos(2) ///
   ylab(0(200)1600, angle(hor)) xlab(0(200)1600) ///
   ytitle(YLL) xtitle(Cost) ///
   legend(off) graphregion(fcol(white))
************

Best regards,
Taavi

Martin Weiss kirjutas:
> <>
>
> Well, if you could be bothered to aggregate the two widths of the CIs
into one measure, Stata could plot differently sized ellipses for you
based on it. I know it is a crude method...
>
> ************
> g diff=cciu- ccil+ yciu- ycil
> tw (sc yll cost [aw=diff], msymbol(oh)) (sc yll cost, msize(small))
> ************
>
> Apart from that, a useful representation of CIs is usually achieved via
-ssc d eclplot-
>
> HTH
> Martin
> _______________________
> ----- Original Message ----- From: "Taavi Lai" <taavi.lai@ut.ee>
> To: <statalist@hsphsun2.harvard.edu>
> Sent: Sunday, March 01, 2009 1:27 AM
> Subject: st: How to graph point estimate with twoway confidence intervals
>
>
>> Dear statalist,
>>
>> I have a dataset which contains following variables
>> - group
>> - outcome (yll)
>> - cost (associated with the outcome)
>> - upper and lower confidence bounds for both outcome and cost
>>
>> All variables have one observation per group as follows
>> +--------------------------------------------------+
>> grp   yll   ycil   yciu    cost    ccil     cciu
>> --------------------------------------------------
>> 1. 1   838    221   1449   608.7     558   1572.6
>> 2. 2   257     62    408     178   163.2    459.8
>> 3. 3   534    138    908   369.8     339    955.4
>> 4. 4   546    139    908   378.1   346.6    976.8
>>
>> What I'd like to do is a twoway scatter of outcome versus cost with added
>> confidence/uncertainty bounds of both outcome and cost for every point in
>> the scatter in the form of an ellip or circle.
>>
>> I've had a look on the -ellip- command, but this requires at least three
>> observations per group for operation and that I don't have unfortunately.
>>
>> I would very much appreciate all the suggestions on how this type of graph
>> might be produced.
>>
>> Best regards,
>> Taavi
>>
>> ----
>> Taavi Lai
>> Public Health Department
>> University of Tartu
>> Ravila 19, Tartu 50411
>> Estonia
>>
>>
>>
>>
>> *
>> *   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/




*
*   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/



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