Description Usage Arguments Value Examples
This function calculates the expected value of a random censored epanechnikov-distributed variable with a given censoring point.
The inverse of this function is cepan
.
1 |
c |
censoring point. |
mu |
mean of distribution prior to censoring. |
r |
half the range of the distribution, ie the distance from the mean to the smallest/largest value supported by the distribution. |
side_censored |
indicates whether the variable is |
the expected value associated with c
, mu
and r
.
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 | #Expected value of an epan-distributed variable left-censored at 100 (given mu=100 and r=10):
evepan(c=100,mu=100,r=10)
#Expected value as a function of censoring point, epanechnikov distribution:
curve(evepan(c=x),col='blue',xlim=c(-sqrt(5),sqrt(5)),yaxs='i',xaxs='i',
main='Expected value as a function of censoring point',xlab='Censoring point',ylab='Expected value')
#Expected value as a function of censoring point, normal distribution:
curve(dnorm(x)+pnorm(x)*x,col='green',add=TRUE)
#Expected value as a function of censoring point, no uncertainty:
curve(1*x,col='grey',add=TRUE)
#Legend
legend(x=-sqrt(5),y=sqrt(5),legend=c('Epanechnikov','Normal distribution','No uncertainty'),
lty=c(1,1),col=c('blue','green','grey'))
|
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.