45_range_and_sequence_methods: Range and Sequence Functions In probhat: Multivariate Generalized Kernel Smoothing and Related Statistical Methods

Description

Range and sequence methods for probability distributions.

Usage

 ``` 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18``` ```## S3 method for class 'dpd' min(sf, infv=FALSE, ..., freq=FALSE, n) ## S3 method for class 'dpd' max(sf, infv=FALSE, ..., freq=FALSE, n) ## S3 method for class 'dpd' range(sf, infv=FALSE, ..., freq=FALSE, n) ## S3 method for class 'cpd' min(sf, infv=FALSE, ...) ## S3 method for class 'cpd' max(sf, infv=FALSE, ...) ## S3 method for class 'cpd' range(sf, infv=FALSE, ...) ## S3 method for class 'dpduv' seq(sf, infv=FALSE, ..., midpoints=TRUE, freq=FALSE, n) ## S3 method for class 'cpduv' seq(sf, infv=FALSE, ..., n=200) ```

Arguments

 `sf` A suitable function object. For min/max/range functions, this is any probability distribution (except chqf.cks), from this package. For seq functions, this is any univariate probability distribution, from the package. Refer to the references and see also sections. `infv` Logical, in function value. Except for quantile functions, where this refers to the probabilities. Refer to the details section. `midpoints` Logical, if true, return midpoints. Ignored, except for discrete quantile functions with infv=TRUE. Refer to the details section. `freq` Logical, if true, return frequencies. Ignored, except for PMFs/CDFs with infv=TRUE. `n` An integer. In the discrete case, it represents the sample size, and is ignored unless both infv and freq are TRUE. (If missing, it defaults to the number of observations used, or the sum of their unscaled weights/frequencies). In the continuous case, it represent the number of points in the resulting sequence. `...` Ignored.

Details

By default, the min/max, range and sequence methods apply to range of the random variable.
Often this the range of the observations plus/minus half the bandwidth at each end.

Calling the sequence method on a discrete quantile function, with infv=TRUE:

If midpoints is true, then midpoints of the intervals are returned.
If midpoints is false, then breakpoints, including the outermost values, are returned.

Each interval is defined by one consecutive pair of breakpoints.
Where the breakpoints are (unique) values from the CDF, including zero (at the start) and one (at the end).

In general, these sequences are not equally-spaced.

Calling the sequence method on a continuous quantile function, with infv=TRUE:

Simply returns a returns an equally-spaced sequence between zero and one.

Value

Integer types are returned for discrete probability distributions with infv=FALSE.
Otherwise, numeric types are returned.

In the univariate case:
The min and max methods return a single integer/numeric value.
The range methods return an length-two integer/numeric vector.

And in the multivariate case:
The min and max methods return an integer/numeric vector.
The range methods return a two column integer/numeric matrix.

And the seq methods return an integer/numeric vector.
This will be equally-spaced, if infv=FALSE.

References

Refer to the vignette for an overview, references and better examples.

 ```1 2 3 4 5 6``` ```prep.ph.data () dfh <- pmfuv.dks (traffic.bins, traffic.freq) seq (dfh) seq (dfh, TRUE) ```