Announcement

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

  • linearity to logit assumption (logistic regression)

    Hi all,

    I'm trying to test whether my logistic model meets the assumptions of the predictor variables having a linear relationship to the logit of the outcome variable.

    My understanding is that you would do this by running the regression again but include a new IV which is the IV*log(IV).

    Firstly, is this only an issue with continuous predictors? All my predictors are either binary or categorical (eg 4 levels).

    When I have tried to do this with my binary and categorical predictors, I often get "variable !=0 predicts success perfectly...variable dropped" and the new log variable "omitted because of collinearity". What could be going on here?

    Many thanks

  • #2
    Your understanding for a test of linearity seems to me not true in general. It only test for a very specific form of non-linearity.

    Fortunately, in your case you don't have to worry about it. If you have categorical variables than there is no need to test for linearity (in the log(odds) or otherwise), as that assumption will be met by definition. You'll include the categorical variable as a set of indicator (dummy) variables, and if you have only two points then it is impossible for one of the points to deviate from a straight line drawn through those two points.

    ---------------------------------
    Maarten L. Buis
    University of Konstanz
    Department of history and sociology
    box 40
    78457 Konstanz
    Germany
    http://www.maartenbuis.nl
    ---------------------------------

    Comment


    • #3
      Hi Maarten,

      Thanks for your reply. I'm not sure I understand what you mean by "If you have categorical variables than there is no need to test for linearity (in the log(odds) or otherwise), as that assumption will be met by definition." Are you saying that categorical variables DON'T meet the linearity to the logit assumption required for logistic regression? How are they still able to be included in the model then?

      I understand that my proposed way of testing linearity to the logit for my continuous predictors is a bit limited (substituting the IV with a new IV which is the IV*log(IV)), is there something better you would suggest just as a basic initial test that my variables meet the assumptions for the model?

      Many thanks

      Comment


      • #4
        Rebekah, you originally said "All my predictors are either binary or categorical (eg 4 levels)." But in #3 you refer to continuous predictors. Which is it?

        I wonder if we are talking about the same thing here. As Maarten notes, if a variable only has 2 values (as would be the case with a binary variable or a categorical variable broken up into dummies) a straight line will connect the 2 points. Once a variable has three or more values, the relationship may be linear or it may not be linear.

        I am not sure what you are trying to do, but the first 3 pages of this handout may be helpful. It outlines some ways to test for linearity of effects.

        https://www3.nd.edu/~rwilliam/xsoc73...ndependent.pdf
        -------------------------------------------
        Richard Williams, Notre Dame Dept of Sociology
        StataNow Version: 19.5 MP (2 processor)

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

        Comment

        Working...
        X