Hi everyone,
I am a Stata beginner (learning at home for an empirical research university class) . So far, I managed to solve my problems on my own, checking on forums, or asking for help from the TA. But I have now a problem that I do not manage to solve and I am a bit stressed by the time I have to submit my paper.
My situation is the following: I want to have three graphs in one with a histogram with the number of new case per day, on the same scale and y axis I want to have a line graph about the three days average of these new cases, and finally, on a different y axis, I want to have another line graph showing the reproduction rate (and on this scale I want an horizontal line for the value of 1).
This is my code :
When I run my code, it gives me : too many variables specified.
Did I started right? Do you have any idea how to get the wanted graph.
I hope I have been clear and understandable enough.
Thanks
I am a Stata beginner (learning at home for an empirical research university class) . So far, I managed to solve my problems on my own, checking on forums, or asking for help from the TA. But I have now a problem that I do not manage to solve and I am a bit stressed by the time I have to submit my paper.
My situation is the following: I want to have three graphs in one with a histogram with the number of new case per day, on the same scale and y axis I want to have a line graph about the three days average of these new cases, and finally, on a different y axis, I want to have another line graph showing the reproduction rate (and on this scale I want an horizontal line for the value of 1).
This is my code :
twoway line Rsince datesince if country=="Austria", color(blue) yaxis(1) yline(1, lpattern(dash)) xline(`m', lcolor(blue)) ///
xline(`m14', lcolor(blue) lpattern(dash)) ///
|| line smoothcase datesince if country=="Austria", yaxis (2) ///
|| hist newcase datesince if country=="Austria", yaxis(2)
xline(`m14', lcolor(blue) lpattern(dash)) ///
|| line smoothcase datesince if country=="Austria", yaxis (2) ///
|| hist newcase datesince if country=="Austria", yaxis(2)
Did I started right? Do you have any idea how to get the wanted graph.
I hope I have been clear and understandable enough.
Thanks
Comment