perm_matrix: Permutation Matrix

View source: R/perm_matrix.R

perm_matrixR Documentation

Permutation Matrix

Description

Generates matrix for permutaitons. Each row is a permutation. Makes it easy to do block permutations. Repeated lines are avoided. Original ordering is always the last row.

Usage

perm_matrix(nobs, nperm, block_size = NULL, seed = NULL)

Arguments

nobs

number of observations to permute

nperm

number of permutations, including original data ordering.

block_size

Desired block size for block permutation.

seed

seed to be fed into set.seed function

Value

matrix for use in permutation methods. Each row is one permutation


jcortesr/PerMuTe documentation built on July 31, 2023, 8:03 a.m.