density.lengths | R Documentation |
The function estimates the empirical conditional density of the stratum lengths given the category.
## S3 method for class 'lengths'
density(x, ..., log = FALSE, zeros.rm = TRUE)
x |
an object of the class |
... |
other arguments to pass to the function |
log |
a logical value. If |
zeros.rm |
a logical value. If |
The function estimates the empirical density of the stratum lengths for each category by the use of the kernel methodology.
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.
Luca Sartore drwolf85@gmail.com
Simonoff, J. S. (1996) Smoothing Methods in Statistics. Springer-Verlag.
getlen
, density.default
, plot.density.lengths
, print.density.lengths
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)
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.