plot.DTDAni {DTDA.ni}R Documentation

plot.DTDAni

Description

S3 method to plot a DTDAni object by using the generic plot function.

Usage

## S3 method for class 'DTDAni'
plot(x, ecdf = FALSE, ...)

Arguments

x

DTDAni object.

ecdf

Whether to display the ordinary empirical cumulative distribution function or not. Default = FALSE.

...

Aditional parameters.

Acknowledgements

Author(s)

References

de Uña-Álvarez J. (2018) A Non-iterative Estimator for Interval Sampling and Doubly Truncated Data. In: Gil E., Gil E., Gil J., Gil M. (eds) The Mathematics of the Uncertain. Studies in Systems, Decision and Control, vol 142. Springer, Cham, pp. 387-400.

Examples


## Not run: 
N <- 250
x0 <- runif(N)             # Original data
u0 <- runif(N, -0.25, 0.5) # Left-truncation times
tau <- 0.75                # Interval width
v0 <- u0 + tau

x <- x0[u0 <= x0 & x0 <= v0]
u <- u0[u0 <= x0 & x0 <= v0]
v <- v0[u0 <= x0 & x0 <= v0]
n <- length(x)  # Final sample size after the interval sampling
res <- DTDAni(x, u , tau)
plot(res)
plot(res, ecdf = TRUE)

## End(Not run)


[Package DTDA.ni version 1.0.1 Index]