Learn R Programming

emax.glm (version 0.1.2)

dispersion: Pearson-based dispersion measurements of an 'em.glm' model.

Description

Pearson-based dispersion measurements of an 'em.glm' model.

Usage

dispersion(em.glm, x, y, weight)

Arguments

em.glm

An 'em.glm' object.

x

An n-by-p design matrix.

y

A vector of observation of length n.

weight

A n length vector of observation weight terms. This is currently designed to be either the exposure for a Poisson model or the number of trials for a Logistic model.

Value

A list of dispersion parameters for the model.

Examples

Run this code
# NOT RUN {
x <- model.matrix(~ factor(wool) + factor(tension), warpbreaks)
y <- warpbreaks$breaks
m <- em.glm(x = x, y = y, K = 2, b.init = "random")
dispersion(m, x, y, weight = c(1))

# }

Run the code above in your browser using DataLab