crs

Demos for functions in crs

The following examples are a few of the demos included with the crs package. These all use simulated data, the categorical B-spline estimator, and were written to demonstrate functionality and graphics. Note that the files *_rgl.R require that the rgl package be installed in addition to the crs package itself. 

  1. Cross-validated regression spline estimation of the bivariate radial function plotted using OpenGL (radial_rgl.R) (this creates the figure displayed on the page associated with the `Home' menu item above - you can click on that figure to view a larger image)

  2. Cross-validated regression spline estimation of the bivariate sine function plotted using OpenGL (sine_rgl.R)

  3. Constrained regression spline estimation (radial_constrained_mean.R)

  4. Constrained regression spline estimation (radial_constrained_first_partial.R)

  5. Constrained regression spline estimation (radial_constrained_second_partial.R)

Here is a link to the vignette for the crs package (crs vignette), and here is a reference that you may find useful:

Nie, Z. and J.S. Racine (2012), “The crs Package: Nonparametric Regression Splines for Continuous and Categorical Predictors,” The R Journal, Volume 4, Issue 2, 48-56.