Learn R Programming

mpcmp (version 0.3.6)

model.matrix.cmp: Extract the Design Matrix from a COM-Poisson Model Fit

Description

Extract the Design Matrix from a COM-Poisson Model Fit

Usage

# S3 method for cmp
model.matrix(object, ...)

Arguments

object

an object class 'cmp' object, obtained from a call to glm.cmp

...

other arguments passed to or from other methods (currently unused).

Value

The method will return the saved model.matrix used when fitting the cmp model.

Examples

Run this code
# NOT RUN {
data(attendance)
M.attendance <- glm.cmp(daysabs~ gender+math+prog, data=attendance)
model.matrix(M.attendance)

# }
# NOT RUN {
data(sitophilus)
M.sit <- glm.cmp(formula = ninsect ~ extract, formula_nu = ~extract, data = sitophilus)
model.matrix(M.sit)
# }

Run the code above in your browser using DataLab