Skip to content

Odds Ratio from Logistic Model

2 messages · stefano iacus, Mark Myatt

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

Thank you in advance,

Stefano


***********************************************
Stefano Calza
Istituto di Statistica Medica e Biometria
Universit? degli Studi di Milano
Via G. Venezian, 1
20133 Milano

tel. +39 02/2361302, 02/70600908
fax 02/2362930

-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-
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
_._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._
9 days later
#
Stefano <stecalza at tiscalinet.it> writes:
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
_._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._