# hatTrace

From lme4 v0.99875-8
by Douglas Bates

##### Extract the trace of the `hat' matrix

Extract the trace of the `hat' matrix from a fitted linear mixed model or generalized linear mixed model.

##### Usage

`hatTrace(x)`

##### Arguments

- x
- a fitted model object that inherits from the

classmer

##### Value

- The trace of the hat matrix at the parameter estimates. This is a measure of the complexity of the model, conditional on the relative variance components.

##### References

Spiegelhalter, D.J., Best, N.G., Carlin, B.P. and van der
Linde, A. (2002), "Bayesian measures of model complexity and fit (with
discussion)", *Journal of the Royal Statistical Society, part B*,
**64**, (4), 583-639.

##### Examples

`hatTrace(lmer(Reaction ~ Days + (1|Subject) + (0+Days|Subject), sleepstudy))`

*Documentation reproduced from package lme4, version 0.99875-8, License: GPL version 2 or later*

### Community examples

Looks like there are no examples yet.