hatvalues.jglmm: Diagonal elements of the hat matrix

View source: R/extract.R

hatvalues.jglmmR Documentation

Diagonal elements of the hat matrix

Description

Returns the values on the diagonal of the hat matrix, which is the matrix that transforms the response vector (minus any offset) into the fitted values (minus any offset). Note that this method should only be used for linear mixed models. It is not clear if the hat matrix concept even makes sense for generalized linear mixed models.

Usage

## S3 method for class 'jglmm'
hatvalues(model, ...)

Arguments

model

An object of class 'jglmm', as returned by 'jglmm()'.

...

Optional additional arguments, currently none are used.

Value

A numeric vector containing the diagonal elements of the hat matrix.

Examples

## Not run: 
jglmm_setup()
lm1 <- jglmm(Reaction ~ Days + (Days | Subject), lme4::sleepstudy)
hatvalues(lm1)

## End(Not run)

mikabr/jglmm documentation built on Nov. 18, 2022, 1:32 a.m.