Statalist


[Date Prev][Date Next][Thread Prev][Thread Next][Date index][Thread index]

Re: R: RE: st: storing result inside a unix scripts


From   "Ben Jann" <[email protected]>
To   [email protected]
Subject   Re: R: RE: st: storing result inside a unix scripts
Date   Wed, 23 Jan 2008 21:31:41 +0100

If you have Stata 10, then maybe the -estimates save- command is of
help. It allows you to save the results of an estimation command in a
file and then later retrieve it

If you are using Stata 8 or 9 then you can use the -estwrite- user
package (which makes use of Michael Blasnik's -estsave- package).

If fact, -estwrite- has an advantage over -estimates save- in that it
can save results from several models in one file and it is also
possible to append models to an existing file.

ben

On Jan 22, 2008 11:04 PM,  <[email protected]> wrote:
> Thanks a lot!
> Actually we ve pursued this other direction because requirements in terms of data mgmt strongly suggested to decompose the problem as we did.
> More ideas are welcomed, but thanks anyway!.
>
> Sent from my BlackBerry(R) wireless device
>
> -----Original Message-----
> From: "Nick Cox" <[email protected]>
>
> Date: Tue, 22 Jan 2008 19:10:09
> To:<[email protected]>
> Subject: RE: st: storing result inside a unix scripts
>
>
> I agree with Sergiy's main point. In so far as I understand the problem,
> doing everything in Stata seems by far the simplest approach, regardless
> of OS.
>
> However, -xml_tab- [sic] advertises itself as for MS Windows, so on the
> face of it is not suitable for a Unix user.
>
> Simlarly, -tabout-, despite several excellent features, is not in the
> same game as (e.g.) -outreg2-. Perhaps Sergiy meant to say -estout-.
> Whether that is so, -estout- certainly deserves a mention in this
> company.
>
> I think all extras mentioned are downloadable from SSC.
>
> Nick
> [email protected]
>
> Sergiy Radyakin
>
>
> I am not sure if batch mode is really necessary here. Why don't you
> loop the data files from within Stata in one do file, and then run
> your processing do file. See help for foreach.
>
> help foreach
>
> -xml_tab- may be a useful command if you want to accumulate the
> estimationg results from multiple estimations.
>
> findit xml_tab
>
> So the loop might look like this
>
> foreach file in this.dta that.dta theother.dta {
>     ** open file
>     use "`file'"
>     ** prepare variables, filter observations, run probit, etc
>     do my-processing-do-file.do
>     ** collect the results
>     xmltab whatever_parameters
> }
>
>
> see also two other similar commands -outreg2- and -tabout-:
>
> findit outreg2
> findit tabout
>
> Marco Grazzi
>
> > I am running a do file in Unix batch mode. I have used the suggestion
> > on the FAQ: http://www.stata.com/support/faqs/unix/batch.html
> > The .do file performs 3 simple probit regressions.
> >
> > The stata .do file is run within a 'for' cycle (i.e. it is running
> each
> > time on a different database). At every loop, each time the stata
> > do file is run, I want to store and append the results of these 3
> > regression so that I can perform analysis afterwards (compute average,
> > do some tests, etc). It is my understanding that I would need to
> > perform this within the stata do file (probably with some pipe of
> > strings, shell commands, or similar), but I don't really know how.
>
> *
> *   For searches and help try:
> *   http://www.stata.com/support/faqs/res/findit.html
> *   http://www.stata.com/support/statalist/faq
> *   http://www.ats.ucla.edu/stat/stata/
>
>
>
> *
> *   For searches and help try:
> *   http://www.stata.com/support/faqs/res/findit.html
> *   http://www.stata.com/support/statalist/faq
> *   http://www.ats.ucla.edu/stat/stata/
>
*
*   For searches and help try:
*   http://www.stata.com/support/faqs/res/findit.html
*   http://www.stata.com/support/statalist/faq
*   http://www.ats.ucla.edu/stat/stata/



© Copyright 1996–2024 StataCorp LLC   |   Terms of use   |   Privacy   |   Contact us   |   What's new   |   Site index