data(simdata_lasso_binomial)
# JKn ---------------------------------------------------------------------
newdata <- replicate.weights(data = simdata_lasso_binomial,
method = "JKn",
cluster = "cluster",
strata = "strata",
weights = "weights",
rw.test = TRUE)
# dCV ---------------------------------------------------------------------
newdata <- replicate.weights(data = simdata_lasso_binomial,
method = "dCV",
cluster = "cluster",
strata = "strata",
weights = "weights",
k = 10, R = 20,
rw.test = TRUE)
# subbootstrap ------------------------------------------------------------
newdata <- replicate.weights(data = simdata_lasso_binomial,
method = "subbootstrap",
cluster = "cluster",
strata = "strata",
weights = "weights",
B = 100)
# BRR ---------------------------------------------------------------------
newdata <- replicate.weights(data = simdata_lasso_binomial,
method = "BRR",
cluster = "cluster",
strata = "strata",
weights = "weights",
rw.test = TRUE)
# split ---------------------------------------------------------------------
newdata <- replicate.weights(data = simdata_lasso_binomial,
method = "split",
cluster = "cluster",
strata = "strata",
weights = "weights",
R=20,
train.prob = 0.5,
method.split = "subbootstrap",
rw.test = TRUE)
# extrapolation -------------------------------------------------------------
newdata <- replicate.weights(data = simdata_lasso_binomial,
method = "extrapolation",
cluster = "cluster",
strata = "strata",
weights = "weights",
R=20,
train.prob = 0.5,
rw.test = TRUE)
Run the code above in your browser using DataLab