rstatalogistics

Any equivalent function of "logistic" from Stata from R?


I am trying to do some logistic regression, and having heard that the command logistic in Stata can be used to present the coefficient on the OR scale, and logit for the same thing in ln(OR) scale. Is there anything equivalent for R? I used glm and the output is only ln(OR), so I need to do the calculation all by myself and I am afraid that I may somehow miscalculate something.


Solution

  • You should read the help page for predict.glm. Set type="response".

    If your interest is only in calculating the OR you would simply enter:

    exp(coef(fit))