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

Re: st: storing result inside a unix scripts

From   "Austin Nichols" <[email protected]>
To   [email protected]
Subject   Re: st: storing result inside a unix scripts
Date   Wed, 23 Jan 2008 07:44:04 -0500

Marco Grazzi:
Whether you loop inside one do file or loop across do files, I think
you want the -post- command for this task.  You can do -eret list-
after a single probit to see what results you might want to save and
then -post- a selection of them to a new dataset for later use.

On Jan 22, 2008 2:10 PM, Nick Cox <[email protected]> wrote:
> 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
>    ** 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:
> > 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:

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