2

I have conducted a binary logistic regression (with 7 predictor variables) in R using "year" as a random effect, i.e. a generalized linear mixed model (GLMM). For a few of the predictor variables, I would now like to find the inflection point, i.e. the value of the predictor variable for which the probability of the response variable being "1" equals 0.5. I would like both to produce a curve of this and to calculate the exact value, so that I won't have to read it from the curve (with the inaccuracy this would cause). A post from November 2013 made by Francis and edited by Scortchi touches on this topic (with a different purpose, though) and shares a specific code for producing such a curve (Logistic Regression and Inflection Point). However, I don't understand the 4th line of the code (newdata) and can't make the code work for my data. Is the 4th line something that has to be done in order to produce the curve? Might someone help me by uploading a more general code, or gently translating the referred one, for me to understand exactly how to fit my own data into the code? Also, if someone knows how to make R calculate the exact value, I would very much like to know. As you might be able to tell, I'm still learning R. I hope that someone can help.

  • 1
    (1) Are all your effects linear in the logit? If not the inflection point doesn't necessarily coincide with a 0.5 probability for the response - which do you want? (2) At what values will you fix the other six predictors when calculating the inflection point of the one remaining predictor? – Scortchi - Reinstate Monica May 10 '14 at 12:06
  • I'm not completely sure what you mean by this, but the following should provide an answer: 6 of the 7 predictors are nummerical and the 7th is multi-categorical. The log-link regression is the basic multiple linear regression where the 6 nummerical predictors appear as "themselves" and the multi-cat. predictor is split up into dummies (the first of which is represented by the intercept). I would like for the inflection point to be at 0.5 - if the data allow this. 2) Maybe at their mean values? For the multi-cat. predictor, I guess that a specific category would have to be chosen?
  • – user45324 May 10 '14 at 15:06
  • (1) "Linear in the logit" means that the logit of the probability is a linear function of the predictor, not e.g. a polynomial. Note that logistic regression uses a logit link, not a log link; I assume this was a typo. (2) Rhetorical question really: the point's the inflection point will depend on the values of the other predictors; you can choose what to set them at if you're still interested. – Scortchi - Reinstate Monica May 11 '14 at 15:13