Announcement

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

  • Comparison of two proportions (over time)

    Dear all,

    I would like to compare two proportions (over time); but I think I have to restructure my dataset.
    In 2012 - 2021 organizations tried to increase the notification rate of people living with disease X by applying an intervention.
    For example in 2012 in the control group (C) 798 cases out of 606049 (population) were notified vs. 1076 out of 537856 in the intervention group (I). I would like to see whether this difference is statistically significant (including 95% CI). Hopefully it is also possible to study differences over time.
    I think I need to restructure my data first. To get 100,000 rows with 0 (not notified) and 1 (notified), the CNRAF and CNRBC are case notification rates (per 100,000 people).

    Thanks in advance, Liza

    Code:
    YEAR AF  BC              POP    C/I %        CNRAF    CNRBC    
    2012  798 450            606049 0  56.39098 131.67252  74.25142
    2013  686 392            624398 0  57.14286 109.86582  62.78047
    2014  723 450 647319.4766528223 0  62.24067 111.69137  69.51745
    2015  583 379 664842.2501385728 0 65.008575  87.68997    57.006
    2016  547 403 551020.5399679504 0  73.67459  99.27035  73.13702
    2017  432 291 564495.6774984105 0 67.361115  76.52849  51.55044
    2018  620 468            574951 0  75.48387 107.83527  81.39824
    2019  659 464            590396 0  70.40971    111.62  78.59132
    2020  694 548            606028 0  78.96254 114.51616  90.42487
    2021  897 681            622067 0  75.91973 144.19669 109.47374
    2012 1076 515            537856 1  47.86245 200.05354  95.75053
    2013 1226 521            570573 1  42.49592  214.8717  91.31171
    2014 1264 596            583449 1   47.1519 216.64276 102.15118
    2015 1276 591            601421 1  46.31662  212.1642  98.26727
    2016 1342 693            618517 1  51.63934  216.9706  112.0422
    2017 1511 760            683966 1  50.29782  220.9174 111.11664
    2018 1554 754            694664 1  48.51995 223.70528 108.54169
    2019 1187 724            596525 1   60.9941  198.9858  121.3696
    2020 1233 756            611564 1  61.31387 201.61423 123.61748
    2021 1179 758            637763 1  64.29177  184.8649 118.85293
    end


  • #2
    Originally posted by Liza de Groot View Post
    Hopefully it is also possible to study differences over time.
    I think I need to restructure my data first.
    Maybe not.

    .ÿ
    .ÿversionÿ17.0

    .ÿ
    .ÿclearÿ*

    .ÿ
    .ÿquietlyÿinputÿint(YEARÿAFÿBC)ÿdoubleÿPOPÿbyteÿtrtÿdouble(cnrafÿcnrbc)ÿ//ÿC/Iÿ%ÿCNRAFÿCNRBCÿÿÿÿ

    .ÿ
    .ÿrenameÿ*,ÿlower

    .ÿlist,ÿnoobsÿseparator(0)

    ÿÿ+-------------------------------------------------------------+
    ÿÿ|ÿyearÿÿÿÿÿafÿÿÿÿbcÿÿÿÿÿÿÿÿÿpopÿÿÿtrtÿÿÿÿÿÿÿcnrafÿÿÿÿÿÿÿcnrbcÿ|
    ÿÿ|-------------------------------------------------------------|
    ÿÿ|ÿ2012ÿÿÿÿ798ÿÿÿ450ÿÿÿÿÿÿ606049ÿÿÿÿÿ0ÿÿÿÿ56.39098ÿÿÿ131.67252ÿ|
    ÿÿ|ÿ2013ÿÿÿÿ686ÿÿÿ392ÿÿÿÿÿÿ624398ÿÿÿÿÿ0ÿÿÿÿ57.14286ÿÿÿ109.86582ÿ|
    ÿÿ|ÿ2014ÿÿÿÿ723ÿÿÿ450ÿÿÿ647319.48ÿÿÿÿÿ0ÿÿÿÿ62.24067ÿÿÿ111.69137ÿ|
    ÿÿ|ÿ2015ÿÿÿÿ583ÿÿÿ379ÿÿÿ664842.25ÿÿÿÿÿ0ÿÿÿ65.008575ÿÿÿÿ87.68997ÿ|
    ÿÿ|ÿ2016ÿÿÿÿ547ÿÿÿ403ÿÿÿ551020.54ÿÿÿÿÿ0ÿÿÿÿ73.67459ÿÿÿÿ99.27035ÿ|
    ÿÿ|ÿ2017ÿÿÿÿ432ÿÿÿ291ÿÿÿ564495.68ÿÿÿÿÿ0ÿÿÿ67.361115ÿÿÿÿ76.52849ÿ|
    ÿÿ|ÿ2018ÿÿÿÿ620ÿÿÿ468ÿÿÿÿÿÿ574951ÿÿÿÿÿ0ÿÿÿÿ75.48387ÿÿÿ107.83527ÿ|
    ÿÿ|ÿ2019ÿÿÿÿ659ÿÿÿ464ÿÿÿÿÿÿ590396ÿÿÿÿÿ0ÿÿÿÿ70.40971ÿÿÿÿÿÿ111.62ÿ|
    ÿÿ|ÿ2020ÿÿÿÿ694ÿÿÿ548ÿÿÿÿÿÿ606028ÿÿÿÿÿ0ÿÿÿÿ78.96254ÿÿÿ114.51616ÿ|
    ÿÿ|ÿ2021ÿÿÿÿ897ÿÿÿ681ÿÿÿÿÿÿ622067ÿÿÿÿÿ0ÿÿÿÿ75.91973ÿÿÿ144.19669ÿ|
    ÿÿ|ÿ2012ÿÿÿ1076ÿÿÿ515ÿÿÿÿÿÿ537856ÿÿÿÿÿ1ÿÿÿÿ47.86245ÿÿÿ200.05354ÿ|
    ÿÿ|ÿ2013ÿÿÿ1226ÿÿÿ521ÿÿÿÿÿÿ570573ÿÿÿÿÿ1ÿÿÿÿ42.49592ÿÿÿÿ214.8717ÿ|
    ÿÿ|ÿ2014ÿÿÿ1264ÿÿÿ596ÿÿÿÿÿÿ583449ÿÿÿÿÿ1ÿÿÿÿÿ47.1519ÿÿÿ216.64276ÿ|
    ÿÿ|ÿ2015ÿÿÿ1276ÿÿÿ591ÿÿÿÿÿÿ601421ÿÿÿÿÿ1ÿÿÿÿ46.31662ÿÿÿÿ212.1642ÿ|
    ÿÿ|ÿ2016ÿÿÿ1342ÿÿÿ693ÿÿÿÿÿÿ618517ÿÿÿÿÿ1ÿÿÿÿ51.63934ÿÿÿÿ216.9706ÿ|
    ÿÿ|ÿ2017ÿÿÿ1511ÿÿÿ760ÿÿÿÿÿÿ683966ÿÿÿÿÿ1ÿÿÿÿ50.29782ÿÿÿÿ220.9174ÿ|
    ÿÿ|ÿ2018ÿÿÿ1554ÿÿÿ754ÿÿÿÿÿÿ694664ÿÿÿÿÿ1ÿÿÿÿ48.51995ÿÿÿ223.70528ÿ|
    ÿÿ|ÿ2019ÿÿÿ1187ÿÿÿ724ÿÿÿÿÿÿ596525ÿÿÿÿÿ1ÿÿÿÿÿ60.9941ÿÿÿÿ198.9858ÿ|
    ÿÿ|ÿ2020ÿÿÿ1233ÿÿÿ756ÿÿÿÿÿÿ611564ÿÿÿÿÿ1ÿÿÿÿ61.31387ÿÿÿ201.61423ÿ|
    ÿÿ|ÿ2021ÿÿÿ1179ÿÿÿ758ÿÿÿÿÿÿ637763ÿÿÿÿÿ1ÿÿÿÿ64.29177ÿÿÿÿ184.8649ÿ|
    ÿÿ+-------------------------------------------------------------+

    .ÿ
    .ÿpoissonÿafÿi.trt##i.year,ÿexposure(pop)ÿnolog

    PoissonÿregressionÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿNumberÿofÿobsÿ=ÿÿÿÿÿÿ20
    ÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿLRÿchi2(19)ÿÿÿ=ÿ2158.05
    ÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿProbÿ>ÿchi2ÿÿÿ=ÿÿ0.0000
    Logÿlikelihoodÿ=ÿ-86.543385ÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿPseudoÿR2ÿÿÿÿÿ=ÿÿ0.9258

    ------------------------------------------------------------------------------
    ÿÿÿÿÿÿÿÿÿÿafÿ|ÿCoefficientÿÿStd.ÿerr.ÿÿÿÿÿÿzÿÿÿÿP>|z|ÿÿÿÿÿ[95%ÿconf.ÿinterval]
    -------------+----------------------------------------------------------------
    ÿÿÿÿÿÿÿ1.trtÿ|ÿÿÿ.4182671ÿÿÿ.0467172ÿÿÿÿÿ8.95ÿÿÿ0.000ÿÿÿÿÿÿ.326703ÿÿÿÿ.5098312
    ÿÿÿÿÿÿÿÿÿÿÿÿÿ|
    ÿÿÿÿÿÿÿÿyearÿ|
    ÿÿÿÿÿÿÿ2013ÿÿ|ÿÿ-.1810581ÿÿÿ.0520659ÿÿÿÿ-3.48ÿÿÿ0.001ÿÿÿÿ-.2831054ÿÿÿ-.0790108
    ÿÿÿÿÿÿÿ2014ÿÿ|ÿÿ-.1645785ÿÿÿ.0513445ÿÿÿÿ-3.21ÿÿÿ0.001ÿÿÿÿ-.2652119ÿÿÿ-.0639451
    ÿÿÿÿÿÿÿ2015ÿÿ|ÿÿ-.4065104ÿÿÿÿ.054483ÿÿÿÿ-7.46ÿÿÿ0.000ÿÿÿÿ-.5132951ÿÿÿ-.2997256
    ÿÿÿÿÿÿÿ2016ÿÿ|ÿÿÿ-.282471ÿÿÿ.0555093ÿÿÿÿ-5.09ÿÿÿ0.000ÿÿÿÿ-.3912673ÿÿÿ-.1736747
    ÿÿÿÿÿÿÿ2017ÿÿ|ÿÿ-.5426549ÿÿÿ.0597323ÿÿÿÿ-9.08ÿÿÿ0.000ÿÿÿÿÿ-.659728ÿÿÿ-.4255817
    ÿÿÿÿÿÿÿ2018ÿÿ|ÿÿ-.1997131ÿÿÿ.0535354ÿÿÿÿ-3.73ÿÿÿ0.000ÿÿÿÿ-.3046405ÿÿÿ-.0947857
    ÿÿÿÿÿÿÿ2019ÿÿ|ÿÿ-.1652177ÿÿÿ.0526363ÿÿÿÿ-3.14ÿÿÿ0.002ÿÿÿÿÿ-.268383ÿÿÿ-.0620524
    ÿÿÿÿÿÿÿ2020ÿÿ|ÿÿÿ-.139602ÿÿÿ.0519043ÿÿÿÿ-2.69ÿÿÿ0.007ÿÿÿÿ-.2413325ÿÿÿ-.0378715
    ÿÿÿÿÿÿÿ2021ÿÿ|ÿÿÿ.0908603ÿÿÿ.0486617ÿÿÿÿÿ1.87ÿÿÿ0.062ÿÿÿÿ-.0045149ÿÿÿÿ.1862355
    ÿÿÿÿÿÿÿÿÿÿÿÿÿ|
    ÿÿÿÿtrt#yearÿ|
    ÿÿÿÿÿ1ÿ2013ÿÿ|ÿÿÿ.2525142ÿÿÿ.0667524ÿÿÿÿÿ3.78ÿÿÿ0.000ÿÿÿÿÿ.1216819ÿÿÿÿ.3833466
    ÿÿÿÿÿ1ÿ2014ÿÿ|ÿÿÿ.2442431ÿÿÿ.0660058ÿÿÿÿÿ3.70ÿÿÿ0.000ÿÿÿÿÿ.1148741ÿÿÿÿ.3736121
    ÿÿÿÿÿ1ÿ2015ÿÿ|ÿÿÿ.4652858ÿÿÿ.0684212ÿÿÿÿÿ6.80ÿÿÿ0.000ÿÿÿÿÿ.3311826ÿÿÿÿ.5993889
    ÿÿÿÿÿ1ÿ2016ÿÿ|ÿÿÿ.3636478ÿÿÿ.0689624ÿÿÿÿÿ5.27ÿÿÿ0.000ÿÿÿÿÿÿ.228484ÿÿÿÿ.4988116
    ÿÿÿÿÿ1ÿ2017ÿÿ|ÿÿÿ.6418588ÿÿÿ.0718271ÿÿÿÿÿ8.94ÿÿÿ0.000ÿÿÿÿÿ.5010803ÿÿÿÿ.7826372
    ÿÿÿÿÿ1ÿ2018ÿÿ|ÿÿÿ.3114575ÿÿÿ.0666251ÿÿÿÿÿ4.67ÿÿÿ0.000ÿÿÿÿÿ.1808747ÿÿÿÿ.4420403
    ÿÿÿÿÿ1ÿ2019ÿÿ|ÿÿÿ.1598661ÿÿÿ.0673974ÿÿÿÿÿ2.37ÿÿÿ0.018ÿÿÿÿÿ.0277696ÿÿÿÿ.2919626
    ÿÿÿÿÿ1ÿ2020ÿÿ|ÿÿÿÿ.147373ÿÿÿ.0665917ÿÿÿÿÿ2.21ÿÿÿ0.027ÿÿÿÿÿ.0168557ÿÿÿÿ.2778903
    ÿÿÿÿÿ1ÿ2021ÿÿ|ÿÿÿÿ-.16982ÿÿÿ.0643856ÿÿÿÿ-2.64ÿÿÿ0.008ÿÿÿÿ-.2960135ÿÿÿ-.0436266
    ÿÿÿÿÿÿÿÿÿÿÿÿÿ|
    ÿÿÿÿÿÿÿ_consÿ|ÿÿ-6.632608ÿÿÿ.0353996ÿÿ-187.36ÿÿÿ0.000ÿÿÿÿ-6.701989ÿÿÿ-6.563226
    ÿÿÿÿÿln(pop)ÿ|ÿÿÿÿÿÿÿÿÿÿ1ÿÿ(exposure)
    ------------------------------------------------------------------------------

    .ÿ
    .ÿglmÿafÿi.trt##i.year,ÿfamily(binomialÿpop)ÿlink(logit)ÿnolog
    note:ÿpopÿhasÿnonintegerÿvalues

    GeneralizedÿlinearÿmodelsÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿNumberÿofÿobsÿÿÿ=ÿÿÿÿÿÿÿÿÿ20
    Optimizationÿÿÿÿÿ:ÿMLÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿResidualÿdfÿÿÿÿÿ=ÿÿÿÿÿÿÿÿÿÿ0
    ÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿScaleÿparameterÿ=ÿÿÿÿÿÿÿÿÿÿ1
    Devianceÿÿÿÿÿÿÿÿÿ=ÿÿ3.15914e-10ÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿ(1/df)ÿDevianceÿ=ÿÿÿÿÿÿÿÿÿÿ.
    Pearsonÿÿÿÿÿÿÿÿÿÿ=ÿÿ1.16671e-11ÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿ(1/df)ÿPearsonÿÿ=ÿÿÿÿÿÿÿÿÿÿ.

    Varianceÿfunction:ÿV(u)ÿ=ÿu*(1-u/pop)ÿÿÿÿÿÿÿÿÿÿÿÿÿ[Binomial]
    Linkÿfunctionÿÿÿÿ:ÿg(u)ÿ=ÿln(u/(pop-u))ÿÿÿÿÿÿÿÿÿÿÿ[Logit]

    ÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿAICÿÿÿÿÿÿÿÿÿÿÿÿÿ=ÿÿÿ10.65274
    Logÿlikelihoodÿÿÿ=ÿÿ-86.5274426ÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿBICÿÿÿÿÿÿÿÿÿÿÿÿÿ=ÿÿÿ3.16e-10

    ------------------------------------------------------------------------------
    ÿÿÿÿÿÿÿÿÿÿÿÿÿ|ÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿOIM
    ÿÿÿÿÿÿÿÿÿÿafÿ|ÿCoefficientÿÿstd.ÿerr.ÿÿÿÿÿÿzÿÿÿÿP>|z|ÿÿÿÿÿ[95%ÿconf.ÿinterval]
    -------------+----------------------------------------------------------------
    ÿÿÿÿÿÿÿ1.trtÿ|ÿÿÿ.4189521ÿÿÿ.0467549ÿÿÿÿÿ8.96ÿÿÿ0.000ÿÿÿÿÿ.3273143ÿÿÿÿ.5105899
    ÿÿÿÿÿÿÿÿÿÿÿÿÿ|
    ÿÿÿÿÿÿÿÿyearÿ|
    ÿÿÿÿÿÿÿ2013ÿÿ|ÿÿ-.1812765ÿÿÿ.0520972ÿÿÿÿ-3.48ÿÿÿ0.001ÿÿÿÿÿ-.283385ÿÿÿ-.0791679
    ÿÿÿÿÿÿÿ2014ÿÿ|ÿÿ-.1647785ÿÿÿ.0513757ÿÿÿÿ-3.21ÿÿÿ0.001ÿÿÿÿÿ-.265473ÿÿÿ-.0640841
    ÿÿÿÿÿÿÿ2015ÿÿ|ÿÿ-.4069507ÿÿÿÿ.054512ÿÿÿÿ-7.47ÿÿÿ0.000ÿÿÿÿ-.5137922ÿÿÿ-.3001092
    ÿÿÿÿÿÿÿ2016ÿÿ|ÿÿ-.2827955ÿÿÿ.0555406ÿÿÿÿ-5.09ÿÿÿ0.000ÿÿÿÿÿ-.391653ÿÿÿ-.1739379
    ÿÿÿÿÿÿÿ2017ÿÿ|ÿÿÿ-.543207ÿÿÿÿ.059761ÿÿÿÿ-9.09ÿÿÿ0.000ÿÿÿÿ-.6603363ÿÿÿ-.4260776
    ÿÿÿÿÿÿÿ2018ÿÿ|ÿÿ-.1999518ÿÿÿ.0535671ÿÿÿÿ-3.73ÿÿÿ0.000ÿÿÿÿ-.3049413ÿÿÿ-.0949623
    ÿÿÿÿÿÿÿ2019ÿÿ|ÿÿ-.1654185ÿÿÿ.0526681ÿÿÿÿ-3.14ÿÿÿ0.002ÿÿÿÿ-.2686461ÿÿÿ-.0621909
    ÿÿÿÿÿÿÿ2020ÿÿ|ÿÿ-.1397738ÿÿÿ.0519361ÿÿÿÿ-2.69ÿÿÿ0.007ÿÿÿÿ-.2415667ÿÿÿ-.0379809
    ÿÿÿÿÿÿÿ2021ÿÿ|ÿÿÿ.0909857ÿÿÿ.0486952ÿÿÿÿÿ1.87ÿÿÿ0.062ÿÿÿÿ-.0044551ÿÿÿÿ.1864266
    ÿÿÿÿÿÿÿÿÿÿÿÿÿ|
    ÿÿÿÿtrt#yearÿ|
    ÿÿÿÿÿ1ÿ2013ÿÿ|ÿÿÿ.2528811ÿÿÿ.0668039ÿÿÿÿÿ3.79ÿÿÿ0.000ÿÿÿÿÿ.1219478ÿÿÿÿ.3838143
    ÿÿÿÿÿ1ÿ2014ÿÿ|ÿÿÿ.2446094ÿÿÿ.0660571ÿÿÿÿÿ3.70ÿÿÿ0.000ÿÿÿÿÿ.1151398ÿÿÿÿ.3740791
    ÿÿÿÿÿ1ÿ2015ÿÿ|ÿÿÿ.4658475ÿÿÿ.0684701ÿÿÿÿÿ6.80ÿÿÿ0.000ÿÿÿÿÿ.3316486ÿÿÿÿ.6000464
    ÿÿÿÿÿ1ÿ2016ÿÿ|ÿÿÿ.3641418ÿÿÿ.0690128ÿÿÿÿÿ5.28ÿÿÿ0.000ÿÿÿÿÿ.2288792ÿÿÿÿ.4994043
    ÿÿÿÿÿ1ÿ2017ÿÿ|ÿÿÿ.6426199ÿÿÿ.0718741ÿÿÿÿÿ8.94ÿÿÿ0.000ÿÿÿÿÿ.5017493ÿÿÿÿ.7834905
    ÿÿÿÿÿ1ÿ2018ÿÿ|ÿÿÿ.3119332ÿÿÿ.0666754ÿÿÿÿÿ4.68ÿÿÿ0.000ÿÿÿÿÿ.1812519ÿÿÿÿ.4426145
    ÿÿÿÿÿ1ÿ2019ÿÿ|ÿÿÿ.1600562ÿÿÿ.0674485ÿÿÿÿÿ2.37ÿÿÿ0.018ÿÿÿÿÿ.0278595ÿÿÿÿ.2922528
    ÿÿÿÿÿ1ÿ2020ÿÿ|ÿÿÿ.1475604ÿÿÿ.0666428ÿÿÿÿÿ2.21ÿÿÿ0.027ÿÿÿÿÿÿ.016943ÿÿÿÿ.2781779
    ÿÿÿÿÿ1ÿ2021ÿÿ|ÿÿ-.1700976ÿÿÿ.0644376ÿÿÿÿ-2.64ÿÿÿ0.008ÿÿÿÿ-.2963929ÿÿÿ-.0438023
    ÿÿÿÿÿÿÿÿÿÿÿÿÿ|
    ÿÿÿÿÿÿÿ_consÿ|ÿÿÿ-6.63129ÿÿÿ.0354229ÿÿ-187.20ÿÿÿ0.000ÿÿÿÿ-6.700718ÿÿÿ-6.561862
    ------------------------------------------------------------------------------

    .ÿtestparmÿi.trt#i.year

    ÿ(ÿ1)ÿÿ[af]1.trt#2013.yearÿ=ÿ0
    ÿ(ÿ2)ÿÿ[af]1.trt#2014.yearÿ=ÿ0
    ÿ(ÿ3)ÿÿ[af]1.trt#2015.yearÿ=ÿ0
    ÿ(ÿ4)ÿÿ[af]1.trt#2016.yearÿ=ÿ0
    ÿ(ÿ5)ÿÿ[af]1.trt#2017.yearÿ=ÿ0
    ÿ(ÿ6)ÿÿ[af]1.trt#2018.yearÿ=ÿ0
    ÿ(ÿ7)ÿÿ[af]1.trt#2019.yearÿ=ÿ0
    ÿ(ÿ8)ÿÿ[af]1.trt#2020.yearÿ=ÿ0
    ÿ(ÿ9)ÿÿ[af]1.trt#2021.yearÿ=ÿ0

    ÿÿÿÿÿÿÿÿÿÿÿchi2(ÿÿ9)ÿ=ÿÿ200.03
    ÿÿÿÿÿÿÿÿÿProbÿ>ÿchi2ÿ=ÿÿÿÿ0.0000

    .ÿ
    .ÿexit

    endÿofÿdo-file


    .


    Are some of those population numbers estimates?

    Comment


    • #3
      Dear Joseph,

      Thanks for your reaction; however, I have to study it more in detail.
      The population numbers aren't estimates.

      Comment


      • #4
        Originally posted by Liza de Groot View Post
        The population numbers aren't estimates.
        OK; I was just wondering how they had managed to become nonintegers in the control treatment group for a few years.

        Also, forgive my error. That data-input command should have been
        Code:
        quietly input int(YEAR AF BC) double POP byte trt double(pct cnraf cnrbc) // C/I % CNRAF CNRBC

        Comment


        • #5
          I also wonder, I'll check how this is possible

          Comment


          • #6
            Dear Joseph,

            I "studied" your two options to analyze my data.
            Could I also use a log link function in your GLM option? Or should I change family to poisson then?

            Best, Liza

            Comment


            • #7
              Originally posted by Liza de Groot View Post
              Could I also use a log link function in your GLM option?
              glm allows you to use the log link function with the binomial distribution family; the regression table will show risk ratios when you specify the eform option.

              Or should I change family to poisson then?
              I think that with the observed proportions in your case it doesn't matter practically between fitting Poisson, odds ratio or risk ratio regression models.

              If it were my research project, I would concern myself more with other things, for example, I would be taken aback to see numbers of order 10-10, 10-11 in the regression output, and chi-square test statistics that are more than twentyfold their degrees of freedom.

              Comment


              • #8
                Originally posted by Joseph Coveney View Post
                glm allows you to use the log link function with the binomial distribution family; the regression table will show risk ratios when you specify the eform option.

                I think that with the observed proportions in your case it doesn't matter practically between fitting Poisson, odds ratio or risk ratio regression models.

                If it were my research project, I would concern myself more with other things, for example, I would be taken aback to see numbers of order 10-10, 10-11 in the regression output, and chi-square test statistics that are more than twentyfold their degrees of freedom.
                Yes I also saw this, but I don't know why this is, or how to solve it

                Comment

                Working...
                X