Start Here
Gallery of code for np, npRmpi, and crs
This site is meant to help you get to working code quickly. The sidebar is now organized by task rather than by old document names, and the search box should find function names such as npreg, npudens, crs, and npRmpi.init.
This gallery complements the package help pages, examples, and vignettes. The aim is simple: make it easy to see what each package is for, copy a small working example, and then move on to longer scripts only if you need them.
If you are new to these packages, start with Choose a Package. If you want runnable code immediately, go to Quickstarts. If you already know the method you want, go directly to Kernel Methods, MPI and Large Data, Splines, or Worked Examples.

This website is linked from my academic site and is intended as a practical working companion, not as a substitute for the package manuals or the underlying papers.
Recent Extensions
- Local polynomial workflows:
npandnpRmpinow support local polynomial capability across the conditional family, with joint selection of polynomial degrees and bandwidths for mixed data. - Bounded-support and proper conditional density/distribution methods: conditional density and distribution workflows now include bounded-kernel routes for known bounds and practical unknown-bound settings, plus
proper = TRUEfor proper local-polynomial conditional density/distribution estimates when degree exceeds zero. - Variability bounds on plots: Bonferroni and simultaneous bounds are new additions to the plotting surface, while
plot.errors.type = "all"now presents those together with the traditional pointwise bounds. - Interactive plotting surfaces:
renderer = "rgl"now supports interactive 3D rotation/zoom whenrglis installed,plot.rug = TRUEadds 1D/2D rugs, andplot.data.overlay = TRUE/FALSEcontrols whether the data are shown directly on y/x plots. - MPI operational routes:
npRmpiis no longer limited to the older profile/manual-broadcast interface; currentsessionandattachroutes let users work far more directly withnp-style code while retaining the profile route when needed.
Choose a Package
Start here if you are deciding between np, npRmpi, and crs, or if you want a quick route to the right tool.
Install and Get Started
Short install notes, a minimal first run, and pointers for what to do next once the packages are installed.
Quickstarts
Small runnable scripts for np, npRmpi, and crs, shown inline so you can copy directly from the page.
Kernel Methods
Core workflows for np, together with a clean route to npRmpi when jobs become larger or more time consuming.
MPI and Large Data
Updated guidance for npRmpi, with session mode now treated as the main interactive path rather than an afterthought.
Worked Examples
Copyable code snippets on the page, plus links to longer scripts when you want the full commented version.
Multivariate Regression
Mixed-data regression, partial plots, and prediction using wage1 as a practical first multivariate example.
FAQ and Troubleshooting
Common questions, support routes, and links to the current canonical sources.
Learn by topic
Kernel Primer
Short conceptual introduction to mixed-data kernels, bandwidth objects, and the basic np workflow.
Density, Distribution, Quantiles
Route to npudens, npudist, npcdens, npcdist, and npqreg workflows.
Semiparametric Models
Partially linear, single-index, and varying-coefficient workflows in one place.
Entropy and Testing
Overview of the entropy-based testing procedures and a small “roll your own” example.
Classification and Modes
Nonparametric classification and conditional-mode workflows, including the birthwt example.
Build With npksum
For users who want to construct custom kernel objects or estimators rather than only use the higher-level wrappers.
Spline Primer
Conceptual introduction to regression splines, knots, basis functions, and how that connects to crs.
Code Catalog
Broader script library across np, npRmpi, and crs, including older scripts and fuller worked examples beyond the first quickstarts.
Need help fast?
FAQ and Troubleshooting
Short answers to the most common “where do I start?” and “why is this happening?” questions.
Data Preparation
Variable classes, factors, ordered variables, formulas, and the data-typing mistakes that most often trip people up.
Runtime and Scaling
What to do when cross-validation, bootstrap, spline search, or large jobs become slow or memory-hungry.
Spline Search and Tuning
Practical crs advice on search size, smoothness, knots, and when to narrow the spline search space.
Notes
- Search should help if you know the function name but not where it lives.
- Quickstarts is the shortest route to a small runnable script.
- The reference page groups functions by task rather than repeating a long handwritten index.
- Additional resources, including books and papers, are collected on Books, Papers, and Citation.
Feedback is welcome. My academic page is experts.mcmaster.ca/display/racinej, and additional materials remain available at jeffreyracine.github.io/research.