np/npRmpi
Demos for functions in np/npRmpi
The following examples are a few of the demos included with the npRmpi package. These all use simulated data and were written to demonstrate how one modifies calls to functions in the np package in order to run them in parallel using the npRmpi package. The files *_serial.R are the standard (i.e. single core) versions that are run with the np package. The files *_npRmpi.R are the parallel versions (i.e. multi core) that are run with the npRmpi package. Note that you must install the np package (and optionally npRmpi) in order to run these examples, and you need a functioning MPI implementation in order to run the latter (see my website for further information about installing the npRmpi package).
Note that in the following examples a) there is timing information used for comparison purposes, and b) these are meant to tax a serial (single core) machine thereby demonstrating the benefits from running in parallel, so expect lengthy run-times with the serial version (i.e. up to a few minutes depending on the speed of your machine).
Least-squares cross-validated conditional density estimation (npcdensls_serial.R, npcdensls_npRmpi.R)
Consistent parametric model specification testing (npcmstest_serial.R, npcmstest_npRmpi.R)
Conditional mode estimation (npconmode_serial.R, npconmode_npRmpi.R)
Density equality test (npdeneqtest_serial.R, npdeneqtest_npRmpi.R)
Semiparametric single index model estimation (npindexich_serial.R, npindexich_npRmpi.R)
Semiparametric partially linear regression (npplreg_serial.R, npplreg_npRmpi.R)
Local linear regression with AIC bandwidth selection (npregllaic_serial.R, npregllaic_npRmpi.R)
Test for nonlinear serial dependence (npsdeptest_serial.R, npsdeptest_npRmpi.R)
Nonparametric significance test (npsigtest_serial.R, npsigtest_npRmpi.R)
Unconditional density estimation via likelihood cross-validation (npudensml_serial.R, npudensml_npRmpi.R)
Constrained local polynomial estimation (lp_k1_prodfunc.R, lp_k1.R, lp_radial_mean.R, lp_radial_deriv.R)
Here is a link to the vignette for the np package (np vignette), and here are some references that you may find useful:
Hayfield, T. and J.S. Racine (2008), “Nonparametric Econometrics: The np Package, Journal of Statistical Software, Volume 27, Number 5, 1-32.
Harrison, T.D (2008), “Review of np Software for R,” Journal of Applied Econometrics, Volume 23, 861-865.
Ho, A.T. and K.P. Huynh and D.T. Jacho-Chavez (2011), “npRmpi: A Package for Parallel Distributed Kernel Estimation in R,” Journal of Applied Econometrics, Volume 26, 344-349.