Fit probability distributions, via discrete kernel smoothing over integer-indexed frequency data.
NOTE THAT THESE OBJECTS ARE LIKELY TO BE CONVERTED TO S4 OBJECTS, IN THE NEAR FUTURE. ALSO, NOTE THAT THEIR INTERNAL STRUCTURE (THAT IS, THEIR ATTRIBUTES/SLOTS), IS SUBJECT TO CHANGE.
IN PRINCIPLE, YOU SHOULD NOT ACCESS ATTRIBUTES/SLOTS, DIRECTLY.
pmfuv.dks (x = 1:length (h), h=1, …,
bw, smoothness=1,
kernel=BIWEIGHT.CKERNEL,
bw.method="ph.default",
Xlim = c (a, b),
a = min1 (x), b=Inf)cdfuv.dks (x = 1:length (h), h=1, …,
bw, smoothness=1,
kernel=BIWEIGHT.CKERNEL,
bw.method="ph.default", tail="lower",
Xlim = c (a, b),
a = min1 (x), b=Inf)
qfuv.dks (x = 1:length (h), h=1, …,
bw, smoothness=1,
kernel=BIWEIGHT.CKERNEL,
bw.method="ph.default",
Xlim = c (a, b),
a = min1 (x), b=Inf)
Integer vector of integer-indexed discrete observations, or bins of such observations. (If duplicates, they, along with their frequencies, are aggregated). Also, can be a single-column integer matrix, preferably with a column (variable) name, and optionally with row (bin) names. Defaults to a sequence from one to the length of h.
Positive numeric vector of frequencies (or weights), which can be fractional. (If scalar, it's recycled to match the length of pre-aggregate x). Defaults to one, such that each x value represents a single discrete value.
Odd positive integer value, giving the bandwidth parameter. If missing, an initial bandwidth is computed via the the bandwidth method (see bw.method below), which is subject to the smoothness parameter.
Positive numeric value, giving the relative bandwidth. Ignored, if bw is provided.
A (continuous) kernel object.
String, the bandwidth selection method. Refer to Bandwidth Selection.
String, either "lower" or "upper". If lower (the default), lower tail probabilities, P (X <= x), are used. If upper, upper tail probabilities, P (X >= x), are used.
In principle, a length-two integer vector, giving the limits of X. But a numeric vector is allowed, to support -Inf/Inf. The corresponding random variable is regarded as bounded, if either limit is finite. In which case, a truncated smoothing algorithm is applied.
In principle, integer values. This is an alternative way of specifying Xlim, above. The min1 function will return one, if one is the minimum x value, otherwise, it will return zero.
Additional arguments not allowed.
Self-referencing function objects.
Refer to Runtime Function Objects
PLEASE SET NOTES IN DESCRIPTION FIELD.
Refer to the vignette for more information.
Note that if x has non-unique values, then duplicated x (and their h) values are aggregated. And currently, any row names will be ignored.
Also note that the truncation method may change in future updates.
Refer to the vignette for an overview, references and better examples.
Succinct Constructors Continuous Kernel Smoothing, Categorical Distributions, Empirical-Like Distributions
# NOT RUN {
prep.ph.data ()
dfh <- pmfuv.dks (traffic.bins, traffic.freq)
dFh <- cdfuv.dks (traffic.bins, traffic.freq)
dFht <- qfuv.dks (traffic.bins, traffic.freq)
plot (dfh)
plot (dfh, TRUE)
plot (dfh, freq=TRUE)
plot (dFh, freq=TRUE)
dFht (0.5)
# }
Run the code above in your browser using DataLab