Notice: On April 23, 2014, Statalist moved from an email list to a forum, based at statalist.org.
From | Roger Newson <r.newson@imperial.ac.uk> |
To | statalist@hsphsun2.harvard.edu |
Subject | Re: st: punaf error, even with version control |
Date | Mon, 03 Oct 2011 17:14:51 +0100 |
net from "http://www.imperial.ac.uk/nhli/r.newson/stata12/"; and selecting and installing -punaf-.The -punaf- package is not yet available on SSC, as Kit Baum has been absent from Boston recently. The new -punaf- is therefore currently part of my backlog of updates to be sent to Kit in due course.
I hope this helps. Thanks again to Andrew for alerting me about this problem. Let me know if there are any queries.
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://www.imperial.ac.uk/nhli/r.newson/stata12 ---------------------------------------------------------------------------- TITLE punaf: 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. Author: Roger Newson Distribution-Date: 03october2011 Stata-Version: 12 INSTALLATION FILES (click here to install) punaf.ado punaf_p.ado punaf.sthlp ---------------------------------------------------------------------------- (click here to return to the previous screen) On 03/10/2011 15:49, Roger Newson wrote:
I have had a look at the inside of -punaf-, and have traced the problem. There seems to have been a change in -margins- parameter names during the update from Stata 11 to Stata 12. Under Stata 11, if you typed use http://www.stata-press.com/data/r11/lbw.dta, clear describe logit low i.race i.smoke, or robust margins, at((asobserved) _all) at(smoke==0) post ereturn list matr list e(b) then you would find that the -margins- parameter names (belonging to scenario means) were -_cons- and -2.at-. Under Stata Version 12, the parameter names are -1.at- and -2.at-. It was this change that has broken -punaf-, which assumes the old parameter names. I will attempt to fix this feature by updating -punaf- to Stata Version 12. In the meantime, many thanks to Andrew again for alerting me to this 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: 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. On 03/10/2011 13:07, graupel75@gmail.com wrote:Hello everyone, I am trying to use _punaf_ in Stata 12; it worked fine in v11, but even the examples fail in v12, giving [_cons] not found I have tried version control without success- I suspect the logit estimates are simply un-findable by _punaf_ ? Any ideas would be greatly appreciated. cheers- Andrew * * 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/* * 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/
* * 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/