Hello,
I keep getting the error not a twoway plot type. Was wondering if anyone had any suggestions.
levelsof county, local(cty)
levelsof disease, local(dis)
foreach c of local cty{
foreach d of local dis{
twoway (bar cases year if county=="`c'" & disease=="`d'", yaxis(2) ///
yscale(range(0,2500) axis(2)) ///
ytick(0(500)2500, axis(2)) ///
ylabel(0(500)2500, axis(2))) ///
(line rate1 year if county=="`c'" & disease=="`d'", sort yaxis(1) ///
yscale(range(0,35) axis(1)) ///
ytick(0(5)35, axis(1)) ///
ylabel(0(5)35, axis(1))) ///
(rcap lower_95__ci upper_95__ci year if county=="`c'" & disease=="`d'", yaxis(1) ///
yscale(range(0,35) axis(1)) ///
ytick(0(5)35, axis(1)) ///
ylabel(0(5)35, axis(1))), ///
scheme(sj) ///
legend(label(1 "Cases") label(2 "Rate") label(3 "95%CI") row(1)) ///
ytitle("Rate, per 100,000 population", axis(1)) ///
title("`d' in `c', 2001-2019") ///
note("Data source: kaggle.com/zayanmakar/infectious-diseases-county-year-and-sex")///
graph export "Output/top5.png", replace ///
putexcel set "Output/GraphFile.xlsx", modify ///
putexcel B`3' = image(Output/top5.png) ///
}
}
Related Posts with Is not a two-way plot type
Fixed Effects Pooled OLS Panel Data RegressionDear all, Thanks for your time reading this. My data has small T and large N. When I use Hausman t…
Diff-in-diff with matchingHello, I am working on a project which uses diff-in-diff with propensity score matching techniques a…
Splitting one variable containing two variable dataHello I have a variable 'implementscheme' which contains the names of various agriculture implements…
Help with regression, binary independent variable with moderatorsDear all I'm fairly new with Stata and I have done my best to search for previous questions which a…
Help on Writing out Regression Equation for Panel Data inc. Industry and Time DummiesHello, I'm trying to write out my regression equation inc. industry and time dummies, but I'm not s…
Subscribe to:
Post Comments (Atom)
0 Response to Is not a two-way plot type
Post a Comment