Hi all, new Stata user here.
I am trying to combine 2 graphs into one, but I want the dots/estimates to be staggered. Right now, I can figure out to make 2 separate graphs or how to have a single graph, but the estimates are right on top of each other. What I'm trying to do is graph age categories on the X, percentage on the Y, and then within each age category, I want to show the percentage by a diagnosis status with confidence intervals. Right now, this is my code to that results in the 2 separate graphs by diagnosis status:
twoway rcap upper lower agecat, lstyle(ci) || scatter prop agecat, xlabel(,valuelabel) xlabel(1(1)6) xtitle(Age Category) ylabel(0(10)100) ytitle(Percentage) by(diagnosis01)
So ultimately I want 1 graph with age categories on the x-axis, percentage on the y-axis, and then above each age category marker there should be 2 dots with CI's that are staggered/not on top of each other. Any help is appreciated!
Best,
Andrea
Related Posts with Combining side by side plots with CIs for 2 groups?
Suggestions for statistical tests to run on variables before OLS regression?Hi guys, Im a beginner user, i have a short project that i need some help on. I have an OLS regress…
Is my use of a t-test with this data appropriate?Hallo Apologies for not using dataex. I have tried and failed to install it (I used ssc install dat…
l2.X variable as IV for X? Anderson Hsiao(1981). how to test for endogeneity panel (2sls)Hi, I'm a student and I'm trying to determine a model to use for my dataset. The goal is to estimate…
Validity and Robustness checks for Pooled/Repeated Cross-Sectional DataHi, I am trying to identify the impact of race on unemployment (due to COVID-19) from April to Decem…
Dividing series of variables through loopingHi, I have variables Jan_13 to Mar_21, referring to months January 2013 to March 2021. I need to cre…
Subscribe to:
Post Comments (Atom)
0 Response to Combining side by side plots with CIs for 2 groups?
Post a Comment