Learn R Programming

rapidsplithalf (version 0.6)

bootstrapWeights: Bootstrap Weights

Description

Create a matrix of bootstrap samples expressed as frequency weights

Usage

bootstrapWeights(size, times)

Value

A matrix with bootstrap samples expressed as frequency weights. Each column represents a single bootstrap iteration and each row represents a case.

Arguments

size

Number of values to bootstrap

times

Number of bootstraps

Examples

Run this code
# Rapidly compute a bootstrapped median to obtain its standard error
myweights<-bootstrapWeights(size=50, times=100)
meds<-mediansByWeight(x=rnorm(50),weights=myweights)
# SE
sd(meds)

Run the code above in your browser using DataLab