Statalist


[Date Prev][Date Next][Thread Prev][Thread Next][Date index][Thread index]

st: New versions of somersd and parmest on SSC


From   "Newson, Roger B" <[email protected]>
To   <[email protected]>
Subject   st: New versions of somersd and parmest on SSC
Date   Wed, 11 Jun 2008 19:36:36 +0100

Thanks to Kit Baum, new versions of the somersd and parmest packages
(described as below on my website) are now available for download from
SSC. In Stata, use the ssc command to do this.

Both packages have been improved to increase computational efficiency.
The improvements in the 2 packages are as follows:

1. The somersd package

This is now updated to Stata 10, and has online help files suffixed
.sthlp, documenting the results saved in e() and/or r() by each command,
which, in the case of the somersd command, now include e(cmdline) (the
command as typed). However, users of Stata 5, 6, 7, 8 and 9 can still
download the Stata 5, 6 and 9 versions of somersd from my website. This
is usually done by typing, in Stata,

net from "http://www.imperial.ac.uk/nhli/r.newson/";

and downloading the package from the subdirectory for the Stata version
required.

Also, the censlope command now has a new iteration option nolimits,
which specifies that the confidence limits for the percentile slopes
will not be calculated. This is intended to save time for users who wish
to calculate confidence limits for percentile slopes using resampling
command prefixes, such as bootstrap:, jackknife:, or svy brr:. Usually,
censlope calculates the estimates and confidence limits for percentile
slopes iteratively, using 2 iteration sequences for the estimate and 1
iteration sequence for each of the confidence limits. The nolimits
option therefore approximately halves the time taken to calculate
bootstrap, jackknife or BRR confidence intervals for a Theil-Sen median
slope. The bootstrap method is recommended for the Theil-Sen median
slope by Wilcox (1998). I would like to thank Bob Fitzgerald of MPR
Associates, Inc. for drawing my attention to some problems with
subsampling methods and the somersd package, and Jeff Pitblado of
StataCorp for his helpful advice on how they might be solved.

2. The parmest package

All 4 modules of this package (parmest, parmby, parmcip and metaparm)
perform the same functions as before. However, the code of all 4 modules
has been updated internally. In the case of parmby, the internal code
has been streamlined (using Mata), so that, if multiple by-groups are
present, then parmby only inputs one by-group at a time (using an
in-qualifier), instead of inputting them all and dropping all except the
current one (using an if-qualifier). Predictably, this speeds up the
execution if a very large number of by-groups are present. For instance,
if the dataset is formed by concatenating 8192 copies of the auto
dataset distributed with Stata, and the by-groups are the 16382
combinations of copy number and car type (US or foreign cars), implying
606208 observations, then, on my Windows system, the new version of
parmby takes 1370.492 seconds to execute, but the old version of parmby
takes 3841.310 seconds to execute (2.8028693 times as long). I would
like to thank Mike Blasnik, David Elliott and David Airey for their very
helpful discussion, research and advice on the computational issues
involved in this streamlining process, and Vince Wiggins for warning me
of the dangers of trying to do it another way (using the undocumented
_prefix command suite).

Best wishes

Roger


References

Wilcox, R. R. 1998. A note on the Theil-Sen regression estimator when
the regressor is random and the error term is heteroscedastic.
Biometrical Journal 40: 261-268.


Roger B Newson
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: www.imperial.ac.uk/nhli/r.newson/
Departmental Web page:
http://www1.imperial.ac.uk/medicine/about/divisions/nhli/respiration/pop
genetics/reph/

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


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

TITLE
      somersd: Kendall's tau-a, Somers' D and percentile slopes

DESCRIPTION/AUTHOR(S)
      The somersd package contains the programs somersd, censlope and
cendif,
      which calculate confidence intervals for a range of parameters
behind
      rank or "nonparametric" statistics. somersd calculates confidence
      intervals for generalized Kendall's tau-a or Somers' D parameters,
      and stores the estimates and their covariance matrix as estimation
results.
      It can be used on left-censored, right-censored, clustered and/or
      stratified data. censlope is an extended version of somersd, which
also
      calculates confidence limits for the generalized Theil-Sen median
slopes
      (or other percentile slopes) corresponding to the version of
