|  |  | 
[Date Prev][Date Next][Thread Prev][Thread Next][Date index][Thread index]
st: do files - general question
I've noticed some limitations when running do files, and was  
wondering if there was a way of getting around them.  These two are,  
I think, related, but I'll separate them anyway.
1.  When I estimate numerous different regression models, following  
every few with its own -estout- command, there is a point (sometimes)  
when the -estout- command, nor the subsequent regression commands,  
stop being executed within the -do- framework of execution.  For  
instance, I might have:
. regression 1
. estimates store 1
. regression 2
. estimates store 2
. estout ...
. regression 3
. estimates store 3
. regression 4
. estimates store 4
. estout ...
and so on...
At some point, if I have too many of these repeated commands, the do  
file will not execute subsequent regression commands.  It appears to  
be commented out by Stata itself, and so output simply is shown, but  
not executed - always preceded by an '>' in the Stata output.  If I  
cut and paste these into a separate do file, and run them, then it  
executes fine.  Is there a limit to how many regressions and -estout-  
commands one can do in a single -do- file?
2.  Can one use a -do- file to execute multiple do files repeatedly?   
For instance, I wanted to use -sutex- to create summary stats for  
different datasets.  So, for instance:
. set more off
. do e1
. do mergeall_e1
. sutex blah blah
. clear
> do e1
> do mergeall_e2
> #delimit ;
varlist not allowed
r(101);
end of do-file
r(101);
The above is a do file I had which which was supposed to do e1 then  
mergeall_e1, then sutex various commands, then clear, then do e1  
again, then the second do, then do the same sutex a second time.  But  
as you can see, after clearing once, I get the ">" commenting out of  
the subsequent commands - the same that happened above.  I suspect do  
files cannot handle certain kinds of repeated commands, either do  
files or regressions combined with ado files, like estout, but is  
that the case?  I've been getting around this by simply having  
multiple do files, but was just curious.
sc
*
*   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/