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.

# RE: st: calculating PAR when there are >2 categories within a variable

 From "Benjamin, Laura" To "'statalist@hsphsun2.harvard.edu'" Subject RE: st: calculating PAR when there are >2 categories within a variable Date Mon, 8 Apr 2013 21:04:51 +0000

```Dear Roger,

Thank you for this quick response.

I want to imagine 3 different fantasy scenarios, where subjects with factor level 2, 3 or 4 are reassigned to factor level 1? Can that work with -punaf-STATA 11?

Thanks,

Laura

-----Original Message-----
From: owner-statalist@hsphsun2.harvard.edu [mailto:owner-statalist@hsphsun2.harvard.edu] On Behalf Of Roger B. Newson
Sent: Monday, April 08, 2013 9:42 PM
To: statalist@hsphsun2.harvard.edu
Subject: Re: st: calculating PAR when there are >2 categories within a variable

You really have to specify what we mean by "the PAR for each of the categories". This is because we have to specify 2 scenarios if we use -punaf-. And, in Stata Version 11, one of these 2 scenarios must be the real world, and the other should be a fantasy scenario. (In Stata Version 12, -punaf- can compare 2 fantasy scenarios, specified by the
-atspec()- and -atzero()- options.)

So, you really have to specify your fantasy scenarios, which you want to compare with the real world. Do you want to imagine 4 different fantasy scenarios, in which everybody has factor level 1, 2, 3 and 4, respectively, and compare these scenarios with the real world? Or do you want to imagine 3 different fantasy scenarios, where subjects with factor level 2, 3 or 4 (respectively) are reassigned to factor level 1?
Or something completely different?

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:

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

On 08/04/2013 21:29, Benjamin, Laura wrote:
> Hi there,
>
> I am working with STATA 11 and calculating the population attributable risk (PAR) for several risk factors of stroke; this is based on a case-control design. I have been using the punaf function for this.
>
> I am uncertain about how to determine the PAR when there are >2 categories within a variable.
>
> For example, the variable "woodexp" has four categories (one of these being the reference). Is it possible to calculate the PAR for each of the categories? I would appreciate any advice on this.
>
>
>
> Many thanks,
>
> Laura
>
>
>
>
>
> *
> *   For searches and help try:
> *   http://www.stata.com/help.cgi?search
> *   http://www.stata.com/support/faqs/resources/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/faqs/resources/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/faqs/resources/statalist-faq/
*   http://www.ats.ucla.edu/stat/stata/
```