Somers' D
      or Kendall's tau-a estimated. cendif is an easy-to-use program to
      calculate confidence intervals for Hodges-Lehmann median
differences
      (or other percentile differences) between two groups. The somersd
package
      can be used to calculate confidence intervals for a wide range of
      rank-based parameters, which are special cases of Kendall's tau-a,
      Somers' D or percentile slopes. These parameters include
differences
      between proportions, Harrell's c index, areas under receiver
operating
      characteristic (ROC) curves, differences between Harrell's c
indices or
      ROC areas, Gini coefficients, population attributable risks,
median
      differences, ratios, slopes and per-unit ratios, and the
parameters
      behind the sign test and the Wilcoxon-Mann-Whitney or
Breslow-Gehan
      ranksum tests. Full documentation of the programs (including
methods and
      formulas) can be found in the manual files somersd.pdf,
censlope.pdf and
      cendif.pdf, which can be viewed using the Adobe Acrobat Reader.
      
      Author: Roger Newson
      Distribution-date: 06June2008
      Stata-version: 10
      

INSTALLATION FILES                                  (click here to
install)
      cendif.ado
      censlope.ado
      somers_p.ado
      somersd.ado
      _bcsf_bisect.mata
      _bcsf_bracketing.mata
      _bcsf_regula.mata
      _bcsf_ridders.mata
      _blncdtree.mata
      _somdtransf.mata
      _u2jackpseud.mata
      _v2jackpseud.mata
      blncdtree.mata
      tidot.mata
      tidottree.mata
      lsomersd.mlib
      cendif.sthlp
      censlope.sthlp
      censlope_iteration.sthlp
      mf_bcsf_bracketing.sthlp
      mf_blncdtree.sthlp
      mf_somdtransf.sthlp
      mf_u2jackpseud.sthlp
      somersd.sthlp
      somersd_mata.sthlp

ANCILLARY FILES                                     (click here to get)
      cendif.pdf
      censlope.pdf
      somersd.pdf
------------------------------------------------------------------------
--------------------
(click here to return to the previous screen)


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

TITLE
      parmest: Create datasets with 1 observation per estimated
parameter

DESCRIPTION/AUTHOR(S)
      The parmest package has 4 modules: parmest, parmby, parmcip and
metaparm.
      parmest creates an output dataset, with 1 observation per
parameter of the
      most recent estimation results, and variables corresponding to
parameter names,
      estimates, standard errors, z- or t-test statistics, P-values,
confidence
      limits and other parameter attributes. parmby is a quasi-byable
extension to
      parmest, which calls an estimation command, and creates a new
dataset, with 1
      observation per parameter if the by() option is unspecified, or 1
observation
      per parameter per by-group if the by() option is specified.
parmcip inputs
      variables containing estimates, standard errors and (optionally)
degrees of
      freedom, and computes new variables containing confidence
intervals and
      P-values. metaparm inputs a parmest-type dataset with 1
observation for each
      of a set of independently-estimated parameters, and outputs a
dataset with
      1 observation for each of a set of linear combinations of these
parameters,
      with confidence intervals and P-values, as for a meta-analysis.
The output
      datasets created by parmest, parmby or metaparm  may be listed to
the Stata
      log and/or saved to a file and/or retained in memory (overwriting
any
      pre-existing dataset). The confidence intervals, P-values and
other parameter
      attributes in the dataset may be listed and/or plotted and/or
tabulated.
      
      Author: Roger Newson
      Distribution-Date: 10june2008
      Stata-Version: 10

INSTALLATION FILES                                  (click here to
install)
      metaparm.ado
      parmby.ado
      parmcip.ado
      parmest.ado
      metaparm.sthlp
      metaparm_content_opts.sthlp
      metaparm_outdest_opts.sthlp
      metaparm_resultssets.sthlp
      parmby.sthlp
      parmby_only_opts.sthlp
      parmcip.sthlp
      parmcip_opts.sthlp
      parmest.sthlp
      parmest_ci_opts.sthlp
      parmest_outdest_opts.sthlp
      parmest_resultssets.sthlp
      parmest_varadd_opts.sthlp
      parmest_varmod_opts.sthlp
------------------------------------------------------------------------
--------------------
(click here to return to the previous screen)


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