Stata The Stata listserver
[Date Prev][Date Next][Thread Prev][Thread Next][Date index][Thread index]

st: Saving and appending to a file


From   Philippe Huber <[email protected]>
To   [email protected]
Subject   st: Saving and appending to a file
Date   Thu, 23 Oct 2003 10:27:52 +0200

Hello all,

 

I want to repeat the same estimation for a set of samples each written in different files (say DataFile1.txt, DataFile2.txt…). I think that a “foreach” command would be adequate but how exactly?

 

Secondly, I want the results to be saved in a single file, it means appending to an output file. I thought using something like

 

matrix A=e(b)

svmat A

gen count=_n

 

outsheet A1-A35 using resultsStata.txt if count==1, nonames

 

but, the problem is that it won’t save if the file “resultStata.txt” already exists. Obviously, if I use the replace command,  it will erase the previous estimations. What can I do?

 

Thanks to all

 

Philippe Huber

 

University of Geneva

Department of Econometrics

Pont d'Arve 40

1211 Geneva, Switzerland

 




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