beta
a numeric vector of coefficients (default NULL)
x
a numeric vector of training data
xeval
a numeric vector of evaluation data
Density Basis Structure
These arguments control basis type and spline complexity for constrained density estimation.
basis
a character string (default basis="tensor")
indicating whether the additive or tensor product B-spline basis
matrix for a multivariate polynomial spline or generalized B-spline
polynomial basis should be used
degree
integer/vector specifying the polynomial degree of the
B-spline basis for each dimension of the continuous x (default
degree=2)
degree.min,degree.max
when elastic.max=FALSE the
minimum/maximum degree of the B-spline basis for each of the
continuous predictors (default degree.min=2,
degree.max=25)
knots
a character string (default knots="quantiles")
specifying where knots are to be placed. ‘quantiles’ specifies
knots placed at equally spaced quantiles (equal number of observations
lie in each segment) and ‘uniform’ specifies knots placed at
equally spaced intervals
segments
integer/vector specifying the number of segments of the
B-spline basis for each dimension of the continuous x
(i.e. number of knots minus one) (default segments=1, i.e. Bezier
curve)
segments.min,segments.max
when elastic.max=FALSE, the
minimum/maximum segments of the B-spline basis for each of the
continuous predictors (default
segments.min=1,segments.max=100)
Derivatives, Integration, And Quantiles
These arguments control derivative extraction, numerical integration, and quantile evaluation.
deriv
an integer l (default deriv=1) specifying
whether to compute the univariate lth partial derivative for
each continuous predictor (and difference in levels for each
categorical predictor) or not and if so what order. Note that if
deriv is higher than the spline degree of the associated
continuous predictor then the derivative will be zero and a warning
issued to this effect
deriv.index
an integer l (default deriv.index=1)
specifying the index (currently only supports 1) of the variable whose
derivative is requested
er
a scalar indicating the fraction of data range to extend
the tails (default 1/log(n), see extendrange for
further details)
n.integrate
the number of evenly spaced integration points on the extended range specified by er (defaults to 500)
quantile.seq
a sequence of numbers lying in \([0,1]\) on which quantiles from
the logspline distribution are obtained
Optimization Controls
These arguments control optimizer choice, restart behavior, elastic search limits, and penalties.
do.gradient
a logical value indicating whether or not to use
the analytical gradient during optimization (defaults to TRUE)
elastic.max
a single, non-missing logical condition indicating
whether to use ‘elastic’ search bounds. Numeric scalar
conditions retain their historical R interpretation, although
TRUE or FALSE is recommended
elastic.diff
an integer indicating how many units the optimal
degree/segment must lie from the respective elastic search bounds
max.attempts
maximum number of attempts to undertake if optim
fails for any set of initial parameters for each value of
nmulti
maxit
maximum number of iterations used by optim
method
see optim for details
nmulti
integer number of times to restart the process of finding extrema of
the cross-validation function from different (random) initial
points (default nmulti=1)
NOMAD
a single, non-missing logical condition which when TRUE calls
snomadr to determine the optimal degree and
segments. Numeric scalar conditions retain their historical R
interpretation, although TRUE or FALSE is recommended
penalty
the parameter to be used in the AIC criterion. The
method chooses the number of degrees plus number of segments
(knots-1) that maximizes 2*logl-penalty*(degree+segments). The
default is to use the penalty parameter of log(n)/2 (2
would deliver standard AIC, log(n) standard BIC)
random.seed
seeds the random number generator for initial
parameter values when optim is called
Support And Shape Controls
These arguments control support bounds and optional monotonicity constraints.
lbound,ubound
lower/upper bound for the support of the density. For example, if
there is a priori knowledge that the density equals zero to the left
of 0, and has a discontinuity at 0, the user could specify lbound =
0. However, if the density is essentially zero near 0, one does not
need to specify lbound
monotone
a logical value indicating whether modify
the standard B-spline basis function so that it is tailored for
density estimation (default TRUE)
monotone.lb
a negative bound specifying the lower bound on
the linear segment coefficients used when (monotone=FALSE)
Warnings And Progress
These arguments control warnings, verbosity, and displayed optimizer progress.
display.nomad.progress
a logical value indicating whether to
display the progress of the NOMAD solver (default display.nomad.progress=TRUE)
display.warnings
a logical value indicating whether to
display warnings (default display.warnings=TRUE)
verbose
a logical value which when TRUE produces verbose output
during optimization