Learn R Programming

spMC (version 0.2.2)

density.lengths: 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

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.

Rdversion

1.1

Details

The function estimates the empirical density of the stratum lengths for each category by the use of the kernel methodology.

References

Simonoff, J. S. (1996) Smoothing Methods in Statistics. Springer-Verlag.

See Also

getlen, density.default, plot.density.lengths, print.density.lengths

Examples

Run this code
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)

Run the code above in your browser using DataLab