hat_matrix: hat_matrix

Description Usage Arguments Value Examples

View source: R/hat_matrix.R

Description

Finds the index of the largest leverage value

Usage

1
hat_matrix(fit.model)

Arguments

fit.model

takes an R object, returned by lm

Value

A list containg the following components:

Examples

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]

Jiaxin-Cara-Qian/testpackage documentation built on Dec. 18, 2021, 1:30 a.m.