Last data update: 2014.03.03

R: Display logistic coefficient table as odds ratios and...
toORR Documentation

Display logistic coefficient table as odds ratios and associated statistics.

Description

Following the glm command, toOR() displays a table of odds ratios and related statistics including exponentiated model confidence intervals.

Usage

toOR(object)

Arguments

object

name of the fitted glm function model

Format

object

The only argument is the name of the fitted glm function model

value

or

odds ratio of predictor

delta

Model standard error using delta method

zscore

z-statistic

pvalue

probability-value based on normal distribution

exp.loci

Exponentialed lower model confidence interval

exp.upci

Expontiated upper model confidence interval

Details

toOR is a post-estimation function, following the use of glm().

Value

list

Note

toOR must be loaded into memory in order to be effectve. As a function in LOGIT, it is immediately available to a user.

Author(s)

Joseph M. Hilbe, Arizona State University, and Jet Propulsion Laboratory, California Institute of technology

References

Hilbe, Joseph M. (2015), Practical Guide to Logistic Regression, Chapman & Hall/CRC.

See Also

glm

Examples

library(MASS)
 library(LOGIT)
 data(medpar)
 mylogit <- glm(died ~ los + white + hmo, family=binomial, data=medpar)
 summary(mylogit)
 toOR(mylogit)

Results


R version 3.3.1 (2016-06-21) -- "Bug in Your Hair"
Copyright (C) 2016 The R Foundation for Statistical Computing
Platform: x86_64-pc-linux-gnu (64-bit)

R is free software and comes with ABSOLUTELY NO WARRANTY.
You are welcome to redistribute it under certain conditions.
Type 'license()' or 'licence()' for distribution details.

R is a collaborative project with many contributors.
Type 'contributors()' for more information and
'citation()' on how to cite R or R packages in publications.

Type 'demo()' for some demos, 'help()' for on-line help, or
'help.start()' for an HTML browser interface to help.
Type 'q()' to quit R.

> library(LOGIT)
> png(filename="/home/ddbj/snapshot/RGM3/R_CC/result/LOGIT/toOR.Rd_%03d_medium.png", width=480, height=480)
> ### Name: toOR
> ### Title: Display logistic coefficient table as odds ratios and associated
> ###   statistics.
> ### Aliases: toOR
> ### Keywords: models
> 
> ### ** Examples
> 
> library(MASS)
>  library(LOGIT)
>  data(medpar)
>  mylogit <- glm(died ~ los + white + hmo, family=binomial, data=medpar)
>  summary(mylogit)

Call:
glm(formula = died ~ los + white + hmo, family = binomial, data = medpar)

Deviance Residuals: 
    Min       1Q   Median       3Q      Max  
-1.0258  -0.9436  -0.8655   1.3637   2.5948  

Coefficients:
             Estimate Std. Error z value Pr(>|z|)    
(Intercept) -0.593328   0.214017  -2.772  0.00557 ** 
los         -0.030088   0.007711  -3.902 9.54e-05 ***
white        0.255677   0.206801   1.236  0.21633    
hmo         -0.044626   0.149650  -0.298  0.76555    
---
Signif. codes:  0 '***' 0.001 '**' 0.01 '*' 0.05 '.' 0.1 ' ' 1

(Dispersion parameter for binomial family taken to be 1)

    Null deviance: 1922.9  on 1494  degrees of freedom
Residual deviance: 1902.9  on 1491  degrees of freedom
AIC: 1910.9

Number of Fisher Scoring iterations: 4

>  toOR(mylogit)
                or  delta  zscore pvalue exp.loci. exp.upci.
(Intercept) 0.5525 0.1182 -2.7723 0.0056    0.3632    0.8404
los         0.9704 0.0075 -3.9020 0.0001    0.9558    0.9851
white       1.2913 0.2670  1.2363 0.2163    0.8610    1.9367
hmo         0.9564 0.1431 -0.2982 0.7656    0.7132    1.2823
> 
> 
> 
> 
> 
> dev.off()
null device 
          1 
>