tensorBoot {tensorBSS} | R Documentation |
Bootstrapping or Permuting a Data Tensor
Description
The function takes bootstrap samples or permutes its content along the last dimension of the tensor.
Usage
tensorBoot(x, replace = TRUE)
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
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)
[Package tensorBSS version 0.3.8 Index]