Thanks to Kit Baum, there is now a new version of -xcontract- downloadable
from SSC (using the -ssc- command in Stata). The -xcontract- package is
described as below on my website. The new version incorporates two
suggestions from Nick Cox to make the code slightly more efficient.
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: 05july2004
Stata-Version: 8
INSTALLATION FILES (click here to install)
xcontract.ado
xcontract.hlp
---------------------------------------------------------------------------------------
(click here to return to the previous screen)
--
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]
Website: http://www.kcl-phs.org.uk/rogernewson
Opinions expressed are those of the author, not the institution.