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. Many thanks, in advance, for your help. Amin.
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. Many thanks, in advance, for your help. Amin.
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
I am curious why one would want risk ratios. Unlike odds ratios, they are not interpretable without reference to the base risk. For example a risk ratio of 2 cannot possibly apply to anyone with a starting risk exceeding 1/2. I think it is most helpful to use one of the existing nomograms to show someone how the base risk and odds ratio translate to final risk, for a range of base risk. Frank David Winsemius wrote> 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@> 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.----- Frank Harrell Department of Biostatistics, Vanderbilt University -- View this message in context: http://r.789695.n4.nabble.com/Relative-Risk-in-logistic-regression-tp4657040p4657163.html Sent from the R help mailing list archive at Nabble.com.
At 10:49 30/01/2013, 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.@TECHREPORT{lumley06, author = {Lumley, T and Kronmal, R and Ma, S}, year = 2006, title = {Relative risk regression in medical research: models, contrasts, estimators, and algorithms}, number = 293, institution = {{UW} Biostatistics Working Paper Series}, keywords = {glm, Poisson}, url = {http://www.bepress.com/uwbiostat/paper293} }>2) how to obtain the predicted risk for a certain individual using >fitted regression model in R. > >Many thanks, in advance, for your help. > >Amin.Michael Dewey info at aghmed.fsnet.co.uk http://www.aghmed.fsnet.co.uk/home.html