![]() (In extreme cases, reach for linkplot (SSC). See also this Tip.Īlthough the example dataset is well behaved, extra options sort connect(L) will help in some case to remove spurious connections between individuals or panels. To get distinct colours, distinct variables suffice, which is where separate has a role. ![]() When frustrated by its wired-in choices, people often just reach for line. For example for the xline 49.90, I want a SA label saying 'mean South African hourly wage', 26.34 'median South African hourly wage' etc. However I am unsure how to label these xlines. There is nothing very special about xtline. Labelling 'xline', 01:50 Hello all, I have a CDF with a few 'xlines'. Line alcuse? age, legend(off) sort connect(L) There is considerable ingenuity in the question code in working through all the identifiers, but a broad-brush approach seems to work as well. Even with this modest dataset there are 82 distinct identifiers, so any attempt to show them distinctly fails to be useful, if only because the resulting legend takes up most of the real estate. It is difficult (for me) to separate the programming issue here from statistical or graphical views on what kind of graph works well, or at all. Xtline alcuse, legend(off) scheme(s1mono) overlay `m_plot_opt' `f_plot_opt' Loc f_plot_opt "`f_plot_opt' plot`i'opts(recast(connected) mcolor(black) msize(medsmall) msymbol(triangle) lcolor(black) lwidth(medthin) lpattern(solid))"ĭi "xtline alcuse, legend(off) scheme(s1mono) overlay `m_plot_opt' `f_plot_opt'" 4.1.2 Fitted Lines Suppose we want to show the fitted regression line as well. We will now add a few bells and whistles. The command may be abbreviated to twoway scatter, or just scatter if that is the only plot on the graph. The code below, using publicly available data from UCLA's excellent Stata guide shows my basic code and reproduces the error: use, clear Stata labels the axes using the variable labels, if they are defined, or variable names if not. I am aware of this solution which employs combined graphs but that is also not practical given the large number of unique individuals in my data.ĭoes a more simple solution to this problem exist? Does Stata have the capacity to overlay multiple -xtline- plots like it can -twoway- plots? ![]() When I try this solution Stata produces the "too many options" error, which is perhaps predictable given the large number of unique persons. Taking cues from this question on Statalist, I produced code similar to what is below. I chose to recast the xtline plot as "connected" and show males using circle markers and females as triangle markers. I am attempting to produce an overlayed -xtline- plot that distinguishes between males and females (or any number of multiple groups) by displaying different plot styles for each group. ![]()
0 Comments
Leave a Reply. |
AuthorWrite something about yourself. No need to be fancy, just an overview. ArchivesCategories |