crs: A PACKAGE FOR NONPARAMETRIC SPLINE ESTIMATION IN R
Article first published online: 27 JAN 2014
Copyright © 2014 John Wiley & Sons, Ltd.
Journal of Applied Econometrics
Volume 29, Issue 2, pages 348–352, March 2014
How to Cite
Ho, A. T.Y., Huynh, K. P. and Jacho-Chávez, D. T. (2014), crs: A PACKAGE FOR NONPARAMETRIC SPLINE ESTIMATION IN R. J. Appl. Econ., 29: 348–352. doi: 10.1002/jae.2381
- Issue published online: 7 MAR 2014
- Article first published online: 27 JAN 2014
- Manuscript Accepted: 4 DEC 2013
- Manuscript Received: 12 NOV 2013
- Manuscript Revised: 12 NOV 2013
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.