Stata The Stata listserver
[Date Prev][Date Next][Thread Prev][Thread Next][Date index][Thread index]

RE: st: calculrating confidence Intervals in svyprop statements


From   "Nichols, Austin" <[email protected]>
To   "'[email protected]'" <[email protected]>
Subject   RE: st: calculrating confidence Intervals in svyprop statements
Date   Wed, 1 Sep 2004 18:16:31 -0400

Note that you report nine categories, and I don't think your CIs will be
plausible, given the number of obs and apparent weighting and survey design.
Plus your categories are suspect, since if they were 0/2 you would have 27
categories instead of nine. But mine is not to reason why. Using code from
[email protected],

di "cat1Rr  cat2Rr  cat3Rr     (Lower Bound, Upper Bound)"
forvalues i=0/2 {
 forvalues j=0/2 {
  forvalues k=0/2 { 
    qui gen i`i'j`j'k`k'=(cat1Rr==`i' & cat2Rr==`j' & cat3Rr==`k') 
    qui su i`i'j`j'k`k'
    if r(max)>0 & r(N)>0 {
        qui svylogit i`i'j`j'k`k'
        scalar lcb = invlogit(_b[_cons]-invttail(e(df_r),.025)*_se[_cons])
        scalar ucb = invlogit(_b[_cons]+invttail(e(df_r),.025)*_se[_cons])
        di "   `i'       `j'       `k'       ( " scalar(lcb) " , "
scalar(ucb) " )"
    }
  }
 }
}

gives CIs that are constructed independently and cannot be used to
eyeball-test joint hypotheses about proportions. Caveat emptor.

-----Original Message-----
From: [email protected] [mailto:[email protected]]
Sent: Wednesday, September 01, 2004 5:35 PM
To: [email protected]
Subject: Re: st: calculrating confidence Intervals in svyprop statements

Despite of some valuable comments of you, I couldn't solve the problem. At
the last reply, Jeff explained about how to get CI with "SVYMEAN"
statements. I need to calculate CIs with "SVYPROP" statements, however.
Below is the table explaining how I calculate 8 Est. Prop. 

*
*   For searches and help try:
*   http://www.stata.com/support/faqs/res/findit.html
*   http://www.stata.com/support/statalist/faq
*   http://www.ats.ucla.edu/stat/stata/



© Copyright 1996–2024 StataCorp LLC   |   Terms of use   |   Privacy   |   Contact us   |   What's new   |   Site index