Announcement

Collapse
No announcement yet.
X
  • Filter
  • Time
  • Show
Clear All
new posts

  • Joining confidence intervals with a line

    i have plotted Confidence intervals (CIs) for prevalences of frequent alcohol consumption, obesity and hypertension by age group using the codes
    ciplot freqalcohol hyper obese , by(agegrp) binomial jeffreys

    what can i add to get lines that connect the CIs. i wish to see the three lines and their CIs?

  • #2
    ciplot is from SSC, as you are asked to explain. See also #2 of https://www.statalist.org/forums/for...ence-intervals

    What would be the meaning or value of such lines?

    Comment


    • #3
      Thanks
      simply to show a trend over the age groups

      Comment


      • #4
        But that makes no sense with ciplot's design, as age groups would be separated, not juxtaposed.

        As already suggested, just use statsby and design your own graph. Here is a silly but reproducible example.

        Code:
        sysuse auto, clear
        clonevar rep78_2 = rep78 
        recode rep78_2 1=2
        statsby , by(rep78_2) clear : ci proportion foreign, jeffreys
        twoway line mean rep78_2 || scatter mean rep78_2 || rcap ub lb rep78_2 , ///
        legend(off) ytitle(Proportion foreign) note(Repair record 2 includes 1)

        Comment


        • #5
          thanks a lot.
          naz

          Comment

          Working...
          X