Predict from a fitted LOWESS model at out-of-sample points
Usage
# S3 method for class 'Lowess'
predict(
object,
new_x,
outputs = NULL,
intervals = NULL,
seed = NULL,
extrapolation = "clamp",
max_extrapolation_distance = NULL,
max_neighbor_distance = NULL,
...
)Arguments
- object
A
Lowessobject, fitted (viafit) withretain_model = TRUEpassed toLowess.- new_x
Numeric vector of out-of-sample query points.
- outputs
Character vector selecting optional prediction components:
"se"and/or"derivative".NULL(default) returns only predicted values.- intervals
Interval options, created with
intervals_opts(or a named list with any ofconfidence,prediction,bootstrap). Confidence and prediction coverage levels are independent; for example,intervals_opts(confidence = 0.90, prediction = 0.99).NULL(default) disables intervals.- seed
Non-negative whole-number seed for bootstrap resampling.
NULL(default) uses a random seed.- extrapolation
Behavior for query points outside the training range:
"clamp"(default),"linear", or"error".- max_extrapolation_distance
Under
"linear"extrapolation, the maximum allowed distance beyond the training boundary beforepredicterrors instead of returning an unbounded value.NULL(default) disables the cap.- max_neighbor_distance
Maximum allowed distance to the farthest point in a query's local window before
predicterrors, catching in-range-but-sparse query points.NULL(default) disables the cap.- ...
Must be empty.