eecop_boot | R Documentation |
Given a fitted model for the weight function, eecop_boot()
generates a
number of bootstrap replicates from this model. A multiplier bootstrap
procedure is used. The result can be passed to predict.eecop_boot()
to
generate bootstrapped predictions, or conf_int()
to compute confidence
intervals directly.
eecop_boot(object, n_boot = 100, rxi = stats::rexp, cores = 1)
## S3 method for class 'eecop_boot'
predict(
object,
x,
type = "expectile",
t = 0.5,
trafo = function(y) y,
cores = 1,
...
)
conf_int(
object,
x,
type = "expectile",
t = 0.5,
trafo = function(y) y,
conf = 0.9,
cores = 1,
...
)
object |
a fitted eecop object. |
n_boot |
number of bootstrap replicates. |
rxi |
a function generating bootstrap multipliers; the function needs to
take the number of samples as its first argument and return a numeric
vector of this length. Default is |
cores |
an integer for the number of cores to use; if |
x |
covariate values to predict on; must match the format used for
fitting the |
type |
either |
t |
a vector of quantile/expectile levels. |
trafo |
a function with signature |
... |
unused. |
conf |
confidence level. |
An objecvt of class eccop_boot
containing the original eecop
object and bootstrap replicates.
eecop()
, predict.eecop_boot()
# model with continuous variables
x <- matrix(rnorm(200), 100, 2)
y <- rowSums(x) + rnorm(100)
fit <- eecop(y, x)
bs_fits <- eecop_boot(fit, n_boot = 2)
preds <- predict(bs_fits, x[1:3, ])
CI <- conf_int(bs_fits, x[1:3, ], type = "quantile", t = c(0.5, 0.9))
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.