tboot (version 0.2.0)

tboot: Function tboot

Description

Bootstrap nrow rows of dataset using the given row-level weights.

Usage

tboot(nrow, weights, dataset = weights$dataset, fillMissingAug = TRUE)

Arguments

nrow

number of rows in the new bootstrapped dataset.

weights

an object of class 'tweights' output from the 'tweights' function.

dataset

Data frame or matrix to bootstrap. Rows of the dataset must be in the same order as was used for the 'tweights' call. However the dataset may include additional columns not included in the 'tweights' calll.

fillMissingAug

fill in missing augmentation with primary weights resampling.

Value

A simulated dataset with 'nrow' rows.

Details

Bootstrap simulates a dataset using the tilted weights. Details a further documented in the vignette.

See Also

tweights

Examples

Run this code
# NOT RUN {
 target=c(Sepal.Length=5.5, Sepal.Width=2.9, Petal.Length=3.4)
 w = tweights(dataset = iris, target = target, silent = TRUE)
 simulated_data = tboot(nrow = 1000, weights = w)
# }

Run the code above in your browser using DataLab