Displaying 1 result from an estimated 1 matches for "ecdf1".
Did you mean:
ecdf
2009 Mar 18
0
modification of the function ecdf
...gamma distribution. However, I would like to minimize the distance by using
only the data between 0.1 and 0.9 quantiles. I cannot use ecdf in this case
as my sample is not a whole sample. Therefore I would like to modify the
function ecdf as it gives the ecdf between 0.1 and 0.9 quantiles. I wrote
ecdf1<-
function (x)
{
x <- sort(x)
k<-kuantile(x,c(0.1,0.9))
z<-x[x<=k[2]]
z<-z[z>=k[1]]
n <- length(x)
if (n < 1)
stop("'x' must have 1 or more non-missing values")
vals <- unique(z)
rval <- approxfun(...