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

Description Usage Arguments Value Note Author(s) References See Also Examples

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

1
2
## S3 method for class '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.

Note

Leverages can be obtained as the diagonal of the output. See the examples.

Author(s)

Andrew Robinson and Joe Hilbe.

References

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

See Also

hatvalues

Examples

1
2
3
4
5
6
7
8
data(medpar)

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

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

msme documentation built on May 2, 2019, 5:07 a.m.

Related to hatvalues.msme in msme...