R: Display count model coefficient table as incidence rate...
toRR
R Documentation
Display count model coefficient table as incidence rate ratios and associated statistics.
Description
Following the glm or glm.nb commands, toRR() displays a table of incidence rate ratios and related statistics
including exponentiated model confidence intervals.
Usage
toRR(object)
Arguments
object
name of the fitted glm function model
Format
object
The only argument is the name of the fitted glm or glm.nb function model
or
incidence rate 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
toRR is a post-estimation function, following the use of glm() with the Poisson
or negative.binomial families, and following glm.nb().
Value
list
Note
toRR 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.
Hilbe, Joseph M. (2014), Modeling Count Data, Cambridge University Press.
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/toRR.Rd_%03d_medium.png", width=480, height=480)
> ### Name: toRR
> ### Title: Display count model coefficient table as incidence rate ratios
> ### and associated statistics.
> ### Aliases: toRR
> ### Keywords: models
>
> ### ** Examples
>
> library(MASS)
> library(LOGIT)
> data(medpar)
> medpar$los<-as.numeric(medpar$los)
> mypoi <- glm(los ~ white + hmo + factor(age80), family=poisson, data=medpar)
> summary(mypoi)
Call:
glm(formula = los ~ white + hmo + factor(age80), family = poisson,
data = medpar)
Deviance Residuals:
Min 1Q Median 3Q Max
-4.1497 -1.7828 -0.6709 0.8897 18.8565
Coefficients:
Estimate Std. Error z value Pr(>|z|)
(Intercept) 2.49348 0.02607 95.636 < 2e-16 ***
white -0.18587 0.02731 -6.805 1.01e-11 ***
hmo -0.14485 0.02375 -6.100 1.06e-09 ***
factor(age80)1 -0.07124 0.02032 -3.506 0.000456 ***
---
Signif. codes: 0 '***' 0.001 '**' 0.01 '*' 0.05 '.' 0.1 ' ' 1
(Dispersion parameter for poisson family taken to be 1)
Null deviance: 8901.1 on 1494 degrees of freedom
Residual deviance: 8800.5 on 1491 degrees of freedom
AIC: 14524
Number of Fisher Scoring iterations: 5
> toRR(mypoi)
rr delta zscore pvalue exp.loci. exp.upci.
(Intercept) 12.1033 0.3156 95.6360 0e+00 11.5003 12.7379
white 0.8304 0.0227 -6.8049 0e+00 0.7871 0.8760
hmo 0.8651 0.0205 -6.0996 0e+00 0.8258 0.9064
factor(age80)1 0.9312 0.0189 -3.5056 5e-04 0.8949 0.9691
>
>
>
>
>
> dev.off()
null device
1
>