crs: A PACKAGE FOR NONPARAMETRIC SPLINE ESTIMATION IN R
crs是R语言的一个软件包,提供基于样条的非参数回归函数估计,支持连续和分类变量,集成了数据驱动的样条阶数、节点数和带宽选择方法,适用于大数据量、少量离散协变量的应用场景。
SUMMARY crs is a library for R written by Jeffrey S. Racine (Maintainer) and Zhenghua Nie. This add‐on package provides a collection of functions for spline‐based nonparametric estimation of regression functions with both continuous and categorical regressors. Currently, the crs package integrates data‐driven methods for selecting the spline degree, the number of knots and the necessary bandwidths for nonparametric conditional mean, IV and quantile regression. A function for multivariate density spline estimation with mixed data is also currently in the works. As a bonus, the authors have also provided the first simple R interface to the NOMAD (‘nonsmooth mesh adaptive direct search’) optimization solver which can be applied to solve other mixed integer optimization problems that future users might find useful in other settings. Although the crs package shares some of the same functionalities as its kernel‐based counterpart—the np package by the same author—it currently lacks some of the features the np package provides, such as hypothesis testing and semiparametric estimation. However, what it lacks in breadth, crs makes up in speed. A Monte Carlo experiment in this review uncovers sizable speed gains compared to its np counterpart, with a marginal loss in terms of goodness of fit. Therefore, the package will be extremely useful for applied econometricians interested in employing nonparametric techniques using large amounts of data with a small number of discrete covariates. Copyright © 2014 John Wiley & Sons, Ltd.