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

st: New versions of -xcontract- and -xcollapse- on SSC


From   Roger Newson <roger.newson@kcl.ac.uk>
To   statalist@hsphsun2.harvard.edu
Subject   st: New versions of -xcontract- and -xcollapse- on SSC
Date   Mon, 11 Aug 2003 15:51:08 +0100

Fellow Statalisters

Thanks to Kit Baum, new versions of the -xcontract- and -xcollapse- packages are now available on SSC. In Stata, type -ssc desc xcontract- and -ssc desc xcollapse- to find out more.

The -xcontract- and -xcollapse- packages are described as below on my website. They are extended versions of -contract- and -collapse-, respectively, and allow the user to specify the destination of the output data set, which may be listed to the Stata log, saved to a disk file, or written to memory (overwriting the pre-existing data set). -xcontract- also calculates percentages (within by-groups if specified). The new versions are improved by having -by()- options instead of being byable using -by varlist :-, so the user does not have to sort the data before calling -xcontract- and -xcollapse-, or sort them back into the original order afterwards. (Sorry for any inconvenience caused because I didn't get this feature right first time.)

Best wishes

Roger


----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------
package xcontract from http://www.kcl-phs.org.uk/rogernewson/stata8
----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------

TITLE
xcontract: Make data set of frequencies and percents on disk or in memory

DESCRIPTION/AUTHOR(S)
xcontract is an extended version of contract. It creates a data set with one
observation per combination of values of a list of variables in the existing
data set and new variables containing the frequency and percent of each
combination, and, optionally, the cumulative frequency and percent of each
combination. A list of by-variables can be used with xcontract, and the
percents will then be calculated within by-groups. The output data set may
either be listed to the Stata log, or saved to a disk file, or written to the
memory (overwriting any existing data set).

Author: Roger Newson
Distribution-Date: 10august2003
Stata-Version: 8

INSTALLATION FILES (click here to install)
xcontract.ado
xcontract.hlp
----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------

----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------
package xcollapse from http://www.kcl-phs.org.uk/rogernewson/stata8
----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------

TITLE
xcollapse: Make data set of summary statistics on disk or in memory

DESCRIPTION/AUTHOR(S)
xcollapse is an extended version of collapse, which creates a data set with
one observation per combination of values of a list of variables in the
existing data set and new variables containing summary statistics of other
variables (eg means) in each combination. xcollapse allows the user to choose
the destination of the output data set, which may either be listed to the
Stata log, or saved to a disk file, or written to the memory (overwriting any
existing data set).

Author: Roger Newson
Distribution-Date: 10august2003
Stata-Version: 8

INSTALLATION FILES (click here to install)
xcollapse.ado
xcollapse.hlp
----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------





--
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: roger.newson@kcl.ac.uk
Website: http://www.kcl-phs.org.uk/rogernewson

Opinions expressed are those of the author, not the institution.

*
* 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–2014 StataCorp LP   |   Terms of use   |   Privacy   |   Contact us   |   What's new   |   Site index