On Jan 30, 2013, at 5:49 AM, aminreza Aamini wrote:
Hi all,
I am very grateful to all those who write to me
1) how i can obtain relative risk (risk ratio) in logistic
regression in R.
2) how to obtain the predicted risk for a certain individual using
fitted regression model in R.
You obtain the predicted probabilities with something like:
predict(model, data.frame(x1="a", x2=30), type = "response")
See ?predict.glm
This would give the odds ratios (similar but larger than the risk
ratios):
exp(coef(model))
--
David Winsemius, MD
Alameda, CA, USA
______________________________________________
R-help@r-project.org mailing list
https://stat.ethz.ch/mailman/listinfo/r-help
PLEASE do read the posting guide http://www.R-project.org/posting-guide.html
and provide commented, minimal, self-contained, reproducible code.