Message-ID: <E9E702F2-ECF9-4C82-99B6-1778FBABDA3D@comcast.net>
Date: 2013-01-30T20:35:52Z
From: David Winsemius
Subject: Relative Risk in logistic regression
In-Reply-To: <CALbLLOOFKAxj655pAr8xJAnLCzYgsf+yxzQaHz5eThpLeV6WXg@mail.gmail.com>
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