I'm using STATA 15.
My question is how do I convert and then format a datetime variable (current type: double, format: %tc) properly so I can create a scatterplot where both axes show certain mm/yy?
My code is below. Please let me know if I can provide better/additional info! Thank you so much
Code:
format firstr_birth %td format secondr_birth %td graph twoway scatter secondr_birth firstr_birth, /// legend(off) mcolor(black) /// ytitle("Date of first live birth during follow-up round") /// xtitle("Date of first live birth at baseline") /// title("Plot of dates of first live birth as reported during baseline & follow-up rounds", color(black)) /// graphregion(color(white)) ylabel(, grid glcolor(gs14))
0 Response to Scatterplot of dates?
Post a Comment