Bookmark and Share

Notice: On March 31, it was announced that Statalist is moving from an email list to a forum. The old list will shut down on April 23, and its replacement, is already up and running.

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

st: repeat do-file over multiple files

From   "science" <>
To   <>
Subject   st: repeat do-file over multiple files
Date   Thu, 1 Mar 2012 20:19:45 +0100

Dear all,

I have 256 dta-files in a folder.
The structure is:


That is 4 measurements for each subject (2 measurements at 2 visits)

The same do-file should be run on all 256 files and saved as 256 new files.

And lastly the 256 new files should be combined using append to one file.

My question is if that is possible and how it should be done?

Maybe the results from each of the 256 files can be stored in memory and just saved as 1 file.
The do-file ends with:
  collapse id visit nr tid vo2 vco2 rer ee antal1 antal2 antal3
which are the only data I would save from the files.
Does that make the job easier or better?


Allan Stubbe
Aarhus University Hospital
*   For searches and help try:

© Copyright 1996–2015 StataCorp LP   |   Terms of use   |   Privacy   |   Contact us   |   Site index