depan: Probability density function (pdf) for an uncensored...

Description Usage Arguments Value Examples

Description

This function is simply a polynomial of second degree.

Usage

1
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. r=5^.5 corresponds to a standard deviation of 1.

Value

point density associated with x, mu and r.

Examples

1
2
3
4
5
6
7
8
9
#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'))

epandist documentation built on May 2, 2019, 4:55 a.m.