Announcement

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

  • Calculating rate per 10,000 using

    Hi Everyone,
    As the calculated percentage of Y (outcome variable) is too small I wanted to calculate the rate (per 10,000) of Y from the total patients who visited the ED as I don’t have the population size of a study area of a country. I also want to calculate the rate (per 10,000) by sex.
    Initially, I multiplied the calculated proportion by 10,000 but I want to double-check if I missed anything. I would appreciate it if you share the Stata code for this.
    Please see some parts of the data produced using the -dataex- command.
    Thanks for your help.

    ----------------------- copy starting from the next line -----------------------
    Code:
    * Example generated by -dataex-. For more info, type help dataex
    clear
    input double ArrivalDate long(sex_cat Y)
     1845557400000.004 1 0
    1838229360000.0017 1 0
    1849343039999.9968 2 0
     1835741399999.996 2 0
     1856460720000.001 1 0
    1851485700000.0007 1 0
     1856522100000.004 2 0
    1852121160000.0002 2 0
    1853668080000.0027 1 0
     1858879920000.001 1 0
     1840475699999.997 1 0
    1853909159999.9963 2 0
    1853658539999.9998 1 0
    1857027840000.0022 2 0
     1838554320000.001 1 0
     1853655899999.996 1 0
     1854475319999.998 2 0
    1838485679999.9959 2 0
     1844332860000.001 2 0
    1834526099999.9978 1 1
    end
    format %tc ArrivalDate
    label values sex_cat sex_cat
    label def sex_cat 1 "Female", modify
    label def sex_cat 2 "Male", modify
    label values Y Y
    label def Y 0 "No outcome", modify
    label def Y 1 "Outcome", modify
    ------------------ copy up to and including the previous line ------------------


  • #2
    With your data example (thanks!) the overall rate is 1/20 and the rates for females and males are 1/11 and 0/9.

    You can just multiply mean proportions by 10000 or work with a variable that is 10000 times your indicator. It's the same result either way.

    Code:
    . tab sex_cat Y
    
    | Y
    sex_cat | No outcom Outcome | Total
    -----------+----------------------+----------
    Female | 10 1 | 11
    Male | 9 0 | 9
    -----------+----------------------+----------
    Total | 19 1 | 20
    
    
    . su Y
    
    Variable | Obs Mean Std. dev. Min Max
    -------------+---------------------------------------------------------
    Y | 20 .05 .2236068 0 1
    
    . di 10000 * r(mean)
    500
    
    .
    . gen Y2 = 10000 * Y
    
    . tab sex_cat, su(Y2)
    
    | Summary of Y2
    sex_cat | Mean Std. dev. Freq.
    ------------+------------------------------------
    Female | 909.09091 3015.1134 11
    Male | 0 0 9
    ------------+------------------------------------
    Total | 500 2236.068 20

    Comment


    • #3
      Thanks for your swift response, Nick! Much appreciated.

      Comment


      • #4
        Hi Nick,
        I have the following simple section of data from the clinic visits:
        Person_id year Outcome (Y) (No/Yes)
        001 2010 0
        001 2010 1
        001 2011 1
        002 2010 0
        002 2012 1
        003 2013 1
        004 2010 0
        004 2011 0
        004 2013 0
        005 2012 1
        005 2013 0
        005 2015 0
        My question is in relation to fitting the poisson regression for the above data to see the incidence rate ratio by the available covariates (as logistic regression may not be appropriate- I am open if you have any other modelling suggestion for the data I have). My questions are:
        1) How could I create a count outcome variable (let us say this variable Z) using the variables I have in the table above?
        2) Since the denominator I used to calculate the incidence rate was obtained from the local area census (i.e. 2000), not the total number of study participants, is there a need to consider this denominator while fitting the poisson regression? If that is the case, I would appreciate your help in how to consider this denominator in the poisson regression Stata code.
        Thanks for your help!

        Comment


        • #5
          #4 is a new question unrelated to the thread title and so should please be posted in a new thread with an appropriate title.

          This isn't just fussiness. I think you need advice from medical statisticians here, and not me.

          Indeed, just because someone answered your last question doesn't mean that they are hovering and waiting for your next question in the same thread!

          Comment


          • #6
            Sorry, Nick. It was to bother you. First, I posted the question with an appropriate thread titled ‘incidence rate and poisson regression’ and I brought it here when I did not find any reply. Thanks for your advice though.

            Comment


            • #7
              Sorry, I wanted to say it was not to bother you.

              Comment


              • #8
                Well, you did start a new thread. You could try improving the question there -- say by using dataex -- but as stated it's not the kind of question I would answer.

                Comment


                • #9
                  Thanks!

                  Comment

                  Working...
                  X