.BG
.FN density
.TL
Estimate Probability Density Function
.CS
density(x, n=50, window="g", width, from, to)
.AG x
vector of observations from distribution whose density is to
be estimated.
.AG n
the number of equally spaced points at which to estimate
density.
.AG window
character string giving the type of window used in
computation "cosine", "gaussian", "rectangular",
"triangular" (one character is sufficient).
.AG width
width of the window.  Default is width of histogram bar
constructed by Doane's rule.  The standard error
of a Gaussian window is `width'/4.
.AG from,to
the n estimated values of density are equally spaced between
`from' and `to'. Default is range of data extended by
`width*3/4' for gaussian window or `width/2' for other
windows.
.RT
list with two components, `x' and `y', suitable for giving as an argument
to one of the plotting functions.
.SP
.RC x
vector of `n' points at which density is estimated.
.RC y
density estimate at each `x' point.
.SH REFERENCE
Wegman, E. J. (1972),
"Nonparametric Probability Density Estimation",
.ul
Technometrics,
Vol. 14, pp. 533-546.
.EX
plot(density(x),type="b")
.KW dplot
.KW distribution
.WR
