Learn R Programming

probhat (version 0.3.1)

23_continuous_kernel_smoothing: Continuous Kernel Smoothing Models

Description

Fit probability distributions, via continuous kernel smoothing, from data.

Usage

#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)

Arguments

x

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.

spline

Logical, if true, use cubic Hermite splines as intermediate models. In general, this should be true.

bw.method

String, the bandwidth selection method. Refer to Bandwidth Selection.

kernel

Constructor for a ckernel (continuous kernel) object.

nc

Integer, number of control points, in the spline. Ignored, if spline is false.

bw, smoothness

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.

w

Optional numeric vector of weights.

conditions

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.

preserve.range

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.

warning

Logical, if true, generate warning if there's no observations within the conditional window.

Ignored.

Value

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).

Details

Refer to the vignette for more information.

References

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

See Also

Continuous Kernels

Succinct Constructors Discrete Kernel Smoothing, Categorical Distributions, Empirical-Like Distributions

Conditional Distributions with Mixed Input Types These can be used for statistical classification purposes.

is.cks, print.phmodel, plot.cksuv, plot.cksmv

Bandwidth Selection

Examples

Run this code
# NOT RUN {
ph.data.prep ()

cFht <- qfuv.cks (height)
cFht (0.5)
# }

Run the code above in your browser using DataLab