bootBW {bbw} | R Documentation |
Blocked Weighted Bootstrap
Description
The blocked weighted bootstrap (BBW) is an estimation technique for use with data from two-stage cluster sampled surveys in which either prior weighting (e.g. population proportional sampling or PPS as used in SMART surveys) or posterior weighting (e.g. as used in RAM and S3M surveys).
Usage
bootBW(x, w, statistic, params, outputColumns = params, replicates = 400)
Arguments
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. |
Value
A data.frame()
with:
number of columns equal to length of
outputColumns
;number of rows equal to number of
replicates
; and,'names equal to
outputColumns
.'
Examples
# Example call to bootBW function using RAM-OP test data:
bootBW(
x = indicatorsHH, w = villageData, statistic = bootClassic,
params = "anc1", outputColumns = "anc1", replicates = 9
)
# Example estimate with 95% CI:
#quantile(bootP, probs = c(0.500, 0.025, 0.975), na.rm = TRUE)