Announcement

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

  • Problem how to interpret Firthlogit coefficients that aren't statistically significant & the relative ORs that are statistically significant

    Stata 14.1 SE runs on Mac OS X Lion 10.7.5.

    Background:
    • 8 binary variables, 1 binary outcome
    • I run “logistic, reporting odds ratio”. Output shows very large ORs and big SEs which suggests separation issues
    • I run Firthlogit which indicates only two of the 8 coefficients significant.
    • However, when I run “Firthlogit, or” command, six of the 8 binary predictors become significant (though still large ORs and SEs for two of the predictors).
    Question:
    • My understanding is that coefficients are used to calculate ORs. If coefficients are not significant, I should not be considering using them to calculate ORs or there is more to that I should be aware of?
    The output of “Firthlogit, or” command to me looks surprising. How should I interpret the output? Are the predictors significant or are significant only those whose coefficient is significant in the first place?

    Exmple from the output:
    Firthlogit, or
    -----------------------------------------------------------------------------------------
    Outcome | OddsRatio Std. Err. z P>|z| [95% Conf. Interval]
    ------------------------+----------------------------------------------------------------
    X 2.499915 .6780606 3.38 0.001 1.469099 4.254021
    Cons .0000171 .0000175 -10.75 0.000 2.31e-06 .0001267
    -----------------------------------------------------------------------------------------

    Firthlogit

    Outcome Coef. Std. Err. z P>|z| [95% Conf. Interval]
    ------------------------+----------------------------------------------------------------

    X . 9162569 .2712334 3.38 0.001 .3846492 1.447865
    Cons -10.97579 1.02132 -10.75 0.000 -12.97754 -8.974041
    -----------------------------------------------------------------------------------------

    many thanks in advance for you help,

    all the best,

    Guest
    Last edited by sladmin; 15 May 2017, 07:05. Reason: anonymize original poster

  • #2
    Guest, welcome to Statalist. The output is very hard to read. I suggest you read p. 12 of the FAQ and use code tags to post code and output in the future. Also, the mere fact that firthlogit is capitalized leads me to believe you haven't reproduced exactly what you typed. Somebody may be willing and able to answer your question as it stands but in general you'll probably have more luck if you copy and paste exactly what you typed and how Stata responded, and use code tags to do so.
    Last edited by sladmin; 15 May 2017, 07:04. Reason: anonymize original poster
    -------------------------------------------
    Richard Williams, Notre Dame Dept of Sociology
    StataNow Version: 19.5 MP (2 processor)

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

    Comment


    • #3
      Originally posted by Guest View Post
      I run “logistic, reporting odds ratio”. Output shows very large ORs and big SEs which suggests separation issues
      I believe that Stata actually tells you when you have separation or quasiseparation. Maybe what you have instead is near collinearity (see below). If so, then instead of using the user-written firthlogit, consider seeking which of the predictors are (nearly) collinear and simplifying your model until it makes sense.

      Originally posted by Guest View Post
      I run Firthlogit which indicates only two of the 8 coefficients significant.
      However, when I run “Firthlogit, or” command, six of the 8 binary predictors become significant
      The output that you show doesn't show that. The Wald test statistics are identical in the output that you show. By the way, if you have circumstances such that you feel that you need to use firthlogit, then you shouldn't be using Wald test statistics. I believe that the help file for the user-written command says as much.

      Originally posted by Guest View Post
      My understanding is that coefficients are used to calculate ORs. If coefficients are not significant, I should not be considering using them to calculate ORs or there is more to that I should be aware of?
      ORs are the exponentiated coefficients.

      Originally posted by Guest View Post
      The output of “Firthlogit, or” command to me looks surprising. How should I interpret the output? Are the predictors significant or are significant only those whose coefficient is significant in the first place?
      What's surprising about the output that you show? I can't tell you how you should interpret your fitted model, but from the output you show, it looks like X predicts outcome with a penalized OR in the neighborhood of two or three, and the baseline rate of outcome is infinitesimal.When I see log odds or log odds ratios of ±10, my skepticism gnaws intolerably.

      .ÿversionÿ14.1

      .ÿ
      .ÿclearÿ*

      .ÿsetÿmoreÿoff

      .ÿsetÿseedÿ`=date("2016-01-31",ÿ"YMD")'

      .ÿquietlyÿsetÿobsÿ250

      .ÿ
      .ÿgenerateÿbyteÿoutcomeÿ=ÿmod(_n,ÿ2)

      .ÿforvaluesÿiÿ=ÿ1/7ÿ{
      ÿÿ2.ÿÿÿÿÿÿÿÿÿgenerateÿbyteÿX`i'ÿ=ÿruniform()ÿ>ÿ0.5
      ÿÿ3.ÿ}

      .ÿgenerateÿbyteÿX8ÿ=ÿX7

      .ÿquietlyÿreplaceÿX8ÿ=ÿ!X8ÿinÿl

      .ÿ
      .ÿlogitÿoutcomeÿi.X?,ÿnolog

      LogisticÿregressionÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿNumberÿofÿobsÿÿÿÿÿ=ÿÿÿÿÿÿÿÿ250
      ÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿLRÿchi2(8)ÿÿÿÿÿÿÿÿ=ÿÿÿÿÿÿÿ6.77
      ÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿProbÿ>ÿchi2ÿÿÿÿÿÿÿ=ÿÿÿÿÿ0.5614
      Logÿlikelihoodÿ=ÿ-169.90055ÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿPseudoÿR2ÿÿÿÿÿÿÿÿÿ=ÿÿÿÿÿ0.0195

      ------------------------------------------------------------------------------
      ÿÿÿÿÿoutcomeÿ|ÿÿÿÿÿÿCoef.ÿÿÿStd.ÿErr.ÿÿÿÿÿÿzÿÿÿÿP>|z|ÿÿÿÿÿ[95%ÿConf.ÿInterval]
      -------------+----------------------------------------------------------------
      ÿÿÿÿÿÿÿÿ1.X1ÿ|ÿÿ-.0218457ÿÿÿ.2570523ÿÿÿÿ-0.08ÿÿÿ0.932ÿÿÿÿÿ-.525659ÿÿÿÿ.4819676
      ÿÿÿÿÿÿÿÿ1.X2ÿ|ÿÿ-.3592301ÿÿÿ.2580547ÿÿÿÿ-1.39ÿÿÿ0.164ÿÿÿÿÿ-.865008ÿÿÿÿ.1465478
      ÿÿÿÿÿÿÿÿ1.X3ÿ|ÿÿÿ.2004058ÿÿÿ.2596283ÿÿÿÿÿ0.77ÿÿÿ0.440ÿÿÿÿ-.3084564ÿÿÿÿ.7092679
      ÿÿÿÿÿÿÿÿ1.X4ÿ|ÿÿÿ.3130074ÿÿÿ.2598646ÿÿÿÿÿ1.20ÿÿÿ0.228ÿÿÿÿ-.1963179ÿÿÿÿ.8223327
      ÿÿÿÿÿÿÿÿ1.X5ÿ|ÿÿÿ.0933117ÿÿÿ.2592633ÿÿÿÿÿ0.36ÿÿÿ0.719ÿÿÿÿÿ-.414835ÿÿÿÿ.6014584
      ÿÿÿÿÿÿÿÿ1.X6ÿ|ÿÿ-.2252237ÿÿÿ.2579499ÿÿÿÿ-0.87ÿÿÿ0.383ÿÿÿÿ-.7307963ÿÿÿÿ.2803488
      ÿÿÿÿÿÿÿÿ1.X7ÿ|ÿÿ-12.31029ÿÿÿ632.2901ÿÿÿÿ-0.02ÿÿÿ0.984ÿÿÿÿ-1251.576ÿÿÿÿ1226.955
      ÿÿÿÿÿÿÿÿ1.X8ÿ|ÿÿÿ12.29756ÿÿÿ632.2901ÿÿÿÿÿ0.02ÿÿÿ0.984ÿÿÿÿ-1226.968ÿÿÿÿ1251.563
      ÿÿÿÿÿÿÿ_consÿ|ÿÿ-.0039487ÿÿÿ.3401093ÿÿÿÿ-0.01ÿÿÿ0.991ÿÿÿÿ-.6705507ÿÿÿÿ.6626533
      ------------------------------------------------------------------------------

      .ÿ//ÿLargeÿSEsÿareÿnotÿseparation,ÿbutÿratherÿnearÿcollinearity
      .ÿ
      .ÿ*
      .ÿ*ÿBeginÿhere
      .ÿ*
      .ÿquietlyÿregressÿoutcomeÿi.X?

      .ÿestatÿvif

      ÿÿÿÿVariableÿ|ÿÿÿÿÿÿÿVIFÿÿÿÿÿÿÿ1/VIFÿÿ
      -------------+----------------------
      ÿÿÿÿÿÿÿÿ1.X1ÿ|ÿÿÿÿÿÿ1.01ÿÿÿÿ0.989945
      ÿÿÿÿÿÿÿÿ1.X2ÿ|ÿÿÿÿÿÿ1.02ÿÿÿÿ0.984216
      ÿÿÿÿÿÿÿÿ1.X3ÿ|ÿÿÿÿÿÿ1.03ÿÿÿÿ0.968558
      ÿÿÿÿÿÿÿÿ1.X4ÿ|ÿÿÿÿÿÿ1.03ÿÿÿÿ0.968705
      ÿÿÿÿÿÿÿÿ1.X5ÿ|ÿÿÿÿÿÿ1.02ÿÿÿÿ0.980034
      ÿÿÿÿÿÿÿÿ1.X6ÿ|ÿÿÿÿÿÿ1.02ÿÿÿÿ0.982809
      ÿÿÿÿÿÿÿÿ1.X7ÿ|ÿÿÿÿÿ64.20ÿÿÿÿ0.015576
      ÿÿÿÿÿÿÿÿ1.X8ÿ|ÿÿÿÿÿ64.40ÿÿÿÿ0.015529
      -------------+----------------------
      ÿÿÿÿMeanÿVIFÿ|ÿÿÿÿÿ16.84

      .ÿ
      .ÿ//ÿPickÿone
      .ÿdropÿX7

      .ÿ
      .ÿ//ÿNow:
      .ÿlogitÿoutcomeÿi.X?,ÿnolog

      LogisticÿregressionÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿNumberÿofÿobsÿÿÿÿÿ=ÿÿÿÿÿÿÿÿ250
      ÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿLRÿchi2(7)ÿÿÿÿÿÿÿÿ=ÿÿÿÿÿÿÿ5.91
      ÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿProbÿ>ÿchi2ÿÿÿÿÿÿÿ=ÿÿÿÿÿ0.5509
      Logÿlikelihoodÿ=ÿ-170.33422ÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿPseudoÿR2ÿÿÿÿÿÿÿÿÿ=ÿÿÿÿÿ0.0170

      ------------------------------------------------------------------------------
      ÿÿÿÿÿoutcomeÿ|ÿÿÿÿÿÿCoef.ÿÿÿStd.ÿErr.ÿÿÿÿÿÿzÿÿÿÿP>|z|ÿÿÿÿÿ[95%ÿConf.ÿInterval]
      -------------+----------------------------------------------------------------
      ÿÿÿÿÿÿÿÿ1.X1ÿ|ÿÿ-.0095754ÿÿÿ.2567466ÿÿÿÿ-0.04ÿÿÿ0.970ÿÿÿÿ-.5127895ÿÿÿÿ.4936388
      ÿÿÿÿÿÿÿÿ1.X2ÿ|ÿÿ-.3723706ÿÿÿ.2576895ÿÿÿÿ-1.45ÿÿÿ0.148ÿÿÿÿ-.8774327ÿÿÿÿ.1326915
      ÿÿÿÿÿÿÿÿ1.X3ÿ|ÿÿÿ.2103059ÿÿÿ.2594932ÿÿÿÿÿ0.81ÿÿÿ0.418ÿÿÿÿ-.2982915ÿÿÿÿ.7189033
      ÿÿÿÿÿÿÿÿ1.X4ÿ|ÿÿÿ.3235834ÿÿÿ.2596855ÿÿÿÿÿ1.25ÿÿÿ0.213ÿÿÿÿ-.1853909ÿÿÿÿ.8325577
      ÿÿÿÿÿÿÿÿ1.X5ÿ|ÿÿÿ.1038714ÿÿÿ.2591009ÿÿÿÿÿ0.40ÿÿÿ0.688ÿÿÿÿÿ-.403957ÿÿÿÿ.6116998
      ÿÿÿÿÿÿÿÿ1.X6ÿ|ÿÿ-.2366603ÿÿÿ.2577117ÿÿÿÿ-0.92ÿÿÿ0.358ÿÿÿÿÿ-.741766ÿÿÿÿ.2684454
      ÿÿÿÿÿÿÿÿ1.X8ÿ|ÿÿ-.0039358ÿÿÿ.2591618ÿÿÿÿ-0.02ÿÿÿ0.988ÿÿÿÿ-.5118835ÿÿÿÿÿ.504012
      ÿÿÿÿÿÿÿ_consÿ|ÿÿ-.0236574ÿÿÿ.3392717ÿÿÿÿ-0.07ÿÿÿ0.944ÿÿÿÿ-.6886178ÿÿÿÿÿ.641303
      ------------------------------------------------------------------------------

      .ÿ
      .ÿexit

      endÿofÿdo-file


      .

      Comment


      • #4
        Dear Richard and Joseph,

        many thanks to you both for your prompt replies.

        Stata is not telling me anymore that there are issues of separation as since the last warning, I collected more data. However, on just one of the predictors, R2DE, I have OR >300 and SE of the orders you show.
        Correlation matrix indicates that outcome and the R2DE have a correlation = 0.65. The other predictors have much lower correlation values with only predictor MIOP having a r=0.45.

        Please see attached VIF and Tolerance table and regression models.

        (note I renamed X MIOP)

        firthlogit command did not change much, though ORs and SE were smaller but I had thought to use it as I believed that my issue would still be separation.

        In terms of rationale behind the model, even if I drop 2 of the 6 predictors (for instance Re and Boss), the results make a lot of sense in practical terms. When I run the model with only R2DE, it explains about 30% of the variance while the rest (30%) is explained for by the other predictors. In addition, removing R2DE from the model means ignoring from my point view what is the most important intervention in our setting.

        In terms of scepticism I had the same feeling when I first saw the results but they truly reflect our everyday experience.

        Also, going back to my original question, when you say "ORs are the exponentiated coefficients", are you saying I should not be worried about confidence interval for coefficients and just report ORs?
        Last edited by sladmin; 15 May 2017, 07:06. Reason: anonymize original poster

        Comment


        • #5
          Regression & Diagnostics.docx

          Comment


          • #6
            If you have separation, then Stata will give you a message before the iterations begin that says something like "[a predictor] predicts failure [or success] perfectly. [predictor] dropped and [some number] of observations not used". You can see an example of the message in Example 4 of the user's manual entry for probit.

            You don't seem to have a problem with collinearity between your predictors, but you might want to consider doing one more check:
            Code:
            quietly regress Outcome i.(TD Re Boss VT PT A0 R2DE MIOP) in 26/2000
            estat vif, uncentered
            in order to confirm that R2DE and the intercept are not nearly collinear. If there is no problem there, then you might have something close to separation with the R2DE predictor. I would be uncomfortable reporting ORs of 400 for R2DE and 1 / 70,000 for the intercept in a model fit with only 2000 observations. You could inspect the data a little more easily to see what's going on by doing
            Code:
            drop in 1/25
            contract Outcome TD Re Boss VT PT A0 R2DE MIOP, freq(count)
            list, noobs separator(0)
            and looking for sparseness among combinations of predictors and outcome.

            When I said that ORs are the exponentiated coefficients, I was responding to your questions about the relation between the coefficients and ORs. I wasn't suggesting ignoring their confidence intervals.

            Comment


            • #7

              it seems there is a problem of VIF and Tolerance, but I'm not familiar with these two commands.





              VIF, Tolerance, Sparseness.docx
              Attached Files
              Last edited by sladmin; 15 May 2017, 07:06. Reason: anonymize original poster

              Comment


              • #8
                In the FAQ you can read that attaching documents is not a good way to give us the output. Not everybody has MS Word, or wants to use it, or trusts these documents when uploaded by some unknown person. Instead you should use the code tag.

                To do so you first click on the button with an underlined A on it:


                Then you look for the button with the # symbol:


                Click image for larger version

