Example from linear regression help (?lm)
 
ctl <- c(4.17,5.58,5.18,6.11,4.50,4.61,5.17,4.53,5.33,5.14)
trt <- c(4.81,4.17,4.41,3.59,5.87,3.83,6.03,4.89,4.32,4.69)
group <- gl(2,10,20, labels=c("Ctl","Trt"))
weight <- c(ctl, trt)
lm.D9 <- lm(weight ~ group)
lm.D90 <- lm(weight ~ group - 1)
 
prediction_error= lm.D90$residuals

--- On Wed, 30/1/13, aminreza Aamini <amin.r....@gmail.com> wrote:


From: aminreza Aamini <amin.r....@gmail.com>
Subject: [R] Relative Risk in logistic regression
To: "R-help" <R-help@r-project.org>
Date: Wednesday, 30 January, 2013, 4:19 PM


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.

______________________________________________
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.

        [[alternative HTML version deleted]]

______________________________________________
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.

Reply via email to