Announcement

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

  • Statistical test to assess counts between years

    Hi all, is there a simple test to assess if there is a statistical difference between counts for years?
    Click image for larger version

Name:	Screenshot 2024-05-31 at 10.28.27 AM.png
Views:	1
Size:	29.4 KB
ID:	1755074


  • #2
    You could try fitting a regression to test linear trend. That seems unlikely to be very interesting or useful.

    Comment


    • #3
      Are the data averaged/summed across individual annual counts or are the 3-year intervals just the reporting frequency?

      Do you just want to know if there are differences in counts between years? If so, a simple eyeball test is pretty clear. There is sharp drop after 2008. If you don't care to know where such differences are, a chi-squared test is adequate, but as Nick said, it's fairly uninteresting nor useful. Using the linear regression approach would almost certainly yield a negative slope, but again, that's self-evident so fairly pointless to test.

      Comment


      • #4
        Fisher's exact test?
        Code:
        help cc
        look at cci, if you know the exposure counts.

        Comment


        • #5
          Jessica:
          as an aside to previous helful advice, you may want to consider (with the usual caveats about overdispersion) -poisson-:
          Code:
           poisson Counts i.Year
          
          Iteration 0:  Log likelihood = -14.261213  
          Iteration 1:  Log likelihood = -14.261213  
          
          Poisson regression                                      Number of obs =      5
                                                                  LR chi2(4)    =   6.01
                                                                  Prob > chi2   = 0.1987
          Log likelihood = -14.261213                             Pseudo R2     = 0.1739
          
          ------------------------------------------------------------------------------
                Counts | Coefficient  Std. err.      z    P>|z|     [95% conf. interval]
          -------------+----------------------------------------------------------------
                  Year |
                    2  |  -.0521858   .1865645    -0.28   0.780    -.4178454    .3134739
                    3  |  -.3163373   .2005118    -1.58   0.115    -.7093332    .0766585
                    4  |  -.3398678   .2018878    -1.68   0.092    -.7355606     .055825
                    5  |  -.3639654   .2033209    -1.79   0.073    -.7624671    .0345363
                       |
                 _cons |   4.077537   .1301889    31.32   0.000     3.822372    4.332703
          ------------------------------------------------------------------------------
          
          . testparm i.Year
          
           ( 1)  [Counts]2.Year = 0
           ( 2)  [Counts]3.Year = 0
           ( 3)  [Counts]4.Year = 0
           ( 4)  [Counts]5.Year = 0
          
                     chi2(  4) =    6.06
                   Prob > chi2 =    0.1944
          
          .
          Kind regards,
          Carlo
          (StataNow 18.5)

          Comment


          • #6
            Add robust and that should handle the overdispersion problem. Those results look plausible.

            Comment

            Working...
            X