.BG
.VE $Header: /usr3/s/current/s/.help/RCS/density,v 1.2 83/12/30 19:27:26 rab Exp $
.FN density
.TL
density: Estimate Probability Density Function
.CS
density(x, n, window, width, from, to)
.PP
.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.  Default 50.
.AG window
character string giving the type of window used in
computation "cosine", "gaussian", "rectangular",
"triangular".  Default is "g" (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
.AG 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
plotting structure with two components, `x' and `y'.
.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 basic*
.KW plot*
.KW dplot*
.KW histogram
.KW distribution
.KW summary
.WR
