getDev {mseq}R Documentation

Poisson deviance

Description

Calculate the deviance under Poisson model.

Usage

getDev(pred_count, real_count)

Arguments

pred_count the fitted or predicted counts
real_count the real counts in the data

Value

the deviance, a single numeric value

References

Hardin JW, Hilbe JM: Generalized Linear Models and Extensions. 2 edn. College Station, TX: Stata Press; 2007.

Examples

 # read and expand the data
 data(g1_part) # for real data, please use read.csv, like g1 <- read.csv("g1.csv")
 data <- expData(g1_part, 2, 3)

 null.count <- getNullCount(data)
 null.dev <- getDev(null.count, data$count)

[Package mseq version 1.1 Index]