Announcement

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

  • Test for incidence-rate trend in Stata

    Dear colleagues
    I am using Stata 17.0 MB and working on a dataset of Enterococci bacteria infections in the previous ten years (2012–2021). These bacteria have more dangerous subtypes resistant to one antibiotic (vancomycin; hence called VRE).

    I want to test whether there is a significant trend in the incidence rate of these subtypes over the previous ten years.

    What is the appropriate statistical test I have to use to check whether the noted increase in the incidence rate is statistically significant in stata?

    My dataset and variables are illustrated below. Thank you in advance

    Code:
    . describe vre year
    
    Variable      Storage   Display    Value
        name         type    format    label      Variable label
    ------------------------------------------------------------------------------------------------------------------------------------
    vre             byte    %9.1f      YesNo      Vancomycin-resistant Enterococci?
    year            byte    %ty        Year       Year of culture
    
    . tab vre year, column nokey
    
    Vancomycin |
    -resistant |
    Enterococc |                                                Year of culture
            i? |      2012       2013       2014       2015       2016       2017       2018       2019       2020       2021 |     Total
    -----------+--------------------------------------------------------------------------------------------------------------+----------
            No |        42        129        101        108        155        178        179        281        203        293 |     1,669 
               |     80.77      90.85      93.52      91.53      94.51      91.75      87.75      88.36      85.29      86.43 |     88.92 
    -----------+--------------------------------------------------------------------------------------------------------------+----------
           Yes |        10         13          7         10          9         16         25         37         35         46 |       208 
               |     19.23       9.15       6.48       8.47       5.49       8.25      12.25      11.64      14.71      13.57 |     11.08 
    -----------+--------------------------------------------------------------------------------------------------------------+----------
         Total |        52        142        108        118        164        194        204        318        238        339 |     1,877 
               |    100.00     100.00     100.00     100.00     100.00     100.00     100.00     100.00     100.00     100.00 |    100.00
    Sincerely regards,
    Abdullah Algarni
    [email protected]

  • #2
    Cross-posted at https://www.reddit.com/r/stata/comme...rend_in_stata/

    https://stats.stackexchange.com/ques...trend-in-stata

    Comment


    • #3
      -help nptrend- may give you a start. Or perhaps -logit vre c.Year-.

      That said, just eyeballing your tabulation, while it is only based on 10 vre responses, the data from 2012 seem unlikely if there is a simple trend in play over this time period. So I would suggest also analyzing the data with year 2012 excluded and reporting the results both ways (even if they reach different conclusions).

      Comment


      • #4
        have you looked at the following FAQ: https://www.stata.com/support/faqs/s...end/index.html

        added: your original post is not very clear but you might also want to think about poisson regression in addition to the techniques in the FAQ
        Last edited by Rich Goldstein; 16 Sep 2022, 12:36.

        Comment


        • #5
          Thanks Dr. Cox
          I'm not sure if cross-posting violates rules of StataList, if so, I'm so sorry
          Sincerely regards,
          Abdullah Algarni
          [email protected]

          Comment


          • #6
            Originally posted by Clyde Schechter View Post
            -help nptrend- may give you a start. Or perhaps -logit vre c.Year-.

            That said, just eyeballing your tabulation, while it is only based on 10 vre responses, the data from 2012 seem unlikely if there is a simple trend in play over this time period. So I would suggest also analyzing the data with year 2012 excluded and reporting the results both ways (even if they reach different conclusions).
            Thank you,
            I am totally agree regarding 2012 data (clearly outlier)
            I will double check nptrend and make sure my data fit well with these tests assumptions
            Sincerely regards,
            Abdullah Algarni
            [email protected]

            Comment


            • #7
              Originally posted by Rich Goldstein View Post
              have you looked at the following FAQ: https://www.stata.com/support/faqs/s...end/index.html

              added: your original post is not very clear but you might also want to think about poisson regression in addition to the techniques in the FAQ
              Thank you,
              I got two idea from reddit and Cross-Valid
              reddit:
              https://www.reddit.com/r/stata/comme...m_source=share

              Cross-Validated
              In each year there is a given number of Enterococcae nallE of which the nVRE is a part and what you call incidence rate is nVRE/nallE. This could be modelled as the probability p in a Binomial process. Use a binomial GLM with the probability p being linearity dependent on the number of the year.

              Sincerely regards,
              Abdullah Algarni
              [email protected]

              Comment


              • #8
                #5

                https://www.statalist.org/forums/help#crossposting explains our policy about cross-posting (and is in a document that every new message prompt asks you to read). Telling us about cross-posting is requested, but it is not called a rule.

                r/stata on Reddit cites "Notify others of cross-posts (x-posts) and updates" as a rule. It is there out front with their other rules (a short list).

                I am active on Cross Validated but am not aware of explicit policy on cross-posting outside Stack Exchange.

                Regardless of what is stated as a rule or a request, the logic and etiquette seem simple to me:

                If other people are interested in your question, they should want to see an answer even if it is posted elsewhere.

                If other people want to answer, they should want to know about other answers, especially if an answer as good as or better than what they have to say has already been said. I've often found I wasted my time posting something already said elsewhere.

                Scanning all other possible forums really doesn't appeal to many people -- even I won't be systematic about keeping an eye on more than about three places that might include Stata questions -- and in any case it's the poster's responsibility to be informative. You are asking people to give you some of their time and to share their expertise. so some courtesy does no harm.

                I have seen an opinion that posting on say Y and Z as well as X is offensive to people in any of those forums, as implying that you don't trust people to come up with a good answer or that you don't care about people wasting time and effort. I wouldn't call this behaviour offensive at all -- almost always it's just a little thoughtless -- but beware that the attitude exists.


                Comment


                • #9
                  FWIW: the plural of Enterococcus is surely Enterococci, not Enterococcae.

                  Comment


                  • #10
                    Originally posted by Nick Cox View Post
                    #5

                    https://www.statalist.org/forums/help#crossposting explains our policy about cross-posting (and is in a document that every new message prompt asks you to read). Telling us about cross-posting is requested, but it is not called a rule.

                    r/stata on Reddit cites "Notify others of cross-posts (x-posts) and updates" as a rule. It is there out front with their other rules (a short list).

                    I am active on Cross Validated but am not aware of explicit policy on cross-posting outside Stack Exchange.

                    Regardless of what is stated as a rule or a request, the logic and etiquette seem simple to me:

                    If other people are interested in your question, they should want to see an answer even if it is posted elsewhere.

                    If other people want to answer, they should want to know about other answers, especially if an answer as good as or better than what they have to say has already been said. I've often found I wasted my time posting something already said elsewhere.

                    Scanning all other possible forums really doesn't appeal to many people -- even I won't be systematic about keeping an eye on more than about three places that might include Stata questions -- and in any case it's the poster's responsibility to be informative. You are asking people to give you some of their time and to share their expertise. so some courtesy does no harm.

                    I have seen an opinion that posting on say Y and Z as well as X is offensive to people in any of those forums, as implying that you don't trust people to come up with a good answer or that you don't care about people wasting time and effort. I wouldn't call this behaviour offensive at all -- almost always it's just a little thoughtless -- but beware that the attitude exists.

                    Thanks Dr. Cox I'm 100% agree with you, I would apologize of what happened. I do trust our colleagues here and in other forums.

                    Again, we're on same page, will not cross-posting again.
                    again.💐
                    Sincerely regards,
                    Abdullah Algarni
                    [email protected]

                    Comment

                    Working...
                    X