Calculate out of sample linear fit predictions using regularization. Zero indexed.
xlin_fits(x, y, w, i, j)
x | NumericVector, explanatory variable (length>=2). |
---|---|
y | NumericVector, values fit. |
w | NumericVector, weights (positive). |
i | integer, first index (inclusive). |
j | integer, j>=i+2 last index (inclusive); |
vector of predictions.
#> [1] 2.666715 1.285715 1.285712 2.666668