Usage
kdensity(longitude,latitude,kilometer=FALSE,noplot=FALSE,
dmin=0,dmax=0,dlength=512,h=0,kern="gaussian",nsamp=0,
confint=TRUE,pval=.05)
Arguments
longitude
Longitude variable, in degrees.
latitude
Latitude variable, in degrees.
kilometer
If kilometer = T, measurements are in kilometers rather than miles. Default: kilometer = F.
noplot
If noplot = T, does not show the graph of the K-density function.
dmin
Minimum value for target distances. Default: dmin=0.
dmax
Maximum value for target distances. Default: dmin = max(distance), specified by setting dmin=0.
dlength
Number of target values for density calculations. Default: dlength = 512.
h
Bandwidth. Default:
(.9*(quantile(distance,.75)-quantile(distance,.25))/1.34)*(n^(-.20)), where n = 2*length(dvect).
kern
Kernel. Default: "gaussian ".
Other options from the density function are also available,
including "epanechnikov", "rectangular", "triangular", "biweight", and "optcosine".
The "cosine" kernel is translated to "optcosine".
nsamp
If nsamp>0, draws a random sample of lat-long pairs for calculations rather than the full data set.
Can be much faster for large samples. Default: use full sample.
confint
If TRUE, adds local confidence intervals to the graph. Default: confint=TRUE.
pval
p-value for confidence intervals. Default: pval=.05.