Learn R Programming

epandist (version 1.1.1)

cepan: Calculate censoring point

Description

This function calculates the censoring point of a random censored epanechnikov-distributed variable associated a given expected value. The inverse of this function is evepan.

Usage

cepan(ev, mu = 0, r = 5^0.5, side_censored = "left")

Arguments

ev
expected value.
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. r=5^.5 corresponds to a standard deviation of 1.
side_censored
indicates whether the variable is left or right censored. Default is side_censored='left'

Value

the censoring point associated with ev, mu and r.

Examples

Run this code
#Censoring point of a left-censored epan-distributed variable
#with an expected value of 3 (given mu=0 and r=16):
cepan(ev=3,mu=0,r=16)

#Censoring point of a right-censored epan-distributed variable
#with an expected value of 103 (given mu=100 and r=32):
cepan(ev=94,mu=100,r=32,side_censored="right")
#Results are usually not an integer though and rarely coinciding with mu

Run the code above in your browser using DataLab