Last data update: 2014.03.03

R: Creates a 2-dimensional density estimate or nonparametric...
latticeDensity-packageR Documentation

Creates a 2-dimensional density estimate or nonparametric regression surface.

Description

Lattice Density can take a region bounded externally with a polygon and possibly containing polygonal holes, along with a point pattern in the region, and produces a 2-dimensional density map. Given a set of locations each associated with a response, latticeDensity can produce a 2-dimensional nonparametric regression surface.

Details

Package: latticeDensity
Type: Package
Version: 1.0.5
Date: 2011-06-07
License: GPL-2
LazyLoad: yes

Author(s)

Ronald P. Barry <rpbarry@alaska.edu>

Examples

plot.new()
data(polygon1)

nodeFillingOutput = nodeFilling(poly=polygon1,node.spacing=0.02)
plot(nodeFillingOutput)
formLatticeOutput = formLattice(nodeFillingOutput)
plot(formLatticeOutput)

Pointdata = csr(polygon1,100)
Pointdata = Pointdata[Pointdata[,1]<0.5,]
plot(rbind(polygon1,polygon1[1,]),type="l")
points(Pointdata,pch=19)

out = crossvalDensity(formLatticeOutput,PointPattern=Pointdata, M=0.5,num.steps = 50)

densityOut = createDensity(formLatticeOutput,PointPattern=Pointdata, 
  k=out$k,intensity=FALSE, sparse = TRUE)
plot(densityOut)

homerange(densityOut, percent = 0.95)

Results