Become an expert in R — Interactive courses, Cheat Sheets, certificates and more!
Get Started for Free

hatmatrix

Weight diagrams and the hat matrix for a local regression model.


Description

hatmatrix() computes the weight diagrams (also known as equivalent or effective kernels) for a local regression smooth. Essentially, hatmatrix() is a front-end to locfit(), setting a flag to compute and return weight diagrams, rather than the fit.

Usage

hatmatrix(formula, dc=TRUE, ...)

Arguments

formula

model formula.

dc

derivative adjustment (see locfit.raw)

...

Other arguments to locfit and locfit.raw.

Value

A matrix with n rows and p columns; each column being the weight diagram for the corresponding locfit fit point. If ev="data", this is the transpose of the hat matrix.

See Also


locfit

Local Regression, Likelihood and Density Estimation

v1.5-9.4
GPL (>= 2)
Authors
Catherine Loader [aut], Jiayang Sun [ctb], Lucent Technologies [cph], Andy Liaw [cre]
Initial release
2020-03-24

We don't support your browser anymore

Please choose more modern alternatives, such as Google Chrome or Mozilla Firefox.