I have a problem with two way scatter.
I am using the following command to plot as in the following graphs.
twoway (scatter mp year if id==15, recast(area) bcolor(gs6) cmissing(n) ///
yaxis(1) ylabel(0 1) yscale(off)) ///
(tsline emp if id==15,color(blue) yaxis(2) yscale(alt axis(2)) ///
ytitle("", axis(2)) title(Malaysia)), yline(25 ,axis(2) lcolor(red))
Note: emp is continuous variable, whereas mp contains 1 if there is an event and missing if there isn’t an event.
Array
Array
The main problem here is with vertical line. I get the vertical line when there are more than one event but don't get the vertical line when there is just one event like for Malaysia 1997. Can anyone tell me how to solve this?
Related Posts with two way scatter
Bug found in nearmrg command (?)Hello everyone, After hours of debugging of my code, I think I found a bug in the command nearmrg t…
Error in postestimation testHi, I am doing a regression analysis with cross sectional data and matched pairs design. In order …
Survival analysis (hazard model): how to set up the 10-year data in a three-month windowDear Statalist, I have a set of data (from 2011-2020). I want to test when event X happened for use…
Granual calculations in an unbalanced panel data set are not consistent with the aggregatesI have a panel dataset with these variables variable name type format label variable label --------…
Temporal disaggregation with no indicator in Stata?!Hi all Is there any code available in Stata for time series disaggregation with no indicator variab…
Subscribe to:
Post Comments (Atom)
0 Response to two way scatter
Post a Comment