Bookmark and Share

Notice: On April 23, 2014, Statalist moved from an email list to a forum, based at statalist.org.


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

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


From   Roger Newson <[email protected]>
To   "[email protected]" <[email protected]>, Ramyani Gupta <[email protected]>
Subject   st: New versions of -xcollapse- and -xcontract- on SSC
Date   Wed, 05 Oct 2011 11:37:17 +0100

Thanks as always to the greatly appreciated services of Kit Baum, new versions of the -xcollapse- and -xcontract- packages are now available for download from SSC. In Stata, use the -ssc- command to do this, or -adoupdate- if you already have old versions of -xcollapse- and -xcontract-.

The -xcollapse- and -xcontract- packages are described as below on my website, and are extended versions of -collapse- and -contract-, respectively. The new versions fix a bug, which caused problems for users of some updates of Stata Version 10, in which the -index()- function became temporarily unavailable because it had been superseded by -strpos()-. The -index()- function was quietly restored by StataCorp in a later update, following protests from users on Statalist (which StataCorp listened to as they always do). However, some Stata 10 users out there still have the updates in which -index()- was missing, so I have replaced all calls to -index()- in both packages with calls to -strpos()-, so the packages should now work, even for those users.

I would like to thank my former colleague Ramyani Gupta, now at St George's University in London, UK, for alerting me to this outstanding problem.

Best wishes

Roger


--
Roger B Newson BSc MSc DPhil
Lecturer in Medical Statistics
Respiratory Epidemiology and Public Health Group
National Heart and Lung Institute
Imperial College London
Royal Brompton Campus
Room 33, Emmanuel Kaye Building
1B Manresa Road
London SW3 6LR
UNITED KINGDOM
Tel: +44 (0)20 7352 8121 ext 3381
Fax: +44 (0)20 7351 8322
Email: [email protected]
Web page: http://www.imperial.ac.uk/nhli/r.newson/
Departmental Web page:
http://www1.imperial.ac.uk/medicine/about/divisions/nhli/respiration/popgenetics/reph/

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

------------------------------------------------------------------------------------
package xcollapse from http://www.imperial.ac.uk/nhli/r.newson/stata10
------------------------------------------------------------------------------------

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: 27september2011
      Stata-Version: 10

INSTALLATION FILES                                  (click here to install)
      xcollapse.ado
      xcollapse.sthlp
------------------------------------------------------------------------------------
(click here to return to the previous screen)

------------------------------------------------------------------------------------
package xcontract from http://www.imperial.ac.uk/nhli/r.newson/stata10
------------------------------------------------------------------------------------

TITLE
xcontract: Make dataset 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: 29september2011
      Stata-Version: 10

INSTALLATION FILES                                  (click here to install)
      xcontract.ado
      xcontract.sthlp
------------------------------------------------------------------------------------
(click here to return to the previous screen)
*
*   For searches and help try:
*   http://www.stata.com/help.cgi?search
*   http://www.stata.com/support/statalist/faq
*   http://www.ats.ucla.edu/stat/stata/


© Copyright 1996–2018 StataCorp LLC   |   Terms of use   |   Privacy   |   Contact us   |   Site index