Hi Folks. Sorry Stata beginner here, but wondered if others had a good approach to what I am trying to achieve.
I would like to graph the number of events or deaths per month, over a set period of time (e.g. a bar chart showing Jan, Feb, March from 2013 to 2016 and sum of events per month - not cumulative). I have the data currently set up as per example below - working with a date/time (DMY) and event variable (dead/alive) per participant (id). I would basically like to assess/visualise whether there are any changes in death rate over certain months across this time period (e.g. due to less reporting over certain months, etc).
Is there a good way to code this up and plot in Stata using these simple variables? I thought it would be easy, but was drawing blanks on a good coding method that wasn't cumulative (i.e. just adding up the events over time).
id death death_date
1 1 27oct2013
2 1 01jan2014
3 1 12jan2014
4 1 17feb2015
5 1 04mar2015
6 1 02apr2015
7 1 19apr2016
8 1 22apr2016
9 1 24may2016
etc.... but in much larger numbers
Many thanks!
Related Posts with Plot number of events per month, over time (simple)
SEM modeling ( path model)Dear ll, I hope you are doing well. I'm working on my paper and i would like to study the mediatin…
Creating Graphs with Regression OutputI am attempting to determine whether hours worked and wages have changed overtime differently for di…
sdid in case of unbalanced panelI need to run synthetic difference is difference regression. Therefore, I need balanced panel data. …
Calculate age from other occurrences and attribute it to specific observationHi, I'm working with consecutive censuses. I can follow the same individuals through several decade…
Mediation Analysis - Stata sem and medsem commands with fixed effects modelsHello everyone, I am trying to perform a mediation analysis, in which the variables of concern are…
Subscribe to:
Post Comments (Atom)
0 Response to Plot number of events per month, over time (simple)
Post a Comment