Bookmark and Share

Notice: On April 23, 2014, Statalist moved from an email list to a forum, based at statalist.org.


[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: st: proportion confidence intervals <0 and >1 in MI SVY


From   Steve Samuels <[email protected]>
To   [email protected]
Subject   Re: st: proportion confidence intervals <0 and >1 in MI SVY
Date   Tue, 11 May 2010 11:39:02 -0400

Here's the corrected version. I also added the display of all the
proportions from -svy: prop-.   Sorry for the error.

Steve

************CODE BEGINS***********
capture program drop _all
program backlogit
nlcom log($parm/(1-$parm))
scalar lparm = el(r(b),1,1)
scalar se  =  sqrt(el(r(V),1,1))
scalar bound = invttail(e(df_r),.025)*se
scalar ll = exp(lparm -bound)
scalar ul = exp(lparm +bound)
scalar ll = ll/(1+ll)
scalar ul = ul/(1+ul)
di %9.4f $parm   %9.4f ll  %9.4f ul
end

sysuse auto,clear
svyset _n
svy: prop rep78
levelsof rep78, local(levels)
foreach x of local  levels{
global parm _b[`x']
backlogit
}
********CODE ENDS*********************


On Tue, May 11, 2010 at 11:18 AM, Steve Samuels <[email protected]> wrote:
> There's an error someplace in this program, so please disregard for
> the time being.
>
> Steve
>
>> On Tue, May 11, 2010 at 8:44 AM, Paul Shattuck <[email protected]> wrote:
>>> Hi,
>>>
>>> I am analyzing imputed survey data using the MI SVY estimation commands. I am estimating proportions and requesting confidence intervals (syntax below). However, many of the confidence intervals are falling outside of 0,1 bounds. The tab confidence intervals available in plain SVY (without MI) are generated using a logistic transform that prevents this problem. However, the tab procedure is not available in MI estimation.
>>>
>>> Can anyone suggest a work-around that will let me obtain proportion confidence intervals in MI SVY estimation that remain within the 0,1 bounds?
>>>
>>> mi estimate: svy, subpop(if var1==1): proportion var2
>>>
>>> Thank you,
>>>
>>> Paul
>>>
>>>
>>>
>>>
>>>
>>> *
>>> *   For searches and help try:
>>> *   http://www.stata.com/help.cgi?search
>>> *   http://www.stata.com/support/statalist/faq
>>> *   http://www.ats.ucla.edu/stat/stata/
>>>
>>
>>
>>
>> --
>> Steven Samuels
>> [email protected]
>> 18 Cantine's Island
>> Saugerties NY 12477
>> USA
>> Voice: 845-246-0774
>> Fax:    206-202-4783
>>
>
>
>
> --
> Steven Samuels
> [email protected]
> 18 Cantine's Island
> Saugerties NY 12477
> USA
> Voice: 845-246-0774
> Fax:    206-202-4783
>



-- 
Steven Samuels
[email protected]
18 Cantine's Island
Saugerties NY 12477
USA
Voice: 845-246-0774
Fax:    206-202-4783

*
*   For searches and help try:
*   http://www.stata.com/help.cgi?search
*   http://www.stata.com/support/statalist/faq
*   http://www.ats.ucla.edu/stat/stata/


© Copyright 1996–2018 StataCorp LLC   |   Terms of use   |   Privacy   |   Contact us   |   Site index