Fits a model of the form \(\hat{f}(x) = \hat{g}_{1}(x_S) + \hat{g}_{2}(x_C)\) using backfitting.
Usage
backfitter(
X,
y,
predictor,
fitMethod,
predictfcn,
eps = 0.01,
iter.max = 10,
verbose = TRUE,
...
)Arguments
- X
The design matrix.
- y
The response vector.
- predictor
The name or index of the predictor of interest (\(x_S\)).
- fitMethod
A function that accepts
Xandyand returns a fitted model.- predictfcn
A function that accepts
objectandnewdataand returns predictions.- eps
Convergence threshold.
- iter.max
Maximum number of iterations.
- verbose
If
TRUE, prints progress messages.- ...
Additional arguments passed to
fitMethod.