Announcement

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

  • Bivariate and multivariate logistic regression

    Hi,

    I'm trying to run Bivariate and multivariate logistic regression between ACG and patient demographic variables, however, the command (logistic or logit) take too long to run with one of the variables only and with no results, it just keeps running. I don't understand why?




    I would highly appreciate if someone could let me know how to solve this issue.


    Thank you


    __________________________________________________ ______________________

    here are the details of the variables and the results I'm getting:



    The dependent variable:

    ACG | Freq. Percent Cum.
    ------------+-----------------------------------
    0 | 7,227,513 97.55 97.55
    1 | 181,684 2.45 100.00
    ------------+-----------------------------------
    Total | 7,409,197 100.00


    __________________________________________________ __________________________________________________ __

    //results of the bivariate logistic regression between ACG and the independent variables except (RACE)


    . logistic ACG i.AGE_Cat

    Logistic regression Number of obs = 7,409,197
    LR chi2(5) = 14754.82
    Prob > chi2 = 0.0000
    Log likelihood = -845782.72 Pseudo R2 = 0.0086

    ------------------------------------------------------------------------------
    ACG | Odds Ratio Std. Err. z P>|z| [95% Conf. Interval]
    -------------+----------------------------------------------------------------
    AGE_Cat |
    1 | 1.226411 .0376775 6.64 0.000 1.154744 1.302526
    2 | 1.615408 .0456499 16.97 0.000 1.528368 1.707404
    3 | 2.375448 .0664398 30.93 0.000 2.248733 2.509303
    4 | 3.175571 .0882484 41.58 0.000 3.007234 3.353332
    5 | 2.9258 .0817107 38.44 0.000 2.769955 3.090415
    |
    _cons | .0101912 .0002803 -166.72 0.000 .0096563 .0107557
    ------------------------------------------------------------------------------
    Note: _cons estimates baseline odds.


    . logistic ACG i.FEMALE

    Logistic regression Number of obs = 7,408,530
    LR chi2(1) = 341.02
    Prob > chi2 = 0.0000
    Log likelihood = -852939.91 Pseudo R2 = 0.0002

    ------------------------------------------------------------------------------
    ACG | Odds Ratio Std. Err. z P>|z| [95% Conf. Interval]
    -------------+----------------------------------------------------------------
    1.FEMALE | 1.091702 .0051873 18.46 0.000 1.081582 1.101917
    _cons | .0240649 .0000815 -1100.41 0.000 .0239057 .0242252
    ------------------------------------------------------------------------------
    Note: _cons estimates baseline odds.


    . logistic ACG i.Liver

    Logistic regression Number of obs = 7,409,197
    LR chi2(1) = 3.00
    Prob > chi2 = 0.0833
    Log likelihood = -853158.63 Pseudo R2 = 0.0000

    ------------------------------------------------------------------------------
    ACG | Odds Ratio Std. Err. z P>|z| [95% Conf. Interval]
    -------------+----------------------------------------------------------------
    1.Liver | 1.019825 .0115275 1.74 0.082 .9974797 1.04267
    _cons | .0251152 .0000611 -1514.69 0.000 .0249957 .0252352
    ------------------------------------------------------------------------------
    Note: _cons estimates baseline odds.



    . logistic ACG i.ynch13

    Logistic regression Number of obs = 7,409,197
    LR chi2(1) = 4765.69
    Prob > chi2 = 0.0000
    Log likelihood = -850777.29 Pseudo R2 = 0.0028

    ------------------------------------------------------------------------------
    ACG | Odds Ratio Std. Err. z P>|z| [95% Conf. Interval]
    -------------+----------------------------------------------------------------
    ynch13 |
    Present | 1.441901 .0074603 70.73 0.000 1.427353 1.456597
    _cons | .0227928 .0000648 -1329.20 0.000 .0226661 .0229202
    ------------------------------------------------------------------------------



    . logistic ACG i.CCI_CAT

    Logistic regression Number of obs = 7,409,197
    LR chi2(4) = 1185.69
    Prob > chi2 = 0.0000
    Log likelihood = -852567.29 Pseudo R2 = 0.0007

    ------------------------------------------------------------------------------
    ACG | Odds Ratio Std. Err. z P>|z| [95% Conf. Interval]
    -------------+----------------------------------------------------------------
    CCI_CAT |
    1 | .9147093 .008063 -10.11 0.000 .8990419 .9306498
    2 | 1.007855 .0087731 0.90 0.369 .9908059 1.025198
    3 | 1.075844 .0096988 8.11 0.000 1.057002 1.095022
    4 | 1.144811 .0092928 16.66 0.000 1.126741 1.16317
    |
    _cons | .0242295 .0001681 -536.28 0.000 .0239023 .0245611
    ------------------------------------------------------------------------------
    Note: _cons estimates baseline odds.


    __________________________________________________ _______________________________________

    . tab ACG RACE

    | Race (uniform)
    ACG | 1 2 3 4 5 6 | Total
    -----------+------------------------------------------------------------------+----------
    0 | 5,179,054 714,413 399,100 120,552 31,131 157,110 | 6,601,360
    1 | 138,024 15,190 9,958 2,776 616 3,141 | 169,705
    -----------+------------------------------------------------------------------+----------
    Total | 5,317,078 729,603 409,058 123,328 31,747 160,251 | 6,771,065





    . tab RACE

    Race |
    (uniform) | Freq. Percent Cum.
    ------------+-----------------------------------
    1 | 5,317,078 78.53 78.53
    2 | 729,603 10.78 89.30
    3 | 409,058 6.04 95.34
    4 | 123,328 1.82 97.16
    5 | 31,747 0.47 97.63
    6 | 160,251 2.37 100.00
    ------------+-----------------------------------
    Total | 6,771,065 100.00



    __________________________________________________ __________________________________________________ __________________________________________________
    //results of the logistic regression between ACG and RACE (Bothe logistic and the logit functions did't work properly. They took forever to run.)


    . logistic ACG i.RACE, or
    --Break--
    r(1);


    . logit ACG i.RACE, or

    Iteration 0: log likelihood = -793152.7
    Iteration 1: log likelihood = -792634
    Iteration 2: log likelihood = -792631.82
    Iteration 3: log likelihood = -792631.82 (backed up)
    Iteration 4: log likelihood = -792631.82 (backed up)
    Iteration 5: log likelihood = -792631.82 (backed up)
    Iteration 6: log likelihood = -792631.82 (backed up)
    Iteration 7: log likelihood = -792631.82 (backed up)
    Iteration 8: log likelihood = -792631.82 (backed up)
    Iteration 9: log likelihood = -792631.82 (backed up)
    Iteration 10: log likelihood = -792631.82 (backed up)
    Iteration 11: log likelihood = -792631.82 (backed up)
    Iteration 12: log likelihood = -792631.82 (backed up)
    Iteration 13: log likelihood = -792631.82 (backed up)
    Iteration 14: log likelihood = -792631.82 (backed up)
    Iteration 15: log likelihood = -792631.82 (backed up)
    Iteration 16: log likelihood = -792631.82 (backed up)
    Iteration 17: log likelihood = -792631.82 (backed up)
    Iteration 18: log likelihood = -792631.82 (backed up)
    Iteration 19: log likelihood = -792631.82 (backed up)
    Iteration 20: log likelihood = -792631.82 (backed up)
    Iteration 21: log likelihood = -792631.82 (backed up)
    Iteration 22: log likelihood = -792631.82 (backed up)
    Iteration 23: log likelihood = -792631.82 (backed up)
    Iteration 24: log likelihood = -792631.82 (backed up)
    Iteration 25: log likelihood = -792631.82 (backed up)
    Iteration 26: log likelihood = -792631.82 (backed up)
    Iteration 27: log likelihood = -792631.82 (backed up)
    Iteration 28: log likelihood = -792631.82 (backed up)
    Iteration 29: log likelihood = -792631.82 (backed up)
    Iteration 30: log likelihood = -792631.82 (backed up)
    Iteration 31: log likelihood = -792631.82 (backed up)
    Iteration 32: log likelihood = -792631.82 (backed up)
    Iteration 33: log likelihood = -792631.82 (backed up)
    Iteration 34: log likelihood = -792631.82 (backed up)
    Iteration 35: log likelihood = -792631.82 (backed up)
    Iteration 36: log likelihood = -792631.82 (backed up)
    Iteration 37: log likelihood = -792631.82 (backed up)
    Iteration 38: log likelihood = -792631.82 (backed up)
    Iteration 39: log likelihood = -792631.82 (backed up)
    Iteration 40: log likelihood = -792631.82 (backed up)
    Iteration 41: log likelihood = -792631.82 (backed up)
    Iteration 42: log likelihood = -792631.82 (backed up)
    Iteration 43: log likelihood = -792631.82 (backed up)
    Iteration 44: log likelihood = -792631.82 (backed up)
    Iteration 45: log likelihood = -792631.82 (backed up)
    Iteration 46: log likelihood = -792631.82 (backed up)
    Iteration 47: log likelihood = -792631.82 (backed up)
    Iteration 48: log likelihood = -792631.82 (backed up)
    Iteration 49: log likelihood = -792631.82 (backed up)
    Iteration 50: log likelihood = -792631.82 (backed up)
    Iteration 51: log likelihood = -792631.82 (backed up)
    Iteration 52: log likelihood = -792631.82 (backed up)
    Iteration 53: log likelihood = -792631.82 (backed up)
    Iteration 54: log likelihood = -792631.82 (backed up)
    Iteration 55: log likelihood = -792631.82 (backed up)
    Iteration 56: log likelihood = -792631.82 (backed up)
    Iteration 57: log likelihood = -792631.82 (backed up)
    Iteration 58: log likelihood = -792631.82 (backed up)
    Iteration 59: log likelihood = -792631.82 (backed up)
    Iteration 60: log likelihood = -792631.82 (backed up)
    Iteration 61: log likelihood = -792631.82 (backed up)
    --Break--
    r(1);


  • #2
    If you only have one dependent variable, you model is the multiple logistic regression rather than multivariate logistic regressions.

    Comment


    • #3
      Please read the FAQ section, specially rule 12.2 and 12.3 on how to use code delimiters and use -dataex- to present Stata results and provide data examples (you are expected to read the whole). Your post is very difficult to read. On point, you have several categories in Race. Probably one or several of them falling into zero cells. What you see if you cross tabulate race with ACG ? Try cross tabulation first :
      Code:
       tab race ACG
      If all observations from any of the categories exclusively falling into one of ACG cell, try reducing the category number and rerun the model.
      Roman

      Comment


      • #4
        Welcome to Statalist.

        The output is very hard to read. See pt #12 of the FAQ to see how you can use code tags. If it was easier to read, I think someone could replicate the analysis using the ACG by race crosstab.

        Adding the difficult option sometimes works miracles.

        i suspect that the cell with only 616 cells may be causing you grief. You might try dropping or combining some race categories and see if it will run.
        -------------------------------------------
        Richard Williams, Notre Dame Dept of Sociology
        Stata Version: 17.0 MP (2 processor)

        EMAIL: [email protected]
        WWW: https://www3.nd.edu/~rwilliam

        Comment


        • #5
          Originally posted by Richard Williams View Post
          I think someone could replicate the analysis using the ACG by race crosstab
          Yeah.

          .ÿversionÿ15.1

          .ÿ
          .ÿclearÿ*

          .ÿ
          .ÿquietlyÿinputÿbyteÿACGÿlong(count1ÿcount2ÿcount3ÿcount4ÿcount5ÿcount6)

          .ÿ
          .ÿquietlyÿreshapeÿlongÿcount,ÿi(ACG)ÿj(race)

          .ÿ
          .ÿtabulateÿACGÿraceÿ[fweight=count]

          ÿÿÿÿÿÿÿÿÿÿÿ|ÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿrace
          ÿÿÿÿÿÿÿACGÿ|ÿÿÿÿÿÿÿÿÿ1ÿÿÿÿÿÿÿÿÿÿ2ÿÿÿÿÿÿÿÿÿÿ3ÿÿÿÿÿÿÿÿÿÿ4ÿÿÿÿÿÿÿÿÿÿ5ÿÿÿÿÿÿÿÿÿÿ6ÿ|ÿÿÿÿÿTotal
          -----------+------------------------------------------------------------------+----------
          ÿÿÿÿÿÿÿÿÿ0ÿ|ÿ5,179,054ÿÿÿÿ714,413ÿÿÿÿ399,100ÿÿÿÿ120,552ÿÿÿÿÿ31,131ÿÿÿÿ157,110ÿ|ÿ6,601,360ÿ
          ÿÿÿÿÿÿÿÿÿ1ÿ|ÿÿÿ138,024ÿÿÿÿÿ15,190ÿÿÿÿÿÿ9,958ÿÿÿÿÿÿ2,776ÿÿÿÿÿÿÿÿ616ÿÿÿÿÿÿ3,141ÿ|ÿÿÿ169,705ÿ
          -----------+------------------------------------------------------------------+----------
          ÿÿÿÿÿTotalÿ|ÿ5,317,078ÿÿÿÿ729,603ÿÿÿÿ409,058ÿÿÿÿ123,328ÿÿÿÿÿ31,747ÿÿÿÿ160,251ÿ|ÿ6,771,065ÿ


          .ÿ
          .ÿlogitÿACGÿi.raceÿ[fweight=count],ÿ//ÿnolog

          Iterationÿ0:ÿÿÿlogÿlikelihoodÿ=ÿÿ-793152.7ÿÿ
          Iterationÿ1:ÿÿÿlogÿlikelihoodÿ=ÿÿÿÿ-792634ÿÿ
          Iterationÿ2:ÿÿÿlogÿlikelihoodÿ=ÿ-792631.82ÿÿ
          Iterationÿ3:ÿÿÿlogÿlikelihoodÿ=ÿ-792631.82ÿÿ

          LogisticÿregressionÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿNumberÿofÿobsÿÿÿÿÿ=ÿÿ6,771,065
          ÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿLRÿchi2(5)ÿÿÿÿÿÿÿÿ=ÿÿÿÿ1041.75
          ÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿProbÿ>ÿchi2ÿÿÿÿÿÿÿ=ÿÿÿÿÿ0.0000
          Logÿlikelihoodÿ=ÿ-792631.82ÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿPseudoÿR2ÿÿÿÿÿÿÿÿÿ=ÿÿÿÿÿ0.0007

          ------------------------------------------------------------------------------
          ÿÿÿÿÿÿÿÿÿACGÿ|ÿÿÿÿÿÿCoef.ÿÿÿStd.ÿErr.ÿÿÿÿÿÿzÿÿÿÿP>|z|ÿÿÿÿÿ[95%ÿConf.ÿInterval]
          -------------+----------------------------------------------------------------
          ÿÿÿÿÿÿÿÿraceÿ|
          ÿÿÿÿÿÿÿÿÿÿ2ÿÿ|ÿÿ-.2258738ÿÿÿ.0086412ÿÿÿ-26.14ÿÿÿ0.000ÿÿÿÿ-.2428103ÿÿÿ-.2089373
          ÿÿÿÿÿÿÿÿÿÿ3ÿÿ|ÿÿ-.0658857ÿÿÿ.0105055ÿÿÿÿ-6.27ÿÿÿ0.000ÿÿÿÿ-.0864761ÿÿÿ-.0452952
          ÿÿÿÿÿÿÿÿÿÿ4ÿÿ|ÿÿÿÿ-.14612ÿÿÿ.0193898ÿÿÿÿ-7.54ÿÿÿ0.000ÿÿÿÿ-.1841233ÿÿÿ-.1081168
          ÿÿÿÿÿÿÿÿÿÿ5ÿÿ|ÿÿ-.2977623ÿÿÿ.0407791ÿÿÿÿ-7.30ÿÿÿ0.000ÿÿÿÿ-.3776879ÿÿÿ-.2178367
          ÿÿÿÿÿÿÿÿÿÿ6ÿÿ|ÿÿ-.2874549ÿÿÿ.0182256ÿÿÿ-15.77ÿÿÿ0.000ÿÿÿÿ-.3231764ÿÿÿ-.2517333
          ÿÿÿÿÿÿÿÿÿÿÿÿÿ|
          ÿÿÿÿÿÿÿ_consÿ|ÿÿÿ-3.62495ÿÿÿ.0027273ÿ-1329.13ÿÿÿ0.000ÿÿÿÿ-3.630296ÿÿÿ-3.619605
          ------------------------------------------------------------------------------

          .ÿ
          .ÿexit

          endÿofÿdo-file


          .

          Comment


          • #6
            Originally posted by Fatimah Sherbeny View Post
            //results of the logistic regression between ACG and RACE (Bothe logistic and the logit functions did't work properly. They took forever to run.)


            . logistic ACG i.RACE, or
            --Break--
            r(1);


            . logit ACG i.RACE, or
            Could you tell us a little more about your computing environment, for example, the version of Stata that you're using and its update status? I cannot reproduce your problem, even using your exact commands that you show. Expanding the dataset does take a little longer to converge, but the iteration log looks clean despite converging to the same log-likelihood value that you're having trouble at.

            .ÿversionÿ15.1

            .ÿ
            .ÿclearÿ*

            .ÿ
            .ÿquietlyÿinputÿbyteÿACGÿlong(count1ÿcount2ÿcount3ÿcount4ÿcount5ÿcount6)

            .ÿ
            .ÿquietlyÿreshapeÿlongÿcount,ÿi(ACG)ÿj(race)

            .ÿ
            .ÿtabulateÿACGÿraceÿ[fweight=count]

            ÿÿÿÿÿÿÿÿÿÿÿ|ÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿrace
            ÿÿÿÿÿÿÿACGÿ|ÿÿÿÿÿÿÿÿÿ1ÿÿÿÿÿÿÿÿÿÿ2ÿÿÿÿÿÿÿÿÿÿ3ÿÿÿÿÿÿÿÿÿÿ4ÿÿÿÿÿÿÿÿÿÿ5ÿÿÿÿÿÿÿÿÿÿ6ÿ|ÿÿÿÿÿTotal
            -----------+------------------------------------------------------------------+----------
            ÿÿÿÿÿÿÿÿÿ0ÿ|ÿ5,179,054ÿÿÿÿ714,413ÿÿÿÿ399,100ÿÿÿÿ120,552ÿÿÿÿÿ31,131ÿÿÿÿ157,110ÿ|ÿ6,601,360ÿ
            ÿÿÿÿÿÿÿÿÿ1ÿ|ÿÿÿ138,024ÿÿÿÿÿ15,190ÿÿÿÿÿÿ9,958ÿÿÿÿÿÿ2,776ÿÿÿÿÿÿÿÿ616ÿÿÿÿÿÿ3,141ÿ|ÿÿÿ169,705ÿ
            -----------+------------------------------------------------------------------+----------
            ÿÿÿÿÿTotalÿ|ÿ5,317,078ÿÿÿÿ729,603ÿÿÿÿ409,058ÿÿÿÿ123,328ÿÿÿÿÿ31,747ÿÿÿÿ160,251ÿ|ÿ6,771,065ÿ


            .ÿ
            .ÿ*ÿlogitÿACGÿi.raceÿ[fweight=count],ÿ//ÿnolog
            .ÿ
            .ÿrenameÿrace,ÿupper

            .ÿquietlyÿexpandÿcount

            .ÿ
            .ÿlogisticÿACGÿi.RACE,ÿor

            LogisticÿregressionÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿNumberÿofÿobsÿÿÿÿÿ=ÿÿ6,771,065
            ÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿLRÿchi2(5)ÿÿÿÿÿÿÿÿ=ÿÿÿÿ1041.75
            ÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿProbÿ>ÿchi2ÿÿÿÿÿÿÿ=ÿÿÿÿÿ0.0000
            Logÿlikelihoodÿ=ÿ-792631.82ÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿPseudoÿR2ÿÿÿÿÿÿÿÿÿ=ÿÿÿÿÿ0.0007

            ------------------------------------------------------------------------------
            ÿÿÿÿÿÿÿÿÿACGÿ|ÿOddsÿRatioÿÿÿStd.ÿErr.ÿÿÿÿÿÿzÿÿÿÿP>|z|ÿÿÿÿÿ[95%ÿConf.ÿInterval]
            -------------+----------------------------------------------------------------
            ÿÿÿÿÿÿÿÿRACEÿ|
            ÿÿÿÿÿÿÿÿÿÿ2ÿÿ|ÿÿÿ.7978188ÿÿÿ.0068941ÿÿÿ-26.14ÿÿÿ0.000ÿÿÿÿÿ.7844203ÿÿÿÿ.8114461
            ÿÿÿÿÿÿÿÿÿÿ3ÿÿ|ÿÿÿ.9362379ÿÿÿ.0098357ÿÿÿÿ-6.27ÿÿÿ0.000ÿÿÿÿÿ.9171575ÿÿÿÿ.9557153
            ÿÿÿÿÿÿÿÿÿÿ4ÿÿ|ÿÿÿÿ.864054ÿÿÿ.0167538ÿÿÿÿ-7.54ÿÿÿ0.000ÿÿÿÿÿ.8318332ÿÿÿÿ.8975228
            ÿÿÿÿÿÿÿÿÿÿ5ÿÿ|ÿÿÿ.7424778ÿÿÿ.0302776ÿÿÿÿ-7.30ÿÿÿ0.000ÿÿÿÿÿ.6854444ÿÿÿÿ.8042568
            ÿÿÿÿÿÿÿÿÿÿ6ÿÿ|ÿÿÿ.7501704ÿÿÿ.0136723ÿÿÿ-15.77ÿÿÿ0.000ÿÿÿÿÿ.7238461ÿÿÿÿÿ.777452
            ÿÿÿÿÿÿÿÿÿÿÿÿÿ|
            ÿÿÿÿÿÿÿ_consÿ|ÿÿÿ.0266504ÿÿÿ.0000727ÿ-1329.13ÿÿÿ0.000ÿÿÿÿÿ.0265083ÿÿÿÿ.0267933
            ------------------------------------------------------------------------------
            Note:ÿ_consÿestimatesÿbaselineÿodds.

            .ÿ
            .ÿlogitÿACGÿi.RACE,ÿor

            Iterationÿ0:ÿÿÿlogÿlikelihoodÿ=ÿÿ-793152.7ÿÿ
            Iterationÿ1:ÿÿÿlogÿlikelihoodÿ=ÿÿÿÿ-792634ÿÿ
            Iterationÿ2:ÿÿÿlogÿlikelihoodÿ=ÿ-792631.82ÿÿ
            Iterationÿ3:ÿÿÿlogÿlikelihoodÿ=ÿ-792631.82ÿÿ

            LogisticÿregressionÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿNumberÿofÿobsÿÿÿÿÿ=ÿÿ6,771,065
            ÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿLRÿchi2(5)ÿÿÿÿÿÿÿÿ=ÿÿÿÿ1041.75
            ÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿProbÿ>ÿchi2ÿÿÿÿÿÿÿ=ÿÿÿÿÿ0.0000
            Logÿlikelihoodÿ=ÿ-792631.82ÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿPseudoÿR2ÿÿÿÿÿÿÿÿÿ=ÿÿÿÿÿ0.0007

            ------------------------------------------------------------------------------
            ÿÿÿÿÿÿÿÿÿACGÿ|ÿOddsÿRatioÿÿÿStd.ÿErr.ÿÿÿÿÿÿzÿÿÿÿP>|z|ÿÿÿÿÿ[95%ÿConf.ÿInterval]
            -------------+----------------------------------------------------------------
            ÿÿÿÿÿÿÿÿRACEÿ|
            ÿÿÿÿÿÿÿÿÿÿ2ÿÿ|ÿÿÿ.7978188ÿÿÿ.0068941ÿÿÿ-26.14ÿÿÿ0.000ÿÿÿÿÿ.7844203ÿÿÿÿ.8114461
            ÿÿÿÿÿÿÿÿÿÿ3ÿÿ|ÿÿÿ.9362379ÿÿÿ.0098357ÿÿÿÿ-6.27ÿÿÿ0.000ÿÿÿÿÿ.9171575ÿÿÿÿ.9557153
            ÿÿÿÿÿÿÿÿÿÿ4ÿÿ|ÿÿÿÿ.864054ÿÿÿ.0167538ÿÿÿÿ-7.54ÿÿÿ0.000ÿÿÿÿÿ.8318332ÿÿÿÿ.8975228
            ÿÿÿÿÿÿÿÿÿÿ5ÿÿ|ÿÿÿ.7424778ÿÿÿ.0302776ÿÿÿÿ-7.30ÿÿÿ0.000ÿÿÿÿÿ.6854444ÿÿÿÿ.8042568
            ÿÿÿÿÿÿÿÿÿÿ6ÿÿ|ÿÿÿ.7501704ÿÿÿ.0136723ÿÿÿ-15.77ÿÿÿ0.000ÿÿÿÿÿ.7238461ÿÿÿÿÿ.777452
            ÿÿÿÿÿÿÿÿÿÿÿÿÿ|
            ÿÿÿÿÿÿÿ_consÿ|ÿÿÿ.0266504ÿÿÿ.0000727ÿ-1329.13ÿÿÿ0.000ÿÿÿÿÿ.0265083ÿÿÿÿ.0267933
            ------------------------------------------------------------------------------
            Note:ÿ_consÿestimatesÿbaselineÿodds.

            .ÿ
            .ÿexit

            endÿofÿdo-file


            .ÿqueryÿborn
            18ÿAprÿ2018

            .

            Comment


            • #7
              Joseph did what I was too lazy to do. To make it easier still for someone else,

              Code:
              * Example generated by -dataex-. To install: ssc install dataex
              clear
              input float ACG byte race float count
              0 1 5179054
              0 2  714413
              0 3  399100
              0 4  120552
              0 5   31131
              0 6  157110
              1 1  138024
              1 2   15190
              1 3    9958
              1 4    2776
              1 5     616
              1 6    3141
              end
              
              tab2 ACG race [fw = count]
              logit ACG i.race [fweight=count], nolog
              Works fine for me too. I wonder if Fatimah's installation of Stata is corrupted or needs to be updated.
              -------------------------------------------
              Richard Williams, Notre Dame Dept of Sociology
              Stata Version: 17.0 MP (2 processor)

              EMAIL: [email protected]
              WWW: https://www3.nd.edu/~rwilliam

              Comment

              Working...
              X