Learn R Programming

crs

This is the R package `crs' (Categorical Regression Splines) written and maintained by Jeffrey S. Racine (racinej@mcmaster.ca) with the invaluable assistance of Zhenghua Nie.

Installation

You can install the stable version on CRAN:

install.packages('crs', dependencies = TRUE)

Or download the zip ball or tar ball, decompress and run R CMD INSTALL on it, or install then use the devtools package to install the development version:

library(devtools); install_github('R-Package-crs', 'JeffreyRacine')

Note Windows users have to first install Rtools, while OS X users have to first install Xcode and the command line tools (in OS X 10.9 or higher, once you have Xcode installed, open a terminal and run xcode-select --install).

For more information on this project please visit the maintainer's website (https://www.socialsciences.mcmaster.ca/people/racinej).

Release Validation

CRAN-ready release claims should use the shared release gate:

cd /Users/jracine/Development
./release_protocol/run_crs_release_gate.sh

The gate builds the source tarball, installs it into a private library, runs installed smoke tests, runs tarball-first R CMD check --as-cran, records reverse-dependency inventory, and runs the containerized rchk native-code protection check when feasible (RUN_RCHK=auto by default).

For changes touching src/, NOMAD interface code, registered native interfaces, or .C/.Call payload lifetimes, require local rchk proof when infrastructure is available:

cd /Users/jracine/Development
RUN_RCHK=1 ./release_protocol/run_crs_release_gate.sh

Use RUN_RCHK=auto for ordinary full release rehearsal; it records a precise SKIP when Docker/rchk infrastructure is unavailable.

Copy Link

Version

Install

install.packages('crs')

Monthly Downloads

7,243

Version

0.15-46

License

GPL (>= 3)

Issues

Pull Requests

Stars

Forks

Maintainer

Jeffrey Racine

Last Published

August 19th, 2026

Functions in crs (0.15-46)

crs_nomad_api

Native NOMAD C API for package authors
crs

Categorical Regression Splines
crshat

CRS Hat Operator
Engel95

1995 British Family Expenditure Survey
crsiv

Nonparametric Instrumental Regression
crssigtest

Regression Spline Significance Test with Mixed Data Types
crs-package

Nonparametric Regression Splines with Continuous and Categorical Predictors
crsivderiv

Nonparametric Instrumental Derivatives
clsd

Categorical Logspline Density
cps71

Canadian High School Graduate Earnings
tensor.prod.model.matrix

Utility functions for constructing tensor product smooths
plot.crs

Plot Categorical Regression Spline Fits
krscvNOMAD

Categorical Kernel Regression Spline Cross-Validation
glp.model.matrix

Utility function for constructing generalized polynomial smooths
gsl.bs

GSL (GNU Scientific Library) B-spline/B-spline Derivatives
wage1

Cross-Sectional Data on Wages
frscv

Categorical Factor Regression Spline Cross-Validation
krscv

Categorical Kernel Regression Spline Cross-Validation
frscvNOMAD

Categorical Factor Regression Spline Cross-Validation
snomadr

R interface to NOMAD
uniquecombs

Find the unique rows in a matrix