0

I run a glm analysis on a dataset some days ago and obtained some relatively normal ranged (i.e from 0 to 2-3) odds ratios. I wanted to re-run the code because I had forgotten to print it and now I obtain very high and widely ranged odds ratios (i.e. OR 8 with CI from 2 to 60). Exactly same code, and same dataset. Why might this happen? I was thinking that I might have changed some scale into the R software, is there any way to verify that? Here is the code of my glm model:

MODEL <- glm(a ~ b+c+d+e, data = data, family = "binomial")
John M.
  • 51
  • 5
  • Could you post a reproducible answer with the data? The usual culprit in this case is that for a categorical variable, all the individuals in one category had a positive outcome or all had a negative outcome. – JDL Dec 02 '20 at 10:44
  • Try running some older tutorials on using glm (do a Google search) and see if you get the same results as theirs. I think it's unlikely the `glm()` function would have changed. Perhaps you ran something in your console that wasn't written in your scripted code the first time around, which could have changed your variables and consequently gave you different results. – LC-datascientist Dec 02 '20 at 10:53

0 Answers0