tensorBoot: Bootstrapping or Permuting a Data Tensor

Description Usage Arguments Details Value Author(s) Examples

View source: R/tensorBoot.R

Description

The function takes bootstrap samples or permutes its content along the last dimension of the tensor.

Usage

1

Arguments

x

Array of an order of at least two with the last dimension corresponding to the sampling units.

replace

Logical. Should sampling be performed with or without replacement.

Details

Assume an array of dimension r+1, where the last dimension represents the n sampling units and the first r dimensions the data per unit. The function then returns an array of the same dimension as x where either n bootstraps samples are selected or the units are permuted.

Value

The bootstrapped or permuted samples in an array with the same dimension as x.

Author(s)

Christoph Koesner

Examples

1
2
3
4
5
6
7
8
x <- array(1:50, c(2, 5, 5))
x
tensorBoot(x)
tensorBoot(x, replace = FALSE)

x <- array(1:100, c(2, 5, 2, 5))
x
tensorBoot(x)

tensorBSS documentation built on June 2, 2021, 9:08 a.m.