Hello! I am trying to create two histograms (epidemic curve) based on the frequency of cases per day of the Onset_of_first_symptom variable, one stratified by Compound_name (medium or maximum) and the other stratified by Outcome (alive or DIED). In excel, this would be a stacked bar chart. I'm not quite sure how to do it in Stata since most examples use twoway bar charts, not histograms.
Thank you!
Code:
* Example generated by -dataex-. To install: ssc install dataex clear input byte Respondent_Type str7 Compound_name double Onset_of_first_symptom str5 Outcome 1 "medium" 22586 "alive" 1 "maximum" 22586 "alive" 1 "medium" 22590 "DIED" 1 "medium" 22586 "alive" 1 "maximum" 22590 "alive" 1 "medium" 22586 "alive" 1 "maximum" 22588 "DIED" 1 "medium" 22586 "alive" 1 "medium" 22586 "alive" 1 "medium" 22586 "alive" end format %td Onset_of_first_symptom
Comment