Range and sequence methods for probability distributions.
# S3 method for dpd
min(sf, infv=FALSE, …, freq=FALSE, n)
# S3 method for dpd
max(sf, infv=FALSE, …, freq=FALSE, n)
# S3 method for dpd
range(sf, infv=FALSE, …, freq=FALSE, n)# S3 method for cpd
min(sf, infv=FALSE, …)
# S3 method for cpd
max(sf, infv=FALSE, …)
# S3 method for cpd
range(sf, infv=FALSE, …)
# S3 method for dpduv
seq(sf, infv=FALSE, …, midpoints=TRUE, freq=FALSE, n)
# S3 method for cpduv
seq(sf, infv=FALSE, …, n=200)
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.
Logical, in function value. Except for quantile functions, where this refers to the probabilities. Refer to the details section.
Logical, if true, return midpoints. Ignored, except for discrete quantile functions with infv=TRUE. Refer to the details section.
Logical, if true, return frequencies. Ignored, except for PMFs/CDFs with infv=TRUE.
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.
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.
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.
Refer to the vignette for an overview, references and better examples.
Succinct Constructors Discrete Kernel Smoothing, Continuous Kernel Smoothing Categorical Distributions, Empirical-Like Distributions
# NOT RUN {
prep.ph.data ()
dfh <- pmfuv.dks (traffic.bins, traffic.freq)
seq (dfh)
seq (dfh, TRUE)
# }
Run the code above in your browser using DataLab