Fit probability distributions, via continuous kernel smoothing, from data.
#univariate
pdfuv.cks (x, …, spline=TRUE,
bw.method="ph.default",
kernel=biweight.ckernel,
nc=30, bw, smoothness=1, w=NA)
cdfuv.cks (x, …, spline=TRUE,
bw.method="ph.default",
kernel=biweight.ckernel,
nc=30, bw, smoothness=1, w=NA)
qfuv.cks (x, …,
bw.method="ph.default",
kernel=biweight.ckernel,
nc=30, bw, smoothness=1, w=NA)#multivariate
pdfmv.cks (x, …,
bw.method="ph.default",
kernel=biweight.ckernel,
bw, smoothness=1, w=NA)
cdfmv.cks (x, …,
bw.method="ph.default",
kernel=biweight.ckernel,
bw, smoothness=1, w=NA)
#conditional
pdfc.cks (x, …, spline=TRUE,
bw.method="ph.default",
kernel=biweight.ckernel,
nc=30, bw, smoothness=1, w=NA,
conditions, preserve.range=FALSE,
warning=TRUE)
cdfc.cks (x, …, spline=TRUE,
bw.method="ph.default",
kernel=biweight.ckernel,
nc=30, bw, smoothness=1, w=NA,
conditions, preserve.range=FALSE,
warning=TRUE)
qfc.cks (x, …,
bw.method="ph.default",
kernel=biweight.ckernel,
nc=30, bw, smoothness=1, w=NA,
conditions, preserve.range=FALSE,
warning=TRUE)
#multivariate-conditional
pdfmvc.cks (x, …,
bw.method="ph.default",
kernel=biweight.ckernel,
bw, smoothness=1, w=NA,
conditions, preserve.range=FALSE,
warning=TRUE)
cdfmvc.cks (x, …,
bw.method="ph.default",
kernel=biweight.ckernel,
bw, smoothness=1, w=NA,
conditions, preserve.range=FALSE,
warning=TRUE)
#other
chqf.cks (x, …,
bw.method="ph.default",
kernel=biweight.ckernel,
nc=16, bw, smoothness=1, w=NA)
IN UNIVARIATE CONSTRUCTORS: Numeric vector of data. Also, can be a single-column numeric matrix, preferably with a column name.
IN OTHER CONSTRUCTORS: Numeric matrix, preferably, with column names.
Logical, if true, use cubic Hermite splines as intermediate models. In general, this should be true.
String, the bandwidth selection method. Refer to Bandwidth Selection.
Constructor for a ckernel (continuous kernel) object.
Integer, number of control points, in the spline. Ignored, if spline is false.
Numeric vectors of length one, or length m (the number of variables), the bandwidth and smoothness parameters. If bw is missing, the bandwidth is computed for each variable using bw.method (see above) and the smoothness.
Optional numeric vector of weights.
A numeric vector of conditioning values, preferably named. If named, then the names are matched against the variable names. If unnamed, then the first condition applies to the first variable, and the second condition applies to the second variable, and so on. Note that in univariate-conditional distributions, the number of conditions needs to equal the number of variables minus one.
Logical. If true, the default range used for range/sequence methods and plotting functions, will be the same as the original data. If false (the default), the range is based on the data within a conditioning window, which is often smaller.
Logical, if true, generate warning if there's no observations within the conditional window.
Ignored.
Self-referencing function objects.
Refer to Mockup Function Objects
Except: The constructors for conditional distributions, return NULL, if there's no observations within the conditional window. (And by default, generate a warning).
Refer to the vignette for more information.
Refer to the vignette for an overview, references and better examples.
Succinct Constructors Discrete Kernel Smoothing, Categorical Distributions, Empirical-Like Distributions
Conditional Distributions with Mixed Input Types These can be used for statistical classification purposes.
# NOT RUN {
ph.data.prep ()
cFht <- qfuv.cks (height)
cFht (0.5)
# }
Run the code above in your browser using DataLab