Announcement

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

  • Direct standardization: Conf. Interval of Stratum

    Hello dear all,

    I have a question.
    Age_category is three, so Stratum was separated to three.
    However, seems like the Conf. Interval was applied by whole age_category.
    Is there any way to check the individual Conf. Interval by each Stratum?

    use http://www.stata-press.com/data/r14/1962, clear
    save "C:\Stata14\working\1962.dta" // my working folder "C:\Stata14\working"
    use http://www.stata-press.com/data/r13/mortality, clear
    dstdize deaths pop age_cat, by(nation) using(1962)
    Click image for larger version

Name:	dstdize.png
Views:	1
Size:	36.6 KB
ID:	1367172

    Last edited by Jeong-Kweon Park; 08 Dec 2016, 20:59.

  • Jeong-Kweon Park
    replied
    Thank you so much Clyde.

    Leave a comment:


  • Clyde Schechter
    replied
    The rates in each stratum are just crude rates, so there is nothing special about computing confidence intervals for them. The -ci proportion- command will do that for you. Something like this:

    Code:
    levelsof nation, local(nations)
    levelsof age_cat, local(age_cats)
    
    foreach n of local nations {
        display `"`n'"'
        foreach a of local age_cats {
            display `"`:label (age_cats) `a''"'
            ci proportion pop deaths if nation == `"`n'"' & age_cat == `a'
       }
    }
    Notes: 1. not tested, beware of typos. 2. Assumes nation is a string variable and age_cat is a numeric variable with a value label attached. Modify accordingly if these do not hold.




    Leave a comment:

Working...
X