Learn R Programming

msme (version 0.5.4)

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, ...)

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.

Arguments

model

A fitted model of class msme.

...

other arguments, retained for compatibility with generic method.

Author

Andrew Robinson and Joe Hilbe.

References

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

See Also

Examples

Run this code
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