boot_bw | R Documentation |
This set of functions is an alternative to the bootBW()
function. This set
attempts to make the blocked weighted bootstrap algorithm more efficient
through vectorisation and use of parallelisation techniques. The function
syntax has been kept consistent with bootBW()
for ease of transition. A
more in depth discussion of the efficiencies gained from this alternative
function is discussed here.
boot_bw(
x,
w,
statistic,
params,
outputColumns = params,
replicates = 400,
strata = NULL,
parallel = FALSE,
cores = parallelly::availableCores(omit = 1)
)
boot_bw_parallel(
x,
w,
statistic,
params,
outputColumns = params,
replicates = 400,
strata = NULL,
cores = parallelly::availableCores(omit = 1)
)
boot_bw_sequential(
x,
w,
statistic,
params,
outputColumns = params,
replicates = 400,
strata = NULL
)
boot_bw_weight(w)
boot_bw_sample_clusters(x, w, index = FALSE)
boot_bw_sample_within_clusters(cluster_df)
x |
A |
w |
A |
statistic |
Am estimator function operating on variables in |
params |
Parameters specified as names of columns in |
outputColumns |
Names to be used for columns in output |
replicates |
Number of bootstrap replicates to be performed. Default is 400. |
strata |
A character value for name of variable in |
parallel |
Logical. Should resampling be done in parallel? Default to FALSE. |
cores |
The number of computer cores to use or number of child processes to be run simultaneously. Default to one less than the available number of cores on current machine. |
index |
Logical. Should index values be returned or a list of
|
cluster_df |
A list of |
For boot_bw()
, a data.frame()
with number of columns equal to
length of outputColumns
; number of rows equal to number of replicates
;
and, names of variables equal to values of outputColumns
. For
boot_bw_weight()
, A data.frame()
based on w
with two additional
variables for weight
and cumWeight
. For boot_bw_sample_clusters()
,
either a vector of integers corresponding to the primary sampling unit
(psu) identifier of the selected clusters (when index = TRUE
) or a list
of data.frame()
s corresponding to the data for the selected clusters
(when index = FALSE
). For boot_bw_sample_within_clusters()
, a matrix
similar in structure to x
of resampled data from each selected cluster.
boot_bw(
x = indicatorsHH, w = villageData, statistic = bootClassic,
params = "anc1", replicates = 9, parallel = TRUE
)
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.