Generalized Kernel Regularized Least Squares
Marginal Effects
Create the sketched kernel
Estimating Robust/Clustered Standard Errors with mgcv
Generalized Kernel Regularized Least Squares
Analytical Average Marginal Effects
Machine Learning with gKRLS
mlr3 integration
Predict Methods for gKRLS smooth
Constructor for gKRLS smooth
Kernel regularized least squares, also known as kernel ridge regression, is a flexible machine learning method. This package implements this method by providing a smooth term for use with 'mgcv' and uses random sketching to facilitate scalable estimation on large datasets. It provides additional functions for calculating marginal effects after estimation and for use with ensembles ('SuperLearning'), double/debiased machine learning ('DoubleML'), and robust/clustered standard errors ('sandwich'). Chang and Goplerud (2024) <doi:10.1017/pan.2023.27> provide further details.