Announcement

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

  • Continuity of Care

    Dear members
    I 'm in the process of analysis continuity of care for patients in primary care. We have lines of data on the following 4 variable for each patient:

    Personal id * GP Provider number * start date * end date

    If the patient has moved from one GP to another an "end date" and related new "start date" at another clinics are generated in a new data line.
    This means the data comprise from one 1 to many lines per patient.

    Do you have any suggestions for statacode that has been developed to analyse this type of continuity of care?

    I hope you can help me review some of the best "state of the art" in stat-coding within this specific topic? or just help me get started using useful code?

    The above mentioned data are merged to a range of other data.

    Thank you in advance.

    All the best
    Troels


  • #2
    Troels:
    the -group- function available from -egen- can be a good place to start from.
    Kind regards,
    Carlo
    (Stata 19.0)

    Comment


    • #3
      Hi Carlo
      Thank you. I will look into that. Are you aware of any existing stata code in this field of research that could be useful to explore? So far I have not been able to locate any here at statalist, but I think someone must have experience in this area :-)
      Best
      Troels

      Comment


      • #4
        Hi Carlo

        I think egen is applied in the document on: Identifying runs of consecutive observations in panel data

        Is this the type of application you are referring to? Not sure this is applying the group-function?

        https://www.stata.com/support/faqs/d...-observations/
        Best
        Troels

        Comment


        • #5
          Troels:
          not quite. -egen- has many functions that can be really useful.
          That said, unfortunately the -egen- -group- function cannot be byable and, as such, cannot support you.
          Another approach that springs to my mind is reporeted in the following toy-example:
          Code:
          . set obs 6
          number of observations (_N) was 0, now 6
          
          . g id=1 in 1/3
          
          . replace id=2 in 4/6
          
          . bysort id: g year=2020+_n
          
          . g GP=1 if id==1
          
          . replace GP=1 in 4
          
          
          . replace GP=2 in 5/6
          
          . egen wanted=group(id GP)
          
          . bysort id: egen check=mean(wanted)
          
          . list
          
               +------------------------------------+
               | id   year   GP   wanted      check |
               |------------------------------------|
            1. |  1   2021    1        1          1 |
            2. |  1   2022    1        1          1 |
            3. |  1   2023    1        1          1 |
            4. |  2   2021    1        2   2.666667 |
            5. |  2   2022    2        3   2.666667 |
               |------------------------------------|
            6. |  2   2023    2        3   2.666667 |
               +------------------------------------+
          
          .
          The underlying idea is that, if the id-specific mean differs from -wanted- value(s), the -id- has signed up to a different GP.
          Last edited by Carlo Lazzaro; 12 Nov 2021, 01:27.
          Kind regards,
          Carlo
          (Stata 19.0)

          Comment

          Working...
          X