tboot {tboot}R Documentation

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. By default, the dataset will come from the tweights object. 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' call.

fillMissingAug

Fill in missing augmentation with primary weights resampling.

Details

Bootstrap samples from a dataset using the tilted weights. Details are further described in the vignette.

Value

A simulated dataset with 'nrow' rows.

See Also

tweights

Examples

 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)

[Package tboot version 0.2.1 Index]