edf: Empirical distribution function

Description Usage Arguments Details Value See Also Examples

Description

Empircal distribution function of left truncated data with known distribution.

Usage

1
edf(x, distn = NA, parm = NA, H = NA)

Arguments

x

a numerical vector of data values

distn

character string naming the distribution function

parm

list of distribution parameters

H

a treshold value

Details

edf is a version of ecdf allowing left truncated data. If distn is not assigned all other arguments except x are ignored and the result is exactly the same as of ecdf.

Value

A function of class "stepfun".

See Also

ecdf, dplot

Examples

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
12
set.seed(123)
treshold <- 10
xc <- rlnorm(30, meanlog = 2, sdlog = 1)    # complete sample
xt <- xc[xc >= treshold]                    # truncated sample

# the results are identical:
plot(edf(xc))
plot(ecdf(xc))

# considering truncated samples:
plot(edf(xt))   # wrong plot
plot(edf(xt, "plnorm", list(meanlog = 2, sdlog = 1), H = 10))

Example output

Loading required package: MASS

Attaching package: 'truncgof'

The following object is masked from 'package:stats':

    ks.test

truncgof documentation built on May 1, 2019, 10:54 p.m.

Related to edf in truncgof...