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
Error in mi impute chained (logit)Hello, I am trying to run an mi impute chained using (logit) and I get the following error message …
define after a certain rangeHello, I want to define a variable conditioned after a certain range of another variable. For inst…
Obtaining the Spatially Weighted Regressors Using spregressHi Everyone: I'm looking for a simple way to obtain the regressors W*X when using spregress, where …
Dropping observations based on multiple conditionsHi Everyone, Thanks for taking the time to read my query. I currently am cleaning a very big datase…
Centering on Mean - Interaction of 2 continous variables using the first difference estimatorHi, My research project is looking at the impact of financial development (bank development - proxi…
Subscribe to:
Post Comments (Atom)
0 Response to Advice on coding for crude and standardised incidence rate estimation
Post a Comment