Learn R Programming

retistruct (version 0.5.9)

compute.kernel.estimate: Kernel estimate over grid

Description

Compute a kernel estimate over a grid and do a contour analsysis of this estimate. The contour heights the determined by finding heights that exclude a certain fraction of the probability. For example, the 95and it should enclose about 5are specified by the contour.levels option; by default they are c(5, 25, 50, 75, 95).

Usage

compute.kernel.estimate(Dss, phi0, fhat, compute.conc)

Arguments

Dss
List of datasets. The first two columns of each datasets are coordinates of points on the sphere in spherical polar (lattitude, phi, and longitude, lambda) coordinates. In the case kernel smoothing, there is a third column of val
phi0
Rim angle in radians
fhat
Function such as kde.fhat or kr.yhat to compute the density given data and a value of the concentration parameter kappa of the Fisher density.
compute.conc
Function to return the optimal value of the concentration parameter kappa given the data.

Value

  • A list containing
  • kappaThe concentration parameter
  • hA pseudo-bandwidth parameter, the inverse of the square root of kappa. Units of degrees.
  • flevelsContour levels.
  • labelsLabels of the contours.
  • gRaw density estimate drawn on non-area-preserving projection. Comprises locations of gridlines in Cartesian coordinates (xs and ys), density estimates at these points, f and location of maximum in Cartesian coordinates (max).
  • gpaRaw density estimate drawn on area-preserving projection. Comprises same elements as above.
  • contour.areasArea of each individual contour. One level may ahave more than one contour; this shows the areas of all such contours.
  • tot.contour.areasData frame containing the total area within the contours at each level.