Announcement

Collapse
No announcement yet.
X
  • Filter
  • Time
  • Show
Clear All
new posts

  • test

    I am using Stata 13.1 with Windows 7. Using US National Health and Nutrition Examination Survey data for the 7 cycles from 1999 through 2012, I want to estimate attributable fractions (AFs) over time for hospital discharges by income level. I use svy: nbreg to deal with the high number of zeroes for discharges. When the following code is used to get AFs for each cycle with one command

    foreach cycle in 1 2 3 4 5 6 7 {
    punaf, at(inc=1) subpop(if cycle==`cycle' ) eform
    }


    the results for each cycle differ (eg, 0.3463617 vs 0.369845) compared to the results obtained for each cycle individually using the subpop command within the nbreg command.

    There are two questions, why do the results differ? and which is correct?

    Thank you for your insights.
Working...
X