I recently completed analysis of a large dataset to generate age and sex stratified incident counts with the person years count. From this I aim to calculate crude and standardised incident rates using the incident density method. For this I used Stata 15.
I have attached a small sample from the data, using 2019 as an example, to demonstrate the data I have generated and arranged in variable format for the next stage of the analysis.
2019 will also be the reference population used for the direct standardisation (with the assumption that each person contributes a whole person year). The full data set has the same data as the attached sample from 2000-2019 with the exception of the reference population which is 2019 only.
Whilst I understand the method of what I am trying to do I confess I have struggled getting the Stata coding to complete the Standardisation and Standardised Incidence Rate generation.
After completing some reading I stset Pyrs as the time/exposure variable before then using the the ir command using the incidence count to generate a crude incidence rate, for example: ir Incident_case Sex Pyrs, by (Year) level (95).
Stata returns a response stating that "no observations r(2000);". I believe this is due to the ir command being more appropriate used for binary outcomes as opposed to a count of binary outcomes but may be wrong in this view as I am new to Stata use.
I would be grateful for any advice on the coding required to generate the crude and age standardised incidence rate. If I have missed any key information out please feel free to ask.
Matthew
Related Posts with Advice on coding for crude and standardised incidence rate estimation
Constrained label in SEM outputHi, in a SEM output I am getting ONE 'constrained' label. It is not clear to me why that particular …
How to fill in missing values by group when there is one nonmissing value per groupHi, I have a variable that has one nonmissing numeric value per group, and all the other values are …
time trends and individual effectsDear all, When I control i.company#c.trend, can I control individual effects? Code: webuse grunfel…
exact, loopable area shading of line graph between pairs of observationsDear list members, I have a question on the placement of shaded areas in graphs. I had a look at SJ…
Using lfit with log(x)Hi, my equation of my regression is : Y=B0 + B1*log(x) I would like to get a graph with this equatio…
Subscribe to:
Post Comments (Atom)
0 Response to Advice on coding for crude and standardised incidence rate estimation
Post a Comment