Description Usage Arguments Value Examples
Finds the index of the largest leverage value
1 | hat_matrix(fit.model)
|
fit.model |
takes an R object, returned by lm |
A list containg the following components:
maximum hi - which subject has the maximum value of the leverage
hi>2*mean(H) - what subjects are outliers in the X space, and their leverage values
1 2 3 4 5 | ##Use demo_data (See ?demo_data for more information about the dataset)
m = lm(fev~A+H+M+S, data = demo_data)
hat_matrix(m)
hat_matrix(m)[1]
hat_matrix(m)[2]
|
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.