Learn R Programming

LOGIT (version 1.3)

P__disp: Display Pearson Chi2 and associated dispersion statistic following following use of glm.

Description

Following the glm() function with a grouped binomial or poisson family, or glm.nb(), P__disp() displays the Pearson Chi2 statistic and related dispersion statistic. Values of the dispersion greater than 1.0 indicate possible overdispersion; values under 1.0 indicate possible underdispersion.

Usage

P__disp(x)

Arguments

x
glm object

Value

  • [object Object],[object Object]

Details

P_disp is a post-estimation function, following the use of glm() or glm.nb(). Appropriate with grouped binomial or Poisson glm families.

References

Hilbe, Joseph M. (2015), Practical Guide to Logistic Regression, Chapman & Hall/CRC. Hilbe, Joseph M. (2014), Modeling Count Data, Cambridge University Press

See Also

glm

Examples

Run this code
library(MASS)
library(LOGIT)
data(titanicgrp)
class03 <- factor(titanicgrp$class, levels=c("3rd class", "2nd class", "1st class"))
died <- titanicgrp$cases - titanicgrp$survive
grptit <- glm( cbind(survive, died) ~ age+sex+class03, family=binomial,
data=titanicgrp)
summary(grptit)
P__disp(grptit)

Run the code above in your browser using DataLab