Density Estimation and Nonparametric Regression on Irregular Regions

Functions that compute the lattice-based density estimator of Barry and McIntyre, which accounts for point processes in two-dimensional regions with irregular boundaries and holes. The package also implements two-dimensional non-parametric regression for similar regions.


Version 1.0.0 Fixed the indexing of the demo latticeDensity Modified the function makeTmatrix so that the function runs even if some nodes have no links to the rest of the lattice. homerange now prints out the area of the homerange along with the proportion of the region that is inside the homerange.

Version 1.0.4 (June 6, 2011) Many new items in this version. Non-parametric regression has been implemented.
Many function names have been shortened (somewhat).
New functions include addQuantVar to add a spatial response variable to a non-parametric regression, crossvalNparReg to crossvalidate the non-parametric regression, createNparReg to perform the smoothing and predict.NparRegOut and plot.NparRegOut to produce predictions and plots for non-parametric regression. The package passes R CMD check, the demo runs properly, editLattice works and the help files are in fairly good shape. *This was the first version submitted and accepted at the CRAN repository.

Version 1.0.5 (June 7, 2011) Two examples in help files were improved (makeTmatrix and Tkp). Almost all examples were sped up so the checking process will run faster, usually by decreasing the number of steps checked under crossvalidation and by using a coarser grid. The components of the output of crossvalDensity were named ucv and k.

Version 1.0.6 (June 22, 2011) The predict.NparRegOut function was improved to make predictions at new locations. Homerange now has the option of output of node locations with a column that identifies the homerange. Finally, a new function deletedResid produces a column of residuals and deleted residuals for each observed response. This version was submitted to CRAN.

Version 1.0.7 (Jan. 6, 2011) When an array with unnamed columns was used as a boundary in nodeFilling, a warning was generated due to the columns not being labeled x and y. This even caused a warning to occur in the demo(density), though it did not affect results. I fixed the error. This version was submitted to CRAN.

Version 1.1.0 (Aug. 16, 2018) The latticeDensity package was extensively reworked, though most changes were internal.

  1. Automated all documentation using roxygen
  2. Added vignette
  3. Improved DESCRIPTION file, removed 'requires' from files
  4. Changed naming convention of functions and objects, especially to remove yyy.yyy names.
  5. added deletedResid function for deleted residuals
  6. removed most side-effects of functions
  7. used ptinpoly package to improve selection of nodes inside polygons, and the RANN package to find nearest neighbors.
  8. improved speed of nodeFilling.
  9. added an estimator of the sum of squared error (based on deleted residuals)
  10. improved look of plot.formLatticeOutput
  11. Added a set of automated tests
  12. added a function to compute Nardaraya-Watson estimated variance maps (varianceMap) This version was submitted to CRAN

Reference manual

It appears you don't have a PDF plugin for this browser. You can click here to download the reference manual.


1.2.6 by Ronald Barry, 9 months ago

Browse source code at

Authors: Ronald Barry <[email protected]>

Documentation:   PDF Manual  

Task views:

GPL-2 license

Imports splancs, spdep, spam, stats, utils, graphics, grDevices, sp, spatialreg, sf

Depends on spatstat, spatstat.geom

Suggests knitr, devtools, roxygen2, testthat, rmarkdown, rgdal

See at CRAN