depan {epandist} | R Documentation |
Probability density function (pdf) for an uncensored epanechnikov distribution
Description
This function is simply a polynomial of second degree.
Usage
depan(x = 0, mu = 0, r = 5^0.5)
Arguments
x |
point on x-axis. |
mu |
mean of distribution. |
r |
half the range of the distribution, ie the distance from the mean to the smallest/largest value supported by the distribution. |
Value
point density associated with x
, mu
and r
.
Examples
#Probability distribution function, epanechnikov:
curve(depan(x),col='blue',ylim=c(0,.4),xlim=c(-3.5,3.5),yaxs='i',xaxs='i',
main='Probability distribution function',ylab='Probability')
#Probability distribution function, normal:
curve(dnorm(x),col='green',add=TRUE)
#Legend
legend(x=-3.5,y=.4,legend=c('Epanechnikov pdf','Normal pdf'),lty=c(1,1),col=c('blue','green'))
[Package epandist version 1.1.1 Index]