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)
Identifying peaks and throughs within a time seriesDear all, By following the method of Bry and Boschan (1971), full reference placed below, I want to…
tab2xl command only saving zeroesHi. I was looking to export some cross-tabulations to excel and I came across -tab2xl-. The command …
Calculating number needed to treat after competing risk regressionsHi Statalist, I am interested how to use Stata to calculate a number needed to treat statistic foll…
Bivariate scatter plot with observations colored according to the clustersI performed K-Means clustering and am trying to graph two of my variables on a scatter plot, but nee…
After an estimation with fixed effects, my e(b) matrix dmension change from a computer to anotherHi, After an estimation with fixed effect (with OLS or PPML) such as "ppml v dist contig tariff FE_…
Subscribe to:
Post Comments (Atom)
0 Response to Plot number of events per month, over time (simple)
Post a Comment