ResperClot {resper}R Documentation

Sample from a set of time window restricted permutations

Description

Sample from a set of permutations of points in time, where two elements cannot be juxtaposed if the lag between them is longer than a predefined time window

Usage

ResperClot(mat)

Arguments

mat A Boolean or 0-1 matrix with a ```tube'' structure following the rule:

i<j ==> A_{i,j+1} <= A_{i,j} <= A_{i+1,j}

(for the Boolean matrix, replace <= with ==>). The rows and columns of the matrix can be interpreted as time points, and corresponds to the situations where the elements are time points, and a permutation is not valid if an element i occurs before another one j when t(i)>t(j)+delta

. The matrix is given by the sequence and delta.

Value

A sequence of values corresponding to the row indices of verb+t+.

Note

The matrix is not checked for a tube structure when calling the function.

Author(s)

Johannes Hüsing

See Also

WithinDeltaMat, ResperByrow

Examples

##  No element may be shifted by more than two 
##  positions

mat <- toeplitz(c(rep(1,3), rep(0,3)))
perm <- ResperClot(mat)
perm

  

[Package resper version 0.3.2 Index]