Package: np 0.70-3

Jeffrey S. Racine

np: Nonparametric Kernel Smoothing Methods for Mixed Data Types

Nonparametric (and semiparametric) kernel methods that seamlessly handle a mix of continuous, unordered, and ordered factor data types. We would like to gratefully acknowledge support from the Natural Sciences and Engineering Research Council of Canada (NSERC, <https://www.nserc-crsng.gc.ca/>), the Social Sciences and Humanities Research Council of Canada (SSHRC, <https://www.sshrc-crsh.gc.ca/>), and the Shared Hierarchical Academic Research Computing Network (SHARCNET, <https://sharcnet.ca/>). We would also like to acknowledge the contributions of the GNU GSL authors. In particular, we adapt the GNU GSL B-spline routine gsl_bspline.c adding automated support for quantile knots (in addition to uniform knots), providing missing functionality for derivatives, and for extending the splines beyond their endpoints.

Authors:Jeffrey S. Racine [aut, cre], Tristen Hayfield [aut]

np_0.70-3.tar.gz
np_0.70-3.tar.gz(r-4.7-arm64)np_0.70-3.tar.gz(r-4.7-x86_64)np_0.70-3.tar.gz(r-4.6-arm64)np_0.70-3.tar.gz(r-4.6-x86_64)
np_0.70-3.tgz(r-4.6-emscripten)
manual.pdf |manual.html
card.svg |card.png
np/json (API)
NEWS

# Install 'np' in R:
install.packages('np', repos = c('https://cran.r-universe.dev', 'https://cloud.r-project.org'))

Bug tracker:https://github.com/jeffreyracine/r-package-np/issues

Uses libs:
  • openblas– Optimized BLAS
Datasets:
  • bw - Cross Country Growth Panel
  • bw.all - Cross-Sectional Data on Wages
  • bw.subset - Cross-Sectional Data on Wages
  • cps71 - Canadian High School Graduate Earnings
  • Engel95 - 1995 British Family Expenditure Survey
  • Italy - Italian GDP Panel
  • oecdpanel - Cross Country Growth Panel
  • wage1 - Cross-Sectional Data on Wages

On CRAN:

Conda:

openblas

9.98 score 46 packages 1.1k scripts 13k downloads 11 mentions 56 exports 12 dependencies

Last updated from:c3be8b5ff9. Checks:6 OK. Indexed: no.

TargetResultTimeFilesSyslog
linux-devel-arm64OK247
linux-devel-x86_64OK267
source / vignettesOK303
linux-release-arm64OK249
linux-release-x86_64OK258
wasm-releaseOK123

Exports:b.stardimBSgradientsnp_boot_controlnp_grid_controlnp_render_controlnp.pairsnp.pairs.plotnpcdensnpcdensbwnpcdenshatnpcdistnpcdistbwnpcdisthatnpcmstestnpconmodenpcopulanpdeneqtestnpdeptestnpindexnpindexbwnpindexhatnpksumnplsqregnplsqregbwnpplregnpplregbwnpplreghatnpqcmstestnpqregnpquantilenpregnpregbwnpreghatnpregivnpregivderivnpscoefnpscoefbwnpscoefhatnpsdeptestnpseednpsigtestnpsymtestnptgaussnpudensnpudensbwnpudenshatnpudistnpudistbwnpudisthatnpuniden.boundarynpuniden.reflectnpuniden.scnpunitestseuocquantile

Dependencies:bootcrscubaturelatticeMASSMatrixMatrixModelsquadprogquantregRcppSparseMsurvival

Entropy and Testing with np

Rendered fromnp_entropy_tests.Rmdusingknitr::rmarkdownon Jun 04 2026.

Last update: 2026-05-02
Started: 2026-05-02

Getting Started with np

Rendered fromnp_getting_started.Rmdusingknitr::rmarkdownon Jun 04 2026.

Last update: 2026-05-02
Started: 2026-05-02

Readme and manuals

Help Manual

Help pageTopics
Compute Optimal Block Length for Stationary and Circular Bootstrapb.star
Canadian High School Graduate Earningscps71
Local-Polynomial Basis Dimension HelperdimBS
1995 British Family Expenditure SurveyEngel95
Extract Gradientsgradients gradients.condensity gradients.condistribution gradients.npregression gradients.qregression gradients.singleindex
Italian GDP PanelItaly
Nonparametric Kernel Smoothing Methods for Mixed Data Typesnp-package np
Validated plot control helpersnp_boot_control np_grid_control np_render_control
Kernel Functions Used In 'np'np.kernels
Global Package Options for 'np'np.options
Cross-Validated Pairs Plot (Helper Functions)np.pairs np.pairs.plot
Kernel Conditional Density Estimation with Mixed Data Typesnpcdens npcdens.conbandwidth npcdens.default npcdens.formula
Kernel Conditional Density Bandwidth Selection with Mixed Data Typesnpcdensbw npcdensbw.conbandwidth npcdensbw.default npcdensbw.formula
Conditional Density Hat Operatornpcdenshat
Kernel Conditional Distribution Estimation with Mixed Data Typesnpcdist npcdist.condbandwidth npcdist.default npcdist.formula
Kernel Conditional Distribution Bandwidth Selection with Mixed Data Typesnpcdistbw npcdistbw.condbandwidth npcdistbw.default npcdistbw.formula
Conditional Distribution Hat Operatornpcdisthat
Kernel Consistent Model Specification Test with Mixed Data Typesnpcmstest
Kernel Modal Regression with Mixed Data Typesnpconmode npconmode.conbandwidth npconmode.default npconmode.formula plot.conmode predict.conmode
Kernel Copula Estimation with Mixed Data Typesas.data.frame.npcopula fitted.npcopula npcopula npcopula.default npcopula.formula plot.npcopula predict.npcopula print.npcopula se.npcopula summary.npcopula
Kernel Consistent Density Equality Test with Mixed Data Typesnpdeneqtest
Kernel Consistent Pairwise Nonlinear Dependence Test for Univariate Processesnpdeptest
Semiparametric Single Index Modelnpindex npindex.default npindex.formula npindex.sibandwidth
Semiparametric Single Index Model Parameter and Bandwidth Selectionnpindexbw npindexbw.default npindexbw.formula npindexbw.sibandwidth
Kernel Sums with Mixed Data Typesnpksum npksum.default npksum.formula npksum.numeric
Location-Scale Kernel Quantile Regression with Mixed Data Typesfitted.lsqregression gradients.lsqregression nplsqreg nplsqreg.default nplsqreg.formula nplsqreg.lsqregressionbandwidth plot.lsqregression predict.lsqregression print.lsqregression quantile.lsqregression residuals.lsqregression se.lsqregression summary.lsqregression
Bandwidth Selection for Location-Scale Kernel Quantile Regressionlsqregressionbandwidth nplsqregbw nplsqregbw.default nplsqregbw.formula nplsqregbw.lsqregressionbandwidth print.lsqregressionbandwidth summary.lsqregressionbandwidth
Partially Linear Kernel Regression with Mixed Data Typesnpplreg npplreg.default npplreg.formula npplreg.plbandwidth
Partially Linear Kernel Regression Bandwidth Selection with Mixed Data Typesnpplregbw npplregbw.default npplregbw.formula npplregbw.plbandwidth
Kernel Consistent Quantile Regression Model Specification Test with Mixed Data Typesnpqcmstest
Kernel Quantile Regression with Mixed Data Typesnpqreg npqreg.condbandwidth npqreg.default npqreg.formula plot.qregression predict.qregression
Kernel Univariate Quantile Estimationnpquantile
Kernel Regression with Mixed Data Typesnpreg npreg.default npreg.formula npreg.rbandwidth
Kernel Regression Bandwidth Selection with Mixed Data Typesnpregbw npregbw.default npregbw.formula npregbw.rbandwidth
Nonparametric Regression Hat Operatornpreghat npreghat.formula npreghat.npregression npreghat.rbandwidth predict.npreghat print.npreghat
Nonparametric Instrumental Regressionnpregiv
Nonparametric Instrumental Derivativesnpregivderiv
Smooth Coefficient Kernel Regressionnpscoef npscoef.default npscoef.formula npscoef.scbandwidth
Smooth Coefficient Kernel Regression Bandwidth Selectionnpscoefbw npscoefbw.default npscoefbw.formula npscoefbw.scbandwidth
Kernel Consistent Serial Dependence Test for Univariate Nonlinear Processesnpsdeptest
Set Random Seednpseed
Experimental Hat Operators for Semiparametric Estimatorsnpindexhat npplreghat npscoefhat
Kernel Regression Significance Test with Mixed Data Typesnpsigtest npsigtest.default npsigtest.formula npsigtest.npregression npsigtest.rbandwidth
Kernel Consistent Density Asymmetry Test with Mixed Data Typesnpsymtest
Truncated Second-order Gaussian Kernelsnptgauss
Kernel Density Estimation with Mixed Data Typesnpudens npudens.bandwidth npudens.default npudens.formula
Kernel Density Bandwidth Selection with Mixed Data Typesnpudensbw npudensbw.bandwidth npudensbw.default npudensbw.formula
Unconditional Density Hat Operatornpudenshat
Kernel Distribution Estimation with Mixed Data Typesnpudist npudist.dbandwidth npudist.default npudist.formula
Kernel Distribution Bandwidth Selection with Mixed Data Typesnpudistbw npudistbw.dbandwidth npudistbw.default npudistbw.formula
Unconditional Distribution Hat Operatornpudisthat
Kernel Bounded Univariate Density Estimation Via Boundary Kernel Functionsnpuniden.boundary
Kernel Bounded Univariate Density Estimation Via Data-Reflectionnpuniden.reflect
Kernel Shape Constrained Bounded Univariate Density Estimationnpuniden.sc
Kernel Consistent Univariate Density Equality Test with Mixed Data Typesnpunitest
Cross Country Growth Panelbw oecdpanel
General Purpose Plotting of Nonparametric Objectsplot.bandwidth plot.conbandwidth plot.np plot.plbandwidth plot.rbandwidth plot.scbandwidth plot.sibandwidth
Extract Standard Errorsse
Compute Quantilesuocquantile
Cross-Sectional Data on Wagesbw.all bw.subset wage1