boot.samples: Compute indicies for bootstrap resampling.

View source: R/boot.samples.R

boot.samplesR Documentation

Compute indicies for bootstrap resampling.

Description

This function computes a set of indicies for bootstrap resampling. It can be unconstrained or bootstrap within a group design.

Usage

boot.samples(DATA, DESIGN = NULL, constrained = FALSE)

Arguments

DATA

The original data matrix to be bootstrapped. Rows will be bootstrapped and are assumed to be observations.

DESIGN

A design matrix (in disjunctive coding). Only used if constrained is TRUE.

constrained

a boolean. If TRUE, bootstrap resampling will occur within groups as designated by the DESIGN matrix.

Value

a set of indicies to be used to be used as the bootstrap resampled indices.

Author(s)

Derek Beaton

See Also

boot.compute.fj and boot.ratio.test

Examples


	data(ep.iris)
	unconstrained.indices <- boot.samples(ep.iris$data)
	#ep.iris$data[unconstrained.indices,]
	constrained.indices <- boot.samples(ep.iris$data,DESIGN=ep.iris$design,constrained=TRUE)
	#ep.iris$data[constrained.indices,]	


InPosition documentation built on April 15, 2025, 9:07 a.m.