Bookmark and Share

Notice: On April 23, 2014, Statalist moved from an email list to a forum, based at statalist.org.


[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

re: Re: st: mlabel on marginsplot?


From   "Ariel Linden, DrPH" <[email protected]>
To   <[email protected]>
Subject   re: Re: st: mlabel on marginsplot?
Date   Sat, 20 Oct 2012 12:03:03 -0400

Thank you, Phil. This is exactly what I was looking for. It certainly is
more parsimonious than the two-step process using serset.


Date: Sat, 20 Oct 2012 08:42:31 +1100
From: Phil Clayton <[email protected]>
Subject: Re: st: mlabel on marginsplot?

Slightly simpler (but needing a bit of tidying up) is:
sysuse auto,clear
reg price mpg
margins , at(mpg=(5(5)50))
marginsplot, plotopts(mlabel(_margin))

Phil

On 20/10/2012, at 6:10 AM, "Ariel Linden, DrPH" <[email protected]>
wrote:

> As a followup, here is one solution based on Scott's suggested code below:
> 
> sysuse auto,clear
> reg price mpg
> margins , at(mpg=(5(5)50))
> marginsplot
> serset use
> twoway(connected _margin _ci_lb _ci_ub  __000000, mlabel( _margin ))
> 
> This can obviously be modified, but it works!
> 
> Ariel


*
*   For searches and help try:
*   http://www.stata.com/help.cgi?search
*   http://www.stata.com/support/faqs/resources/statalist-faq/
*   http://www.ats.ucla.edu/stat/stata/


© Copyright 1996–2018 StataCorp LLC   |   Terms of use   |   Privacy   |   Contact us   |   Site index