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

Re: st: nested models in svylogit


From   Stas Kolenikov <[email protected]>
To   [email protected]
Subject   Re: st: nested models in svylogit
Date   Wed, 22 Sep 2004 08:52:39 -0400

This sounds like a testing problem rather than goodness of fit. If the
models are indeed nested, so that you can obtain one from another by
setting some coefficients to zero, it suffices to run a regular Wald
test. Stata's -test- fully supports -svy- estimators.

. use http://www.stata-press.com/data/r8/nhanes2.dta

. svylogit diab female black orace bp* age

Survey logistic regression

pweight:  finalwgt                                Number of obs    =     10349
Strata:   strata                                  Number of strata =        31
PSU:      psu                                     Number of PSUs   =        62
                                                  Population size  = 1.171e+08
                                                  F(   6,     26)  =     68.11
                                                  Prob > F         =    0.0000

------------------------------------------------------------------------------
    diabetes |      Coef.   Std. Err.      t    P>|t|     [95% Conf. Interval]
-------------+----------------------------------------------------------------
      female |    .263473     .12527     2.10   0.044     .0079832    .5189629
       black |   .7438167   .1272994     5.84   0.000     .4841878    1.003446
       orace |   -.362573   .3068411    -1.18   0.246    -.9883795    .2632336
    bpsystol |   .0156206   .0036365     4.30   0.000     .0082039    .0230372
     bpdiast |  -.0056351   .0071073    -0.79   0.434    -.0201304    .0088603
         age |   .0478235   .0047736    10.02   0.000     .0380877    .0575592
       _cons |  -7.523119   .3970763   -18.95   0.000    -8.332961   -6.713277
------------------------------------------------------------------------------

. test black orace

Adjusted Wald test

 ( 1)  black = 0
 ( 2)  orace = 0

       F(  2,    30) =   21.66
            Prob > F =    0.0000

This is a test for simplification of the model towards

svylogit diab female bp* age

The data is -svyset- already.

Take care,
Stas

On Wed, 22 Sep 2004 10:48:00 +0100, Emma Slaymaker
<[email protected]> wrote:
> Hi,
> 
> I'm always encountering this problem of how to contrast the goodness of
> fit of different -svylogit- models.  Despite that I'd still say I'm a
> novice and I've found this book very helpful-
> 
> Korn, E and Graubard, B (1999) Analysis of Health Surveys John Wiley
> and Sons, Inc., New York
> 
> They list a few ways to assess the goodness of fit for an -svylogit-
> model and I've used one of these in Stata (comparing, within deciles of
> risk, the means of the observed and predicted scores using an adjusted
> Wald test). It only involved a few predict commands after each model and
> they give you step by step instructions.  I don't think I could do
> justice to the theory behind it, and there may be a few caveats,  which
> is why I'm suggesting looking at the book.
> 
> The method I used gives information about the goodness of fit of each
> model and you have to make your own decision about which is the better
> fit (so it isn't equivalent to using -lrtest- after -logit-).
> 
> If there is a better way to do this I would also like to know about
> it.
> 
> Cheers,
> Emma
> 
> >>> [email protected] 22/09/04 06:37:50 >>>
> 
> 
> I am analyzing survey data using svylogit.
> 
> I would like to contrast two models (one nested within the other) in
> order
> to decide if Model B (the more complex model) provides a significantly
> 
> better fit to the data than Model A.
> 
> How does one contrast nested logistic models estimated with the
> svylogit
> command?
> 
> *
> *   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/
> 



-- 
Stas Kolenikov
http://stas.kolenikov.name
*
*   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