Learn R Programming

episplineDensity (version 0.0-1)

setup.softinfo: Set up softinfo for exponential epi-splines.

Description

The softinfo prescribes constraints imposed on the density estimate.

Usage

setup.softinfo(N = 10, order = 2, warn = FALSE, ...)

Arguments

N
Integer giving number of interior mesh points (knots) for the splines. Default 10.
order
Integer giving the order for the polynomial splines. Default 2, and only 2 is permitted right now.
warn
Logical: emit warnings when contradictory conditions are imposed? Currently ignored. It is easy to generate contradictory conditions and the code only tests for a few combinations.
...
A set of named arguments describing the possible values of soft information. The current possibilities are:
M
Numeric : number of points in each segment at which Fisher and other constraints are imposed

unimodal
Logical: if TRUE, require that the density be unimodal.

unimodaluppertail, unimodallowertail
Numeric. Impose unimodality only on the lower or upper floor (N * unimodallowertail) or floor (N * unimodaluppertail) segments.

monotone
Character: describes what sort of monotonicty is required. Possible values "nondecreasing" or "nonincreasing".

lowerboundsk, upperboundsk
Numeric, length N+1. Bounds on epiparameters s[0] through s[N]. See expepi for details. Default: -1000 for lower, +1000 for upper.

lowerboundak0, upperboundak0, lowerboundakp, upperboundakp
Numeric, length N. Lower and upper bounds on the linear coefficients (ak0) and quadratic coefficients (akp) of the splines.

continuous, continuousDiff, lsc, usc
Logicals. When TRUE, require continuity, continuous differentiability, or that the density be lower semi-continuous (lsc) or upper semi-continuous (usc).

pointwiseFisherLower, pointwiseFisherUpper
Numeric, length 1. Lower and upper bound on the value of slope/value at every point in every segment.

lowerdensityvalue, upperdensityvalue
Numeric vectors of length N giving lower and upper bounds on the density estimate inside segments.

lowerdensityvalueEndpt, upperdensityvalueEndpt
Numeric vectors of length N + 1 giving lower and upper bounds on the density estimate at segment end points.

lowerdensityvalueSpecific
Two-column numeric matrix. Each row has an x value and a density value and the density estimate is constrained to be at least lowerdensityvalueSpecific[j,2] at x = lowerdensityvalueSpecific[j,1] for each row j.

KLDivergenceUpper, KLDivergenceLower, KLDensity, KLDensityParams
Upper and lower bounds on the KL divergence of the density estimate from the density whose name is given as an R density function in KLDensity, e.g. dnorm, and whose parameters are given as a list in DLDensityParams, e.g. list (mean = 0, sd = 1)

upperbound1moment, upperbound2moment
Numeric; upper bounds on the first or second (non-central) moment of the estimate

Value

List with any specified values, plus any defaults (notably M = 5).

See Also

expepi