There is a mismatch between the result we get and the documentation (which forces the user to look at the source code for interpretation):
SBF_result <- fdapace::SBFitting(
Y = .yk, # 𝑛: scalar response
X = .predictors, # 𝑛×𝑑: predictors
x = .estim_points, # 𝑁×𝑑: 𝑁 vector estimation points
K = "epan",
h = h,
supp = .fkj_support
)
SBF_result |> names()
[1] "SBFit" "mY" "NW" "mgnDens" "jntDens" "iterNum" "iterErr" "iterErrDiff"
[9] "critNum" "critErr" "critErrDiff"
whereas the documentation reads as follows:
Value:
A list containing the following fields:
SBFit: An _N_ by _d_ matrix whose column vectors consist of the
smooth backfitting component function estimators at the given
estimation points.
mY: A scalar of centered part of the regression model.
NW: An _N_ by _d_ matrix whose column vectors consist of the
Nadaraya-Watson marginal regression function estimators for
each predictor component at the given estimation points.
mgnDens: An _N_ by _d_ matrix whose column vectors consist of the
marginal kernel density estimators for each predictor
component at the given estimation points.
jntDens: An _N_ by _N_ by _d_ by _d_ array representing the
2-dimensional joint kernel density estimators for all pairs
of predictor components at the given estimation grid. For
example, ‘[,,j,k]’ of the object provides the 2-dimensional
joint kernel density estimator of the ‘(j,k)’-component of
predictor components at the corresponding _N_ by _N_ matrix
of estimation grid.
itemNum: The iteration number that the smooth backfitting algorithm
has stopped.
itemErr: The iteration error of the smooth backfitting algorithm that
represents the maximum L2 distance among component functions
in the last successive updates.
There is a mismatch between the result we get and the documentation (which forces the user to look at the source code for interpretation):
whereas the documentation reads as follows: