Learn R Programming

bootSVD (version 1.2)

genBootIndeces: Generate a random set of bootstrap resampling indeces

Description

Let \(n\) be the original sample size, \(p\) be the number of measurements per subject, and \(B\) be the number of bootstrap samples. genBootIndeces generates a (\(B\) by \(n\)) matrix containing \(B\) indexing vectors that can be used to create \(B\) bootstrap samples, each of size \(n\).

Usage

genBootIndeces(B, n)

Value

A (\(B\) by \(n\)) matrix of bootstrap indeces. Let bInds denote the output of getBootIndeces, and Y denote the original (\(p\) by \(n\)) sample. Then Y[,bInds[b,]] is the \(b^{th}\) bootstrap sample.

Arguments

B

number of desired bootstrap samples

n

size of original sample from which we'll be resampling.

Examples

Run this code
bInds<-genBootIndeces(B=50,n=200)

Run the code above in your browser using DataLab