سؤال

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.

هل كانت مفيدة؟

المحلول

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))

نصائح أخرى

Are you looking for plogis (logistic) and qlogis (logit)? e.g. qlogis(0.5)==0, plogis(0)==0.5

مرخصة بموجب: CC-BY-SA مع الإسناد
لا تنتمي إلى StackOverflow
scroll top