Learn R Programming

npsurv (version 0.3-3)

idf: Interval Distribution Function

Description

idf creates an object of class idf. An idf object stores a distribution function defined on a set of intervals.

Usage

idf(left, right, p)
## S3 method for class 'idf':
print(x, ...)

Arguments

left, right
left and right endpoints of intervals on which the distribution function is defined.
p
probabilities allocated to the intervals. Probability values will be normalized inside the function.
x
an object of class idf.
...
other arguments for printing.

Value

  • left, rightleft and right endpoints of intervals on which the distribution function is defined.
  • pprobabilities allocated to the intervals.

Details

When left and right endpoints are equal, the intervals reduce to points. print.idf prints an object of class idf as a three-coumn matrix.

See Also

icendata, Deltamatrix, npsurv.

Examples

Run this code
idf(1:5, 1:5*3-2, c(1,1,2,2,4))
npsurv(cbind(1:5, 1:5*3-2))$f    # NPMLE

Run the code above in your browser using DataLab