Stefano <stecalza at tiscalinet.it> writes:>Hi all.
>
>A simple question.
>Is there a function to compute the Odds Ratio and its confidence intervall,
from
>a logistic model (glm(.......,family=binomial....). I've written my own,
but
>certainly someone did a better job.
I show a simple function to do this in my introductory notes available
from:
http://www.myatt.demon.co.uk
basically it is:
lreg.or <- function(model)
{
lreg.coeffs <- coef(summary(salex.lreg))
lci <- exp(lreg.coeffs[ ,1] - 1.96 * lreg.coeffs[ ,2])
or <- exp(lreg.coeffs[ ,1])
uci <- exp(lreg.coeffs[ ,1] + 1.96 * lreg.coeffs[ ,2])
lreg.or <- cbind(lci, or, uci)
lreg.or
}
--
Mark Myatt
-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-
r-help mailing list -- Read http://www.ci.tuwien.ac.at/~hornik/R/R-FAQ.html
Send "info", "help", or "[un]subscribe"
(in the "body", not the subject !) To: r-help-request at
stat.math.ethz.ch
_._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._