Skip to contents

Iterates \(g_j \leftarrow S_j(Y - \mu - \sum_{k \ne j} g_k)\). Additivity buys back the one-dimensional \(n^{-2/5}\) rate in any dimension. Components are centred every sweep because only their SUM is identified. Mirrors morie.fn.hrzbkft.

Usage

morie_backfitting(X, y, h = NULL, max_iter = 50L, tol = 1e-06)

Arguments

X

numeric covariate matrix.

y

numeric response.

h

bandwidth.

max_iter

sweeps.

tol

convergence tolerance.

Value

list: mu, components, fitted, n_iter, converged.

References

Horowitz, Ch. 2.

Examples

set.seed(1)
X <- matrix(runif(200), ncol = 2)
morie_backfitting(X, X[, 1]^2 + sin(3 * X[, 2]))$converged
#> [1] TRUE