Learn R Programming

generalCorr (version 1.2.0)

abs_res: Absolute residuals of kernel regression of x on y.

Description

This internal function calls the kern function to implement kernel regression with the option residuals=TRUE and returns absolute residuals.

Usage

abs_res(x, y)

Arguments

x

vector of data on the dependent variable

y

vector of data on the regressor

Value

absolute values of kernel regression residuals are returned.

Details

The first argument is assumed to be the dependent variable. If abs_res(x,y) is used, you are regressing x on y (not the usual y on x)

Examples

Run this code
# NOT RUN {
set.seed(330)
x=sample(20:50)
y=sample(20:50)
abs_res(x,y)
# }

Run the code above in your browser using DataLab