Bookmark and Share

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

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

Re: st: running marginsplots without rerunning margins again

From   Richard Williams <[email protected]>
To   [email protected], [email protected]
Subject   Re: st: running marginsplots without rerunning margins again
Date   Wed, 10 Aug 2011 22:03:13 -0500

At 08:10 PM 8/10/2011, Doug Hess wrote:
I just installed Stata 12 and am playing with the "marginsplot"
command. I am wondering how to run margins plot on a restored margins?
Can it? Complex margins commands can take a long time to run. Is there
a way to restore or use saved results from a complex running of
margins so that I can fiddle with the graph later?

Come to think of it, how do I redisplay results from a margins command
after "restoring" a stored file or "using" a saved file. For
regression estimates you just type regress and it shows it. How is
this done for other saved files.

I thought it would simply be a matter of using the -post- option of margins and the -est store- and -est restore- commands. To my surprise, though, the following produces an error at the end:

clear all
sysuse auto
reg  price mpg i.foreign
margins foreign, post
est store margins1
reg  price mpg i.foreign  weight
est restore margins1

The error is "previous command was not margins." But if you do -ereturn list-, it does say the last command was -margins-. I am surprised it doesn't work, and I wonder if this is a bug or if there is some good reason for this.

Richard Williams, Notre Dame Dept of Sociology
OFFICE: (574)631-6668, (574)631-6463
HOME:   (574)289-5227
EMAIL:  [email protected]

*   For searches and help try:

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