Get residuals from a 'trendfilter' object.

# S3 method for trendfilter
residuals(obj, lambda = NULL, x_eval = NULL, zero_tol = NULL, ...)

Arguments

obj

Object of class trendfilter.

lambda

One or more lambda values to compute residuals for. Defaults to lambda = NULL, in which case, residuals are computed for all hyperparameter values in obj$lambda.

x_eval

Vector of inputs where the trend filtering model(s) will be evaluated. Defaults to x_eval = NULL, in which case x_eval = obj$x.

zero_tol

Threshold parameter that controls the point at which a small coefficient value is set to zero. Defaults to zero_tol = 1e-10.

...

Additional named arguments. Currently unused.