Bookmark and Share

Notice: On March 31, it was announced that Statalist is moving from an email list to a forum. The old list will shut down on April 23, and its replacement, statalist.org is already up and running.


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

st: New versions of -punaf-, -regpar-, -margprev- and -marglmean- on SSC


From   "Roger B. Newson" <r.newson@imperial.ac.uk>
To   "statalist@hsphsun2.harvard.edu" <statalist@hsphsun2.harvard.edu>
Subject   st: New versions of -punaf-, -regpar-, -margprev- and -marglmean- on SSC
Date   Mon, 18 Jun 2012 12:28:31 +0100

Thanks yet again to Kit Baum, new versions of the packages -punaf-, -regpar-, -margprev- and -marglmean- 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 these packages.

The -punaf-, -regpar-, -margprev- and -marglmean- packages are described as below on my website, and estimate population attributable fractions, population attributable risks, marginal prevalences and marginal means, respectively, after estimation commands whos predicted values are conditional means or prevalences, using Normalizing and variance-stabilizing transformations to derive the confidence intervals. The new versions have an added -predict()- option, corresponding to the option of the same name for -margins- (which is used by these packages together with -nlcom-). This -predict()- option allows the user to use the packages after multi-equation commands such as -mlogit-. For instance, in the -sysdsn1- data, the user might use -regpar- to estimate the decrease in prevalence of uninsured status that might be expected ina fantasy scenario where all subjects were 50 years old but all other covariates stayed the same, as follows:

webuse sysdsn1, clear
mlogit insure age male nonwhite i.site
regpar, at(age==50) predict(outcome(3))

Note that the -punafcc- package, the other member of this suite of packages, has not been updated with a -predict()- option. This is because -punafcc- uses -margins- with the -expression()- option, which is mutually exclusive with the -predict()- option. I cannot think of an instance where a -predict()- option would be useful with -punafcc-, which is designed for use with case-control or survival data.

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: r.newson@imperial.ac.uk
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 punaf from http://fmwww.bc.edu/RePEc/bocode/p
-----------------------------------------------------------------------------------------

TITLE
'PUNAF': module to compute population attributable fractions for cohort studies

DESCRIPTION/AUTHOR(S)

       punaf calculates confidence intervals for population
      attributable     fractions, and also for scenario means and
      their ratio, known as      the population unattributable
      fraction.  punaf can be used after   an estimation command
      whose predicted values are interpreted as  conditional
      arithmetic means, such as logit, logistic, poisson,    or glm.
      It estimates the logs of two scenario means, the baseline
      scenario ("Scenario 0") and a fantasy scenario      ("Scenario
      1"), in which one or more exposure variables are assumed to
      be set to particular values (typically zero), and any      other
      predictor variables in the model are assumed to remain the
      same.  It also estimates the log of the ratio of the Scenario 1
         mean to the Scenario 0 mean.  This ratio is known as the
      population unattributable fraction, and is subtracted from 1 to
         derive the population attributable fraction, defined as the
        proportion of the mean of the outcome variable attributable to
          living in Scenario 0 instead of Scenario 1.

      KW: confidence intervals
      KW: population attributable fractions

      Requires: Stata version 12

      Distribution-Date: 20120618

Author: Roger Newson, National Heart and Lung Institute at Imperial College London
      Support: email r.newson@imperial.ac.uk


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

-----------------------------------------------------------------------------------------
package regpar from http://www.imperial.ac.uk/nhli/r.newson/stata12
-----------------------------------------------------------------------------------------

TITLE
      regpar: Population attributable risks from binary regression models

DESCRIPTION/AUTHOR(S)
      regpar calculates confidence intervals for population attributable
      risks, and also for scenario proportions.  regpar can be used after
      an estimation command whose predicted values are interpreted as
      conditional proportions, such as logit, logistic, probit, or glm.
      It estimates two scenario proportions, a baseline scenario
      ("Scenario 0") and a fantasy scenario ("Scenario 1"), in which one
      or more exposure variables are assumed to be set to particular
      values (typically zero), and any other predictor variables in the
      model are assumed to remain the same.  It also estimates the
      difference between the Scenario 0 proportion and the Scenario 1
      proportion.  This difference is known as the population
      attributable risk (PAR), and represents the amount of risk
      attributable to living in Scenario 0 instead of Scenario 1.

      Author: Roger Newson
      Distribution-Date: 03june2012
      Stata-Version: 12

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

-----------------------------------------------------------------------------------------
package margprev from http://www.imperial.ac.uk/nhli/r.newson/stata12
-----------------------------------------------------------------------------------------

TITLE
      margprev: Marginal prevalences from binary regression models

DESCRIPTION/AUTHOR(S)
      margprev calculates confidence intervals for marginal
      prevalences, also known as scenario proportions.  margprev can be
      used after an estimation command whose predicted values are
      interpreted as conditional proportions, such as logit, logistic,
      probit, or glm.  It estimates a marginal prevalence for a
      scenario ("Scenario 1"), in which one or more predictor variables
      may be assumed to be set to particular values, and any other
      predictor variables in the model are assumed to remain the same.

      Author: Roger Newson
      Distribution-Date: 03june2012
      Stata-Version: 12

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

-----------------------------------------------------------------------------------------
package marglmean from http://www.imperial.ac.uk/nhli/r.newson/stata12
-----------------------------------------------------------------------------------------

TITLE
      marglmean: Marginal log means from regression models

DESCRIPTION/AUTHOR(S)
      marglmean calculates symmetric confidence intervals for log
      marginal means (also known as log scenario means), and
      asymmetric confidence intervals for the marginal means
      themselves.  marglmean can be used after an estimation
      command whose predicted values are interpreted as positive
      conditional arithmetic means of non-negative-valued outcome
      variables, such as logit, logistic, probit, poisson, or glm
      with most non-Normal distributional families.  It can
      estimate a marginal mean for a scenario ("Scenario 1"), in
      which one or more exposure variables may be assumed to be
      set to particular values, and any other predictor variables
      in the model are assumed to remain the same.

      Author: Roger Newson
      Distribution-Date: 03june2012
      Stata-Version: 12

INSTALLATION FILES                                  (click here to install)
      marglmean.ado
      marglmean_p.ado
      marglmean.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–2014 StataCorp LP   |   Terms of use   |   Privacy   |   Contact us   |   Site index