Name:	a.png
Views:	1
Size:	12.0 KB
ID:	1325298

                That will put this in your message:

                Click image for larger version

Name:	a.png
Views:	1
Size:	2.5 KB
ID:	1325299



                You can copy your Stata output directly between those tags, and that will be formated correctly
                ---------------------------------
                Maarten L. Buis
                University of Konstanz
                Department of history and sociology
                box 40
                78457 Konstanz
                Germany
                http://www.maartenbuis.nl
                ---------------------------------

                Comment


                • #9
                  Hi Maarten,

                  thanks for your suggestion.

                  Comment


                  • #10
                    Hi Joseph,

                    this now should be easy to read. I'm not familiar with this option. How do you see there's sparseness? and if so, how do you deal with the issue?

                    Code:
                    quietly regress Outcome i.(TD Re Boss VT PT AO R2DE MIOP) in 26/2000
                    
                    . estat vif, uncentered
                    
                        Variable |       VIF       1/VIF  
                    -------------+----------------------
                            1.TD |      2.36    0.424123
                            1.Re |     10.93    0.091529
                          1.Boss |      4.21    0.237394
                            1.VT |      2.60    0.384573
                            1.PT |      1.92    0.520131
                            1.AO |      1.28    0.782110
                          1.R2DE |      1.58    0.632606
                          1.MIOP |      1.40    0.711943
                       intercept |     13.65    0.073238
                    -------------+----------------------
                        Mean VIF |      4.44



                    Code:
                    drop in 1/25
                    (25 observations deleted)
                    
                    . contract Outcome TD Re Boss VT PT AO R2DE MIOP, freq(count)
                    
                    . list, noobs separator(0)
                    
                    +---------------------------------------------------------------+
                    Outcome   TD   Re   Boss   VT   PT   AO   R2DE   MIOP   count
                    ---------------------------------------------------------------
                    0    0    0      0    0    0    1      0      0       1
                    0    0    0      0    0    1    0      0      0      10
                    0    0    0      0    0    1    0      0      1       1
                    0    0    0      0    0    1    0      1      0       1
                    0    0    0      0    1    0    0      0      0      24
                    0    0    0      0    1    0    0      1      0       1
                    0    0    0      0    1    1    0      0      0       7
                    0    0    0      0    1    1    0      1      1       1
                    0    0    0      1    0    0    0      0      0      16
                    0    0    0      1    0    0    1      0      0       3
                    0    0    0      1    0    1    0      0      0       3
                    0    0    0      1    1    0    0      0      0       9
                    0    0    0      1    1    0    0      1      0       1
                    0    0    0      1    1    0    1      1      0       1
                    0    0    0      1    1    1    1      0      0       1
                    0    0    1      0    0    0    0      0      0      24
                    0    0    1      0    0    0    0      1      0       2
                    0    0    1      0    0    0    0      1      1       1
                    0    0    1      0    0    0    1      0      0       4
                    0    0    1      0    0    1    0      0      0      36
                    0    0    1      0    0    1    0      1      0       1
                    0    0    1      0    0    1    0      1      1       4
                    0    0    1      0    1    0    0      0      0     103
                    0    0    1      0    1    0    0      0      1       1
                    0    0    1      0    1    0    0      1      0      10
                    0    0    1      0    1    0    1      0      0       4
                    0    0    1      0    1    1    0      0      0      43
                    0    0    1      0    1    1    0      0      1       1
                    0    0    1      0    1    1    0      1      0       5
                    0    0    1      0    1    1    0      1      1       3
                    0    0    1      0    1    1    1      0      0       3
                    0    0    1      0    1    1    1      1      0       2
                    0    0    1      1    0    0    0      0      0     103
                    0    0    1      1    0    0    0      0      1       1
                    0    0    1      1    0    0    0      1      0       9
                    0    0    1      1    0    0    1      0      0      35
                    0    0    1      1    0    0    1      0      1       2
                    0    0    1      1    0    0    1      1      0       4
                    0    0    1      1    0    0    1      1      1       1
                    0    0    1      1    0    1    0      0      0      32
                    0    0    1      1    0    1    0      0      1       3
                    0    0    1      1    0    1    0      1      0       5
                    0    0    1      1    0    1    0      1      1       2
                    0    0    1      1    0    1    1      0      0      12
                    0    0    1      1    0    1    1      0      1       2
                    0    0    1      1    0    1    1      1      1       2
                    0    0    1      1    1    0    0      0      0     130
                    0    0    1      1    1    0    0      0      1       2
                    0    0    1      1    1    0    0      1      0      16
                    0    0    1      1    1    0    1      0      0      39
                    0    0    1      1    1    0    1      1      0       1
                    0    0    1      1    1    0    1      1      1       1
                    0    0    1      1    1    1    0      0      0      84
                    0    0    1      1    1    1    0      0      1       5
                    0    0    1      1    1    1    0      1      0      13
                    0    0    1      1    1    1    0      1      1       3
                    0    0    1      1    1    1    1      0      0      19
                    0    0    1      1    1    1    1      0      1       2
                    0    0    1      1    1    1    1      1      0       9
                    0    0    1      1    1    1    1      1      1       2
                    0    1    0      0    0    0    0      0      0       1
                    0    1    0      0    0    0    0      1      0       3
                    0    1    0      0    0    0    0      1      1       1
                    0    1    0      0    0    0    1      0      0       5
                    0    1    0      0    0    0    1      0      1       1
                    0    1    0      0    0    1    0      0      0      22
                    0    1    0      0    0    1    0      0      1       2
                    0    1    0      0    0    1    0      1      0       1
                    0    1    0      0    0    1    0      1      1       2
                    0    1    0      0    1    0    0      0      0       7
                    0    1    0      0    1    0    0      1      0       1
                    0    1    0      0    1    1    0      0      0       2
                    0    1    0      1    0    0    0      0      0      43
                    0    1    0      1    0    0    0      0      1       2
                    0    1    0      1    0    0    0      1      0       9
                    0    1    0      1    0    0    0      1      1       1
                    0    1    0      1    0    0    1      0      0       4
                    0    1    0      1    0    0    1      1      0       1
                    0    1    0      1    0    1    0      0      0       6
                    0    1    0      1    0    1    0      1      1       1
                    0    1    0      1    0    1    1      1      1       1
                    0    1    0      1    1    0    0      0      0       1
                    0    1    0      1    1    1    0      0      0       2
                    0    1    0      1    1    1    0      1      0       1
                    0    1    1      0    0    0    0      0      0      24
                    0    1    1      0    0    0    0      1      0       1
                    0    1    1      0    0    0    0      1      1       2
                    0    1    1      0    0    0    1      0      0       5
                    0    1    1      0    0    1    0      0      0      47
                    0    1    1      0    0    1    1      0      0       1
                    0    1    1      0    0    1    1      1      0       1
                    0    1    1      0    1    0    0      0      0      63
                    0    1    1      0    1    0    0      1      0       7
                    0    1    1      0    1    0    1      0      0       3
                    0    1    1      0    1    0    1      1      0       2
                    0    1    1      0    1    1    0      0      0      32
                    0    1    1      0    1    1    0      0      1       1
                    0    1    1      0    1    1    0      1      0       1
                    0    1    1      0    1    1    0      1      1       1
                    0    1    1      0    1    1    1      0      0       1
                    0    1    1      1    0    0    0      0      0     174
                    0    1    1      1    0    0    0      0      1       8
                    0    1    1      1    0    0    0      1      0       7
                    0    1    1      1    0    0    0      1      1       3
                    0    1    1      1    0    0    1      0      0      59
                    0    1    1      1    0    0    1      0      1       2
                    0    1    1      1    0    0    1      1      0       4
                    0    1    1      1    0    1    0      0      0      88
                    0    1    1      1    0    1    0      0      1       6
                    0    1    1      1    0    1    0      1      0       5
                    0    1    1      1    0    1    0      1      1       3
                    0    1    1      1    0    1    1      0      0      12
                    0    1    1      1    0    1    1      0      1       1
                    0    1    1      1    0    1    1      1      1       1
                    0    1    1      1    1    0    0      0      0     181
                    0    1    1      1    1    0    0      1      0      10
                    0    1    1      1    1    0    0      1      1       1
                    0    1    1      1    1    0    1      0      0      19
                    0    1    1      1    1    0    1      1      0       1
                    0    1    1      1    1    1    0      0      0     104
                    0    1    1      1    1    1    0      0      1       6
                    0    1    1      1    1    1    0      1      0      14
                    0    1    1      1    1    1    0      1      1       4
                    0    1    1      1    1    1    1      0      0      29
                    0    1    1      1    1    1    1      0      1       3
                    0    1    1      1    1    1    1      1      0       3
                    1    0    1      0    0    0    0      1      0       1
                    1    0    1      0    0    1    0      0      0       1
                    1    0    1      0    0    1    0      1      0       1
                    1    0    1      0    1    1    0      1      0       2
                    1    0    1      0    1    1    0      1      1       3
                    1    0    1      0    1    1    1      1      1       1
                    1    0    1      1    0    0    1      1      0       1
                    1    0    1      1    0    1    0      1      0       1
                    1    0    1      1    0    1    1      1      0       2
                    1    0    1      1    0    1    1      1      1       1
                    1    0    1      1    1    0    0      1      1       1
                    1    0    1      1    1    0    1      1      0       1
                    1    0    1      1    1    1    0      1      0      14
                    1    0    1      1    1    1    0      1      1       9
                    1    0    1      1    1    1    1      1      0       7
                    1    0    1      1    1    1    1      1      1      10
                    1    1    0      0    0    0    0      1      1       1
                    1    1    0      0    0    1    0      0      1       1
                    1    1    0      1    0    0    0      1      0       1
                    1    1    1      0    0    1    0      1      0       2
                    1    1    1      0    1    1    0      1      0       1
                    1    1    1      0    1    1    0      1      1       2
                    1    1    1      1    0    0    0      1      0       1
                    1    1    1      1    0    1    0      1      0       5
                    1    1    1      1    0    1    0      1      1       4
                    1    1    1      1    0    1    1      1      0       3
                    1    1    1      1    0    1    1      1      1       4
                    1    1    1      1    1    0    0      1      0       1
                    1    1    1      1    1    1    0      1      0      25
                    1    1    1      1    1    1    0      1      1      33
                    1    1    1      1    1    1    1      1      0      16
                    1    1    1      1    1    1    1      1      1      19
                    +---------------------------------------------------------------+
                    Last edited by sladmin; 15 May 2017, 07:07. Reason: anonymize original poster

                    Comment


                    • #11
                      You've got cross-tabulations of the outcome and R2DE or Re with cells with counts of 2 or 3, respectively, out of a total sample of more than 2000. You typically would have more counts in each condition for logistic regression.

                      I suspect that you could not use exact logistic regression, because of memory limitations. You could do penalized logistic regression with the user-written firthlogit or the user-written penlogit (search penlogit). With naive priors (log-F(1, 1)) the latter gives nearly the same regression coefficients to two significant figures for the predictors as firthlogit (see attached do-file and log-file).

                      There's obviously a strong association between the predictor of primary interest (R2DE) and the outcome. But with odds of 1:50 000+ for the intercept and odds ratios in the hundreds for R2DE even after penalization (regularization), you're seeing the consequences of estimation in the presence of sparse combinations of predictor and outcome.
                      Attached Files

                      Comment


                      • #12
                        many thanks for your input on this. I ran penlogit module and results are quite similar to fithlogit. I will have to drop R2DE from the model and refine it into a more parsimonious one but I was wondering whether collapsing R2DE with one of the other predictors as suggested in this link: http://www.ats.ucla.edu/stat/mult_pk...git_models.htm by UCLA would be appropriate through generation of new interaction variable:

                        Code:
                        gen TDbyR2DE=TD*R2DE
                        .

                        Theoretically makes sense in our setting and ORs and SEs are greatly improved, even in standard logistic model without penalised method. Uncentered diagnostics are also good.

                        Comment

                        Working...
                        X