KernelSmooth_cfg {tidyhte} | R Documentation |
Configuration for a Kernel Smoother
Description
KernelSmooth_cfg
is a configuration class for non-parametric local-linear
regression to construct a smooth representation of the relationship between
two variables. This is typically used for displaying a surface of the conditional
average treatment effect over a continuous covariate.
Kernel smoothing is handled by the nprobust
package.
Super class
tidyhte::Model_cfg
-> KernelSmooth_cfg
Public fields
model_class
The class of the model, required for all classes which inherit from
Model_cfg
.neval
The number of points at which to evaluate the local regression. More points will provide a smoother line at the cost of somewhat higher computation.
eval_min_quantile
Minimum quantile at which to evaluate the smoother.
Methods
Public methods
Method new()
Create a new KernelSmooth_cfg
object with specified number of evaluation points.
Usage
KernelSmooth_cfg$new(neval = 100, eval_min_quantile = 0.05)
Arguments
neval
The number of points at which to evaluate the local regression. More points will provide a smoother line at the cost of somewhat higher computation.
eval_min_quantile
Minimum quantile at which to evaluate the smoother. A value of zero will do no clipping. Clipping is performed from both the top and the bottom of the empirical distribution. A value of alpha would evaluate over [alpha, 1 - alpha].
Returns
A new KernelSmooth_cfg
object.
Examples
KernelSmooth_cfg$new(neval = 100)
Method clone()
The objects of this class are cloneable with this method.
Usage
KernelSmooth_cfg$clone(deep = FALSE)
Arguments
deep
Whether to make a deep clone.
See Also
Examples
## ------------------------------------------------
## Method `KernelSmooth_cfg$new`
## ------------------------------------------------
KernelSmooth_cfg$new(neval = 100)