Hard-coded functions, representing (runtime) function objects.
DO NOT CALL THESE FUNCTIONS. CALL A CONSTRUCTOR, WHICH SHOULD RETURN A FUNCTION OBJECT. THE RESULTING FUNCTION OBJECTS SHOULD HAVE THE SAME ARGUMENTS AS BELOW.
#categorical models
#(CAT/gMIX)
ph.gfh.rtf (g, …, freq=FALSE, n) #PMF
ph.gFh.rtf (g, …, freq=FALSE, n) #CDF
ph.gFht.rtf (p, …, level.names=FALSE) #QF#other discrete models
#(DKS)
ph.dfh.rtf (x, …, freq=FALSE, n) #PMF
ph.dFh.rtf (x, …, freq=FALSE, n) #CDF
ph.dFht.rtf (p) #QF
#univariate continuous models
#(CKS/EL/xMIX, UV/C)
ph.cfh.rtf (x) #PDF
ph.cFh.rtf (x) #CDF
ph.cFht.rtf (p) #QF
#multivariate continuous models
#(CKS, MV/MVC)
ph.cfh.rtf.mv (x) #PDF
ph.cFh.rtf.mv (x) #CDF
#chained quantile functions
ph.chFht.rtf (p)
IN (DKS) MODELS: An integer vector, of quantiles. IN (CAT/gMIX) MODELS: An integer/factor/character vector, of quantiles. Integers represent category indices. Characters and formatted factors represent category names. IN (CKS/EL/xMIX, UV/C) MODELS: A numeric vector, of quantiles. IN (CKS, MV/MVC) MODELS: A numeric vector or matrix, of quantiles. Standard numeric vectors are rbind-ed into single-row matrices. Each row represents one evaluation point, and each column represents one variable.
A numeric vector of probabilities, between zero and one. Except in chained quantile functions, where p should be a numeric vector or matrix. Standard numeric vectors are rbind-ed into single-row matrices.
Logical, if true, return frequencies rather than probabilities.
Logical, if true, return category names rather than category indices. Refer to the value section.
Sample size. Ignored, unless freq is true.
Ignored.
By default: PMFs return a numeric vector, giving probability mass. PDFs return a numeric vector, giving probability density. CDFs return a numeric vector, giving cumulative probability (from zero to one). Discrete quantile functions, return an integer vector of quantiles. Continuous quantile functions, return a numeric vector of quantiles.
In the discrete case, setting freq=TRUE, scales the values to match the n, the sample size. By default, n is the number of observation used, or the sum of the unscaled weights/frequencies.
In categorical quantile functions, setting level.names=TRUE, returns a character vector of levels names.
Chained quantile functions, return a numeric matrix of multivariate quantiles.
DO NO CALL THESE FUNCTIONS. CALL A CONSTRUCTOR, WHICH SHOULD RETURN A FUNCTION OBJECT.
If x or p are matrices, then the order of the columns should be the same as the order of the random variables in the model.
Also, if a bounded interval was used, then the quantiles need to be within the limits.
Refer to the vignette for an overview, references and better examples.
Discrete Kernel Smoothing, Continuous Kernel Smoothing Categorical Distributions, Empirical-Like Distributions