randomize_pw: Pairiwise (Weak) randomisation of an interaction table

View source: R/Randomization_functions.R

randomize_pwR Documentation

Pairiwise (Weak) randomisation of an interaction table

Description

During pairwise randomisation, pairs of interaction strengths are kept intact but their location is reshuffled across the network. Intraspecific links and network topology are preserved.

Usage

randomize_pw(df, ij_col, ji_col)

Arguments

df

interaction table (created by interaction_strenghts())

ij_col

column of a_{ij} values to randomise (choose scaled or unscaled)

ji_col

column of a_{ji} values to randomise (scaled or unscaled)

Details

In the interaction table this means the following: a_{ij} and a_{ji} values that appear in the same row in the original table, will also be in the same row in the pairwise randomised table. However, they can switch from a_{ij} to a_{ji} and vice versa, which means above-below diagonal orientation can be reversed.

The function returns a new interaction table that contains two new columns $a_ij_pw and $a_ji_pw that contains the same values as the original columns but in a different order.

To get a pairwise randomised Jacobian matrix, use assemble_jacobian() and specify the new columns.

Value

Interaction table with two additional columns $a_ij_pw and $a_ji_pw, containing randomised interaction strengths


franzikoch/Feedbackloops documentation built on July 1, 2023, 12:42 p.m.