jumps {mistr} | R Documentation |
Probability mass points
Description
Function returns a vector of points where a mass of probability is present.
These points are then used in plot
and plotgg
calls.
Usage
jumps(O, interval)
## S3 method for class 'discrdist'
jumps(O, interval)
## S3 method for class 'trans_discrdist'
jumps(O, interval)
## S3 method for class 'contdist'
jumps(O, interval)
## S3 method for class 'trans_contdist'
jumps(O, interval)
## S3 method for class 'mixdist'
jumps(O, interval)
## S3 method for class 'trans_mixdist'
jumps(O, interval)
## S3 method for class 'compdist'
jumps(O, interval)
## S3 method for class 'trans_compdist'
jumps(O, interval)
Arguments
O |
distribution object. |
interval |
interval in which the support of discrete elements should be found. |
Value
Vector of values.
Note
The function is designed in a way that it rather returns more than less. Thus it might return a value that is close to the interval but not in. This is for use of the package not a problem as jumps is internally used only in plots and quantile function of a mixture distribution where an additional value can not influence the output.
Examples
B <- binomdist(12, 0.4)
P <- poisdist(2)
I <- c(-7, 16.8)
jumps(B, I)
jumps(P, I)
[Package mistr version 0.0.6 Index]