Bookmark and Share

Notice: On March 31, it was announced that Statalist is moving from an email list to a forum. The old list will shut down on April 23, and its replacement, statalist.org is already up and running.


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

re: Re: st: mlabel on marginsplot?


From   "Ariel Linden, DrPH" <ariel.linden@gmail.com>
To   <statalist@hsphsun2.harvard.edu>
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 <philclayton@internode.on.net>
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" <ariel.linden@gmail.com>
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–2014 StataCorp LP   |   Terms of use   |   Privacy   |   Contact us   |   Site index