residualize.lowess: Residualize a lowess function

Description Usage Arguments Value Author(s) References Examples

View source: R/residualize.lowess.R

Description

This function will create an approximate fitted function for a lowess line, then residualize the Y based on the fit of the model

Usage

1
residualize.lowess(x, y, return.fitted)

Arguments

x

The predictor of interest

y

The outcome of interest

Value

A list of residuals

Author(s)

Dustin Fife

References

This function was developed by Glen_b on Stack Overflow

Examples

1
2
3
4
5
6
7
data(airquality)
head(airquality)
attach(airquality)
plot(Wind, Temp)
lines(lowess(Wind, Temp), col="red")
residuals = residualize.lowess(Wind, Temp)
plot(Wind, residuals)

dustinfife/fifer documentation built on Oct. 31, 2020, 3:36 p.m.