Learn R Programming

msme (version 0.5.3)

hatvalues.msme: Function to return the hat matrix of a msme-class model.

Description

This function uses QR decomposition to determine the hat matrix of a model given its design matrix X. It is specific to objects of class msme.

Usage

# S3 method for msme
hatvalues(model, ...)

Arguments

model

A fitted model of class msme.

other arguments, retained for compatibility with generic method.

Value

An n*n matrix of hat values, where n is the number of observations used to fit the model. Needed to standardize the residuals.

References

Hilbe, J.M., and Robinson, A.P. 2013. Methods of Statistical Model Estimation. Chapman & Hall / CRC.

See Also

hatvalues

Examples

Run this code
# NOT RUN {
data(medpar)

ml.poi <- ml_glm(los ~ hmo + white,
                 family = "poisson",
                 link = "log",
                 data = medpar)

str(diag(hatvalues(ml.poi)))

# }

Run the code above in your browser using DataLab