Thanks to Kit Baum, there is now a new version of my -dsconcat- package
available on SSC. To find how to install it, type -findit dsconcat-, -ssc
desc dsconcat- or -net search dsconcat- inside Stata.
-dsconcat- is a multi-file version of -use-. It concatenates a list of
Stata data files into a new data set in the memory, overwriting any
existing data. Optionally, -dsconcat- creates new variables indicating, for
each observation in the new data set, the data set of origin of that
observation and the sequential order of that observation in its data set of
origin. The new version has an added -subset- option, allowing the user to
select subsets of the observations and/or the variables in the input data
sets. The -subset- option is specified by the user as a combination of a
-varlist- and/or an -if- qualifier and/or an -in- qualifier. For instance,
the user might type
and create, in memory, a data set containing the variables -make-,
-foreign-, -mpg- and -weight- in observations 1-53 of each of the data sets
-auto1-, -auto2-, -auto3- and -auto4-, plus a new string variable -dslab-,
storing the name of the input data set for each observation. This is useful
if you want to concatenate a small subset of each of a large number of
large data sets without using up too much memory. (I often want to do this
when I have created a large number of output data sets containing
regression parameters for a large number of large logistic regression
models using the -parmest- package (also on SSC), and want to create a new
data set containing only the interesting odds ratios corresponding to the
interesting exposures and excluding the uninteresting odds ratios
corresponding to confounders. I can then use the new data set of
interesting odds ratios as input to the -smileplot- package to do multiple
test procedures, or even to produce histograms of the z-scores to
demonstrate to my colleagues a beautiful fit to the normal(0,1)
distribution expected if all null hypotheses are true.)
Best wishes
Roger
--
Roger Newson
Lecturer in Medical Statistics
Department of Public Health Sciences
King's College London
5th Floor, Capital House
42 Weston Street
London SE1 3QD
United Kingdom
Tel: 020 7848 6648 International +44 20 7848 6648
Fax: 020 7848 6620 International +44 20 7848 6620
or 020 7848 6605 International +44 20 7848 6605
Email: [email protected]
Opinions expressed are those of the author, not the institution.