Description Usage Arguments Value Examples
hat matrix calculation of linear model
1
getHatMat(limo = NULL, X = NULL)
limo
lm object
lm
X
matrix respresenting the design matrix of a linear model
matrix
hat matrix
1 2 3 4 5 6 7
set.seed(42) y <- rnorm(10) x <- runif(10) mod <- lm(y ~ x) str(getHatMat(mod),1) str(getHatMat(X = as.matrix(cbind(interc=rep(1,10),x))),1)
Add the following code to your website.
REMOVE THIS Copy to clipboard
For more information on customizing the embed code, read Embedding Snippets.