Learn R Programming

Kernelheaping (version 1.5)

dshapebivr: Bivariate Kernel density estimation for data classified in polygons or shapes

Description

Bivariate Kernel density estimation for data classified in polygons or shapes

Usage

dshapebivr(data, burnin = 2, samples = 5, adaptive = FALSE, shapefile,
  gridsize = 200)

Arguments

data
matrix with at least 3 columns: x-coordinate, y-coordinate (i.e. center of polygon) and number of observations in area Optional fourth column: ID-Variable if area consists of more than 1 polygon
burnin
burn-in sample size
samples
sampling iteration size
adaptive
TRUE for adaptive kernel density estimation
shapefile
shapefile with number of polygons equal to nrow(data)
gridsize
number of evaluation grid points

Value

  • The function returns a list object with the following objects (besides all input objects):
  • Mestimateskde object containing the corrected density estimate
  • gridxVector Grid of x-coordinates on which density is evaluated
  • gridyVector Grid of y-coordinates on which density is evaluated
  • resultDensityMatrix with Estimated Density for each iteration
  • resultXMatrix of true latent values X estimates