Dear Stata Users,
I am producing a graph with marginsplot throug the following commands and options
svy: logit event1 ib1.tercile2##i.agesm##i.sex i.wave5 i.livingpar i.ukborn i.sex i.educ2 if marital==1&age>17&age<36&evunion ==2&jbstat!=7&ivfioall==1, or level(90)
outreg2 using model_sex_new, word label replace level(90) eform
margins i.sex#i.agesm, level(90) post atmeans dydx(tercile2)
outreg2 using margisex, level(90) replace word label
marginsplot , xdim(agesm) by(sex) ///
plot1opt(msymbol("O") msize(vlarge)) ci1opts(lwidth(medium thick) ) ///
......
When I run my mplotoffset in the following way I produce a graph without the legend (just to notice tercile2 is a bivariate variable)
marginsplot, xdim(agesm) by(sex) ///
plot1opt(msymbol("O") msize(vlarge)) ci1opts(lwidth(medium thick) ) ///
......
When I force the legend through legend(on), the legend is split into two, whereas I would like to have one single legend
(I tried to upload the file,but it kept on loading with no result. Maybe it was too heavy?)
When I put legend into by, I have an error message, which says that that operation is not allowed.
marginsplot , xdim(agesm) by(sex, legend(on)) ///
plot1opt(msymbol("O") msize(vlarge)) ci1opts(lwidth(medium thick) ) ///
......
Is there the possibility of getting what I need?
Thank you. Best,
Lydia
Related Posts with Marginsplot, legend and by()
Average and Median values by groupDear All Will appreciate if you can help me on the following query. The following data shows firms…
How can I select observations containing specific words?Dear all, I need to pick persons A & B whose position include exact "Independent" from the list…
Two limit Tobit with robust and clustered standard errorsHello, would someone have any help on how to run a two limit tobit model with robust and clustered s…
Maki's CointegrationI was wondering if anyone has written an ado file for Maki's cointegration: Maki, Daiki, (2012), Tes…
Problem with specifying a range of year or listing yearsHello, I am quite new to Stata and am trying to analyse some time series data but am having some is…
Subscribe to:
Post Comments (Atom)
0 Response to Marginsplot, legend and by()
Post a Comment