Statalist


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

RE: st: storing result inside a unix scripts


From   "Nick Cox" <[email protected]>
To   <[email protected]>
Subject   RE: st: storing result inside a unix scripts
Date   Tue, 22 Jan 2008 19:10:09 -0000

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/



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