Useful for the conditional outcome stage of TMLE / AIPW.
Usage
kernel_cond_moments(x, y, x_eval, bandwidth, return_variance = TRUE)
Arguments
- x
Numeric covariate vector.
- y
Numeric outcome vector.
- x_eval
Evaluation grid.
- bandwidth
Positive bandwidth.
- return_variance
Logical; if FALSE, only the mean is returned.
Value
Either a numeric vector (mean only) or a list with
mean and variance.