Announcement

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

  • How would I best represent these data graphically

    I am using STATA for analysis to prepare a presentation and I am having a bit of a thought block. Which graphical presentation would best suit these data to show that as the years went by, the retention to care (i.e those coming for 2nd and subsequent visits) improved?
    Year Visit_1 Visit_2 Visit_3 Visit_4 Visit_5 Visit_6 Visit_7 Visit_8 Visit_9 Visit_10 Visit_11 Visit_12 Visit_13
    2007 117 0 0 0 0 0 0 0 0 0 0 0 0
    2008 64 0 0 0 0 0 0 0 0 0 0 0 0
    2009 154 0 0 0 0 0 0 0 0 0 0 0 0
    2010 58 0 0 0 0 0 0 0 0 0 0 0 0
    2011 8 0 0 0 0 0 0 0 0 0 0 0 0
    2012 11 0 0 0 0 0 0 0 0 0 0 0 0
    2013 9 0 0 0 0 0 0 0 0 0 0 0 0
    2014 16 0 0 0 0 0 0 0 0 0 0 0 0
    2015 24 0 0 0 0 0 0 0 0 0 0 0 0
    2016 19 0 0 0 0 0 0 0 0 0 0 0 0
    2017 154 0 0 0 0 0 0 0 0 0 0 0 0
    2018 364 0 0 0 0 0 0 0 0 0 0 0 0
    2019 1429 1003 299 34 3 0 0 0 0 0 0 0 0
    2020 372 664 1015 969 646 290 99 27 9 4 4 1 1
    2021 426 366 340 365 516 654 609 451 237 99 42 12 5
    2022 573 415 337 296 276 363 416 472 465 434 324 211 111
    2023 108 (12 new) 78 76 77 62 54 51 67 71 82 89 85 62

  • #2
    Are these frequencies (counts)?

    Comment


    • #3
      Originally posted by Nick Cox View Post
      Are these frequencies (counts)?
      They are counts

      Comment


      • #4
        What I am most confident about is your being better off with a long data layout. Here is one idea otherwise.

        Code:
        * Example generated by -dataex-. For more info, type help dataex
        clear
        input int(year visit_1 visit_2 visit_3 visit_4 visit_5 visit_6 visit_7 visit_8 visit_9 visit_10 visit_11 visit_12 visit_13)
        2007  117    0    0   0   0   0   0   0   0   0   0   0   0
        2008   64    0    0   0   0   0   0   0   0   0   0   0   0
        2009  154    0    0   0   0   0   0   0   0   0   0   0   0
        2010   58    0    0   0   0   0   0   0   0   0   0   0   0
        2011    8    0    0   0   0   0   0   0   0   0   0   0   0
        2012   11    0    0   0   0   0   0   0   0   0   0   0   0
        2013    9    0    0   0   0   0   0   0   0   0   0   0   0
        2014   16    0    0   0   0   0   0   0   0   0   0   0   0
        2015   24    0    0   0   0   0   0   0   0   0   0   0   0
        2016   19    0    0   0   0   0   0   0   0   0   0   0   0
        2017  154    0    0   0   0   0   0   0   0   0   0   0   0
        2018  364    0    0   0   0   0   0   0   0   0   0   0   0
        2019 1429 1003  299  34   3   0   0   0   0   0   0   0   0
        2020  372  664 1015 969 646 290  99  27   9   4   4   1   1
        2021  426  366  340 365 516 654 609 451 237  99  42  12   5
        2022  573  415  337 296 276 363 416 472 465 434 324 211 111
        2023  108   78   76  77  62  54  51  67  71  82  89  85  62
        end
        
        reshape long visit_, i(year) j(visit)
        rename visit_ count
        
        set scheme s1color 
        
        twoway bar count visit , by(year, compact note("")) lcolor(blue) fcolor(blue*0.2) barw(0.8) xla(1(2)13) name(G1, replace)


        Click image for larger version

Name:	visits.png
Views:	1
Size:	33.4 KB
ID:	1705767

        Comment


        • #5
          Originally posted by Nick Cox View Post
          What I am most confident about is your being better off with a long data layout. Here is one idea otherwise.

          Code:
          * Example generated by -dataex-. For more info, type help dataex
          clear
          input int(year visit_1 visit_2 visit_3 visit_4 visit_5 visit_6 visit_7 visit_8 visit_9 visit_10 visit_11 visit_12 visit_13)
          2007 117 0 0 0 0 0 0 0 0 0 0 0 0
          2008 64 0 0 0 0 0 0 0 0 0 0 0 0
          2009 154 0 0 0 0 0 0 0 0 0 0 0 0
          2010 58 0 0 0 0 0 0 0 0 0 0 0 0
          2011 8 0 0 0 0 0 0 0 0 0 0 0 0
          2012 11 0 0 0 0 0 0 0 0 0 0 0 0
          2013 9 0 0 0 0 0 0 0 0 0 0 0 0
          2014 16 0 0 0 0 0 0 0 0 0 0 0 0
          2015 24 0 0 0 0 0 0 0 0 0 0 0 0
          2016 19 0 0 0 0 0 0 0 0 0 0 0 0
          2017 154 0 0 0 0 0 0 0 0 0 0 0 0
          2018 364 0 0 0 0 0 0 0 0 0 0 0 0
          2019 1429 1003 299 34 3 0 0 0 0 0 0 0 0
          2020 372 664 1015 969 646 290 99 27 9 4 4 1 1
          2021 426 366 340 365 516 654 609 451 237 99 42 12 5
          2022 573 415 337 296 276 363 416 472 465 434 324 211 111
          2023 108 78 76 77 62 54 51 67 71 82 89 85 62
          end
          
          reshape long visit_, i(year) j(visit)
          rename visit_ count
          
          set scheme s1color
          
          twoway bar count visit , by(year, compact note("")) lcolor(blue) fcolor(blue*0.2) barw(0.8) xla(1(2)13) name(G1, replace)


          [ATTACH=CONFIG]n1705767[/ATTACH]
          Thank you Nick, this can work for now but I will try to format the data and replot

          Comment

          Working...
          X