Announcement

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

  • svylogitgof command showing r(198) Error.

    Hi! I am doing a multivariate logistic regression using Survey data in stata18. I have used the weighting as per the survey and i have been using svy: before my commands. After fitting my main model i then used svylogitgof which i have installed for goodness of fit test, but it is showing an error r198. below is the outcome of my stata 18 outcome.



    . svyset [pw=intwt0], jkrweight(intwt001-intwt141, multiplier(1)) vce(jackknife)dof(25)

    Sampling weights: intwt0
    VCE: jackknife
    MSE: off
    Jackknife weights: intwt001 .. intwt141
    Design df: 25
    Single unit: missing
    Strata 1: <one>
    Sampling unit 1: <observations>
    FPC 1: <zero>

    . xi: svy: logistic medicalcircumcision i.males_age i.wealthindex i.hivstatus i.evertestedhiv i.Regio
    > n
    i.males_age _Imales_age_1-9 (naturally coded; _Imales_age_1 omitted)
    i.wealthindex _Iwealthind_1-5 (naturally coded; _Iwealthind_1 omitted)
    i.hivstatus _Ihivstatus_0-2 (naturally coded; _Ihivstatus_0 omitted)
    i.evertestedhiv _Ieverteste_0-1 (naturally coded; _Ieverteste_0 omitted)
    i.Region _IRegion_1-4 (naturally coded; _IRegion_1 omitted)
    (running logistic on estimation sample)

    Jackknife replications (141): .........10.........20.........30.........40...... ...50.........60.....
    > ....70.........80.........90.........100.........1 10.........120.........130.........140. done

    Survey: Logistic regression

    Number of strata = 1 Number of obs = 4,460
    Population size = 298,166.63
    Replications = 141
    Design df = 25
    F(18, 8) = 6.80
    Prob > F = 0.0047

    -------------------------------------------------------------------------------------
    | Jackknife
    medicalcircumcision | Odds ratio std. err. t P>|t| [95% conf. interval]
    --------------------+----------------------------------------------------------------
    _Imales_age_2 | .5392798 .0570262 -5.84 0.000 .4337415 .6704979
    _Imales_age_3 | .4172206 .0553734 -6.59 0.000 .3174352 .5483734
    _Imales_age_4 | .3751198 .0550486 -6.68 0.000 .2772749 .5074922
    _Imales_age_5 | .4593065 .0677852 -5.27 0.000 .3389212 .6224529
    _Imales_age_6 | .3305909 .058585 -6.25 0.000 .2295005 .4762097
    _Imales_age_7 | .2424751 .0569683 -6.03 0.000 .1494589 .3933804
    _Imales_age_8 | .2505148 .0610396 -5.68 0.000 .1516685 .4137817
    _Imales_age_9 | .1784419 .0280643 -10.96 0.000 .1290696 .2467005
    _Iwealthind_2 | 1.005121 .124558 0.04 0.967 .7787094 1.297362
    _Iwealthind_3 | 1.008603 .116643 0.07 0.942 .7948389 1.279856
    _Iwealthind_4 | 1.20144 .1421264 1.55 0.133 .9416558 1.532894
    _Iwealthind_5 | 1.663429 .2167442 3.91 0.001 1.271915 2.175456
    _Ihivstatus_1 | .5163145 .0615363 -5.55 0.000 .4039345 .6599602
    _Ihivstatus_2 | 1.024993 .1377831 0.18 0.856 .7771174 1.351934
    _Ieverteste_1 | 5.013099 .6252474 12.93 0.000 3.877471 6.481329
    _IRegion_2 | .9098206 .1090208 -0.79 0.438 .7108488 1.164486
    _IRegion_3 | .717331 .1125807 -2.12 0.044 .5192085 .9910542
    _IRegion_4 | .8954747 .1039154 -0.95 0.351 .7051106 1.137233
    _cons | .2204909 .036229 -9.20 0.000 .1571896 .3092842
    -------------------------------------------------------------------------------------
    Note: _cons estimates baseline odds.

    . svylogitgof
    option over() not allowed
    r(198);

    end of do-file

    r(198);
    Last edited by Sandile Mndzebele; 27 Oct 2023, 01:20.
Working...
X