[Date Prev][Date Next][Thread Prev][Thread Next][Date index][Thread index]
Re: st: Can a non-programmer permanently save the results of estimation?
I've put togther an ado file that I think does this -- it saves all of the
macros, scalars, and matrices from the last estimation command (in a special
dataset) and allows you to retrieve them in future Stata sessions --
essentially what -estimates store- does for a single session.
I haven't tested it extensively and so would offer it to any beta-testers
interested. If it seems to do what you want, then maybe I will submit it to
SSC. It's called -estsave- and has a simple syntax (you're either
using(filename) or saving(filename). You need to specify a unique id
variable when savings results so that it can put e(sample) back in place
when retrieved. The dataset it saves only contains one variable (the ID
variable for the estimation sample only) and then saves everything else
using characteristics. I think it works...
----- Original Message -----
From: "Buzz Burhans" <email@example.com>
Sent: Friday, November 14, 2003 12:13 PM
Subject: Re: st: Can a non-programmer permanently save the results of
> Hi Stephen,
> If you receive any further information off the list on this issue, would
> you please make it available on the list? I share your interest in this,
> it would be tremendously useful if the capability to store models existed
> in Stata as you describe below .
> If it is at all helpful, I run some gllamm models that take very long
> to run also, and in cases where I may need to refit the models at a
> time I save transpose e(b)' using -svmat- or -svmat2-, when I rerun the
> model I use -mkmat- and the "from() copy" option of gllamm with the
> transpose of the saved matrix ; this reduces the time needed to refit the
> model, unfortunately it often remains a lengthy , albeit usually
> substantially shorter, task to refit the model.
> If Stata Corp is listening, storing models is a feature available in other
> stats packages I use such as S-Plus, and apparently would be useful for
> some Stata users.
> Buzz Burhans
> At 01:41 PM 11/13/2003 -0600, you wrote:
> >I am a fairly experienced Stata user but not a Stata programmer, so my
> >apologies if this is a bit elementary. How do I permanently save the
> >results of models so that I can replay/reuse models after rebooting my
> >The user command "estimates store name" seems to only keep the results
> >of a model somewhere in memory for replaying/reusing/displaying during
> >single active session. If I estimate some models, invoke the "estimates
> >store" command, save the dataset, exit Stata and come back later, issuing
> >the command "estimates restore name" does not seem to bring back any of
> >previously estimated models. I would like to be able to issue a command
> >such as "estimates store name....filename" so that I can do the things
> >described in [U] 23.3 through [U]23.8 even if I exit Stata and come back
> >later. For example, if I estimate a model with xtprobit or gllamm that
> >takes several hours to run and then I decide next week that I want to
> >with it some more, I have to re-estimate the model.
> >I presume (correct??) that I can do what I want if I invest in learning
> >to program Stata using the _estimates, ereturn, sreturn etc. commands.
> >there no easier way?
> >Stephen T. Mennemeyer Ph.D.
> >University of Alabama at Birmingham
> >School of Public Health
> >Dept. of Health Care Organization and Policy
* For searches and help try: