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" <>
To   "''" <>
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,

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: []
Sent: Wednesday, September 01, 2004 5:35 PM
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:

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