powered by
This internal function calls the kern function to implement kernel regression with the option residuals=TRUE and returns absolute residuals.
kern
residuals=TRUE
abs_res(x, y)
absolute values of kernel regression residuals are returned.
vector of data on the dependent variable
vector of data on the regressor
Prof. H. D. Vinod, Economics Dept., Fordham University, NY
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)
abs_res(x,y)
if (FALSE) { set.seed(330) x=sample(20:50) y=sample(20:50) abs_res(x,y) }
Run the code above in your browser using DataLab