Announcement

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

  • svy:logistic Goodness of Fit Tests (subpopulation)

    Hello all!

    I've come across several threads discussing goodness of fit tests (specifically estat gof and svylogitgof) to use with the svy:logistic procedure.

    However, when I run my svy:logistic command with a subpop identified, the estat gof will not run and the svylogitgof uses all observations (not just the subpopulation).

    I've seen suggestions to use an -if statement in the svy:logistic command to identify the sub-population (and subsequently the estat gof) but that doesn't seem possible with the data I'm using (NHIS) as it only produces OR without the standard errors or confidence intervals. I've seen instructions from the CDC specifically recommending the subpop command instead of subsetting the data.

    What is the best way get a goodness-of-fit statistic within the svy:logistic command while specifying a sub-population (subpop)?

  • #2

    I don't think this behavior is much of a loss, because the chi square test of fit in svylogitgof and estat gof has low power against most of the kinds of problems that you will encounter in practice. As a general test of fit after svy, subpop(): logistic, I suggest linktest. You can do more focused tests of fit against augmented models: add non-linear terms for continuous variables, such as quadratic or fractional polynomials; add interactions and test that the additional terms are zero.

    With the apperance of estat gof, there is no longer a good reason to use svylogitgof. (see, e.g. http://www.statalist.org/forums/foru...ng-svylogitgof). The theory for survey estimation with subpopulations has to do with estimating correct variances (squared standard errors) and covariances for estimated parameters (in Stata terms, the contents of the returned matrix e(V). I speculate that estat gof is not allowed after subpop() because its formulas are not functions of e(V).
    Last edited by Steve Samuels; 06 Mar 2015, 17:22.
    Steve Samuels
    Statistical Consulting
    [email protected]

    Stata 14.2

    Comment


    • #3
      Hola, como puedo usar stat gof si necesito mantener subpop para conservar la estimacion correcta de varianzas y covarianzas? Hay alguna otra forma de estimar bondad de ajuste del modelo en estos casos que no sea svylogitgof?


      Mi modelo:

      svy, subpop(if NEDU1!=. & hostilidad!=.): logit s_b_mb i.confi sexo1 Edad i.NEDU no_hostil i.confi#i.NEDU, or
      Survey: Logistic regression

      Number of strata = 30 Number of obs = 6,233
      Number of PSUs = 1,077 Population size = 14,518,969
      Subpop. no. obs = 6,076
      Subpop. size = 14,276,008
      Design df = 1,047
      F( 11, 1037) = 22.15
      Prob > F = 0.0000


      El error:

      estat gof
      estat gof is not allowed after subpopulation estimations
      r(198);

      Stata 14.

      Saudos,

      Comment

      Working...
      X