Computes IDR predictions with bootstrap aggregating (bagging) or subsample aggregation (subagging).
idrbag(y, X, groups = setNames(rep(1, ncol(X)), colnames(X)), orders =
c("comp" = 1), stoch = "sd", pars = osqpSettings(verbose = FALSE, eps_abs =
1e-5, eps_rel = 1e-5, max_iter = 10000L), progress = TRUE, newdata,
digits = 3, interpolation = "linear", b, p, replace = FALSE, grid = NULL)
numeric vector (the response variable).
data frame of numeric or ordered factor variables (the regression covariates).
named vector of length ncol(X)
denoting groups of
variables that are to be ordered with the same order (see 'Details'). Only
relevant if X
contains more than one variable. The same names as in
X
should be used.
named vector giving for each group in groups
the order
that will be applied to this group. Only relevant if X
contains more
than one variable. The names of orders
give the order, the entries
give the group labels. Available options: "comp"
for componentwise
order, "sd"
for stochastic dominance, "icx"
for increasing
convex order (see 'Details). Default is "comp"
for all variables.
The "sd"
and "icx"
orders can only be used with numeric
variables, but not with ordered factors.
stochastic order constraint used for estimation. Default is
"sd"
for first order stochastic dominance. Use "hazard"
for
hazard rate order (experimental).
parameters for quadratic programming optimization (only relevant
if X
has more than one column), set using
osqpSettings
.
display progressbar (TRUE
, FALSE
or 1
,
0
)?
data.frame
containing variables with which to
predict. Ordered factor variables are converted to numeric for computation,
so ensure that the factor levels are identical in newdata
and in
X
.
number of decimal places for the predictive CDF.
interpolation method for univariate data. Default is
"linear"
. Any other argument will select midpoint interpolation (see
'Details' in predict.idrfit
). Has no effect for multivariate
IDR.
number of (su)bagging samples.
size of (su)bagging samples relative to training data.
draw samples with (TRUE
, 1
) or without
(FALSE
, 0
) replacement?
grid on which the predictive CDFs are evaluated. Default are
the unique values of y
.
A list of predictions, see predict.idrfit
.
This function draws b
times a random subsample of size
ceiling(nrow(X)*p)
) from the training data, fits IDR to each
subsample, computes predictions for the new data supplied in newdata
,
and averages the predictions derived from the b
subsamples. There are
no default values for b
and p
.