Announcement

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

  • Test for a trend of bacterial resistance against antibiotics over ten years period

    Dear statalist,

    Unfortunately, I posted this question one week on cross-validated and have yet to get an answer (see here please: https://stats.stackexchange.com/q/603421/362674?sem=2).
    We are analyzing a dataset of Acinetobacter bacteria incidence and their resistance pattern against antibiotics over ten years (2013-2022). Every year, there are multiple resistant isolates, but that has a unique ID no. (i.e., stata_id in our dataset).

    Study hypotheses:
    • Null hypothesis: The trend of Acinetobacter resistance against antibiotics is stable (constant) over the study period.
    • Alternative hypothesis: The trend of Acinetobacter resistance against antibiotics changed (decreased/increased) over the study period.
    We are using Stata 17 SE.
    The structure of our dataset is as follows:
    Code:
    * Example generated by -dataex-. For more info, type help dataex
    clear
    input float stata_id byte year float pc_cra
       1  1 75.82089
    1898  7 87.38171
    2521  9 89.03509
    1672  6 94.06393
     100  1 75.82089
    2032  7 87.38171
    2519  9 89.03509
    2806 10  75.6654
    2700 10  75.6654
    2353  9 89.03509
     193  1 75.82089
     689  2 85.35912
    1200  4 84.98293
     258  1 75.82089
    1495  5 88.30189
      29  1 75.82089
    1117  4 84.98293
    1905  7 87.38171
     836  3 91.36213
     529  2 85.35912
    end
    format %ty year
    label values year Year
    label def Year 1 "2013", modify
    label def Year 2 "2014", modify
    label def Year 3 "2015", modify
    label def Year 4 "2016", modify
    label def Year 5 "2017", modify
    label def Year 6 "2018", modify
    label def Year 7 "2019", modify
    label def Year 9 "2021", modify
    label def Year 10 "2022", modify
    Description of variables:
    Code:
    . fre cra 
    
    cra -- Carbapenems resistant?
    -----------------------------------------------------------
                  |      Freq.    Percent      Valid       Cum.
    --------------+--------------------------------------------
    Valid   0 No  |        394      13.93      13.93      13.93
            1 Yes |       2434      86.07      86.07     100.00
            Total |       2828     100.00     100.00           
    -----------------------------------------------------------
    Code:
    ​​​​​​​. fre pc_cra 
    
    pc_cra -- Percent of CRAB isolates/year
    --------------------------------------------------------------
                     |      Freq.    Percent      Valid       Cum.
    -----------------+--------------------------------------------
    Valid   75.6654  |        263       9.30       9.30       9.30
            75.82089 |        335      11.85      11.85      21.15
            84.98293 |        293      10.36      10.36      31.51
            85.35912 |        362      12.80      12.80      44.31
            87.38171 |        317      11.21      11.21      55.52
            88.30189 |        265       9.37       9.37      64.89
            89.03509 |        228       8.06       8.06      72.95
            91.36213 |        301      10.64      10.64      83.59
            93.06123 |        245       8.66       8.66      92.26
            94.06393 |        219       7.74       7.74     100.00
            Total    |       2828     100.00     100.00           
    --------------------------------------------------------------
    Code:
    ​​​​​​​. fre year
    
    year -- Year of culture
    -------------------------------------------------------------
                    |      Freq.    Percent      Valid       Cum.
    ----------------+--------------------------------------------
    Valid   1  2013 |        335      11.85      11.85      11.85
            2  2014 |        362      12.80      12.80      24.65
            3  2015 |        301      10.64      10.64      35.29
            4  2016 |        293      10.36      10.36      45.65
            5  2017 |        265       9.37       9.37      55.02
            6  2018 |        219       7.74       7.74      62.77
            7  2019 |        317      11.21      11.21      73.97
            8  2020 |        245       8.66       8.66      82.64
            9  2021 |        228       8.06       8.06      90.70
            10 2022 |        263       9.30       9.30     100.00
            Total   |       2828     100.00     100.00           
    -------------------------------------------------------------
    We have the following questions:
    1. Is our data time-series data, panel data, or something else?
    2. What is (are) the appropriate statistical test(s) to use for testing the trends over the years?
    Thank you
    Sincerely regards,
    Abdullah Algarni
    [email protected]

  • #2
    Abdullah:
    I find your description and your data inconsistent, because:
    1) you state that each year the analysis is performed, the resistant isolates have the very same id. Therefore, it seems you're dealing with a panel dataset. But looking at your data, no -id_stata- ia actually repeated (hence, as per your example, this would seem a cross-sectional study);
    2) the appropriate statistical tools are conditional on clarfying point 1).
    Kind regards,
    Carlo
    (Stata 19.0)

    Comment


    • #3
      Originally posted by Carlo Lazzaro View Post
      Abdullah:
      I find your description and your data inconsistent, because:
      1) you state that each year the analysis is performed, the resistant isolates have the very same id. Therefore, it seems you're dealing with a panel dataset. But looking at your data, no -id_stata- ia actually repeated (hence, as per your example, this would seem a cross-sectional study);
      2) the appropriate statistical tools are conditional on clarfying point 1).
      Thank you Carlo,
      I said "Every year, there are multiple resistant isolates, but that has a unique ID no. (i.e., stata_id in our dataset)."
      So, there is no repeated stata_id.

      Thank you
      Sincerely regards,
      Abdullah Algarni
      [email protected]

      Comment


      • #4
        Abdullah:
        thansk for clarifying and apologise for my previous misreading.
        So yiou have a repeated (in years) cross-sectiona study.
        Perhaps you may want to consider a logisic regression with the dependent variable being -ab_resistance- (yes=1; no=0); -i.antibiotics- and -c.year##c.year- as predictors:
        Code:
        logit ab_resistance i.antibiotics c.year##c.year
        Kind regards,
        Carlo
        (Stata 19.0)

        Comment


        • #5
          Thank you so much Carlo
          Sincerely regards,
          Abdullah Algarni
          [email protected]

          Comment

          Working...
          X