density.lengths {spMC} | R Documentation |
Empirical Densities Estimation of Stratum Lengths
Description
The function estimates the empirical conditional density of the stratum lengths given the category.
Usage
## S3 method for class 'lengths'
density(x, ..., log = FALSE, zeros.rm = TRUE)
Arguments
x |
an object of the class |
... |
other arguments to pass to the function |
log |
a logical value. If |
zeros.rm |
a logical value. If |
Details
The function estimates the empirical density of the stratum lengths for each category by the use of the kernel methodology.
Value
An object of class density.lengths
is returned. It contains objects of class density
, the given direction of the stratum lengths and a logical value which points out if the density is computed for the logarithm of stratum lengths.
Author(s)
Luca Sartore drwolf85@gmail.com
References
Simonoff, J. S. (1996) Smoothing Methods in Statistics. Springer-Verlag.
See Also
getlen
, density.default
, plot.density.lengths
, print.density.lengths
Examples
data(ACM)
direction <- c(0,0,1)
# Compute the appertaining directional line for each location
loc.id <- which_lines(ACM[, 1:3], direction)
# Estimate stratum lengths
gl <- getlen(ACM$MAT3, ACM[, 1:3], loc.id, direction)
# Compute the empirical densities of stratum lengths
dgl <- density(gl)