Thanks as always to Kit Baum, a new version of the punafcc package is now available for download from SSC. In Stata, use the ssc command to do this, or adoupdate if you already have an old version of punafcc.

The punafcc package is described as below on my website. The new version adds the ability to calculate the correct population unattributable and attributable fractions for survival data after fitting a competing risks regression using stccreg, as well as after fitting a Cox regression using stcox. I would like to thank Maryam Darvishian of the University of British Columbia in Canada for suggesting this improvement. I would also like to thank Isabel Canette of StataCorp for passing the news to the developers when I reported a bug in margins that I discovered while developing this new version (reported to Stata TechSupport on 09 Decenber 2016), and the StataCorp developers for fixing this bug in the update of Stata Version 14.2 dated 19 December 2016.

Best wishes

Roger

-----------------------------------------------------------------------------------------

package punafcc from http://www.imperial.ac.uk/nhli/r.newson/stata14

-----------------------------------------------------------------------------------------

TITLE

punafcc: Population attributable fractions for case-control and survival studies

DESCRIPTION/AUTHOR(S)

punafcc calculates confidence intervals for population attributable

and unattributable fractions in case-control or survival studies.

punafcc can be used after an estimation command whose parameters are

interpreted as log rate ratios, such as logit or logistic for

case-control data, or stcox for survival data. It estimates the log

of the mean rate ratio, in cases or deaths, between 2 scenarios, 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. This ratio

is known as the population unattributable fraction (PUF), and is

subtracted from 1 to derive the population attributable fraction

(PAF), defined as the proportion of the cases or deaths attributable

to living in Scenario 0 instead of Scenario 1.

Author: Roger Newson

Distribution-Date: 11january2017

Stata-Version: 14

INSTALLATION FILES (click here to install)

punafcc.ado

punafcc_p.ado

punafcc.sthlp

-----------------------------------------------------------------------------------------

(click here to return to the previous screen)

The punafcc package is described as below on my website. The new version adds the ability to calculate the correct population unattributable and attributable fractions for survival data after fitting a competing risks regression using stccreg, as well as after fitting a Cox regression using stcox. I would like to thank Maryam Darvishian of the University of British Columbia in Canada for suggesting this improvement. I would also like to thank Isabel Canette of StataCorp for passing the news to the developers when I reported a bug in margins that I discovered while developing this new version (reported to Stata TechSupport on 09 Decenber 2016), and the StataCorp developers for fixing this bug in the update of Stata Version 14.2 dated 19 December 2016.

Best wishes

Roger

-----------------------------------------------------------------------------------------

package punafcc from http://www.imperial.ac.uk/nhli/r.newson/stata14

-----------------------------------------------------------------------------------------

TITLE

punafcc: Population attributable fractions for case-control and survival studies

DESCRIPTION/AUTHOR(S)

punafcc calculates confidence intervals for population attributable

and unattributable fractions in case-control or survival studies.

punafcc can be used after an estimation command whose parameters are

interpreted as log rate ratios, such as logit or logistic for

case-control data, or stcox for survival data. It estimates the log

of the mean rate ratio, in cases or deaths, between 2 scenarios, 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. This ratio

is known as the population unattributable fraction (PUF), and is

subtracted from 1 to derive the population attributable fraction

(PAF), defined as the proportion of the cases or deaths attributable

to living in Scenario 0 instead of Scenario 1.

Author: Roger Newson

Distribution-Date: 11january2017

Stata-Version: 14

INSTALLATION FILES (click here to install)

punafcc.ado

punafcc_p.ado

punafcc.sthlp

-----------------------------------------------------------------------------------------

(click here to return to the previous screen)

## Comment