get_denominator: Get denominator of association indices

View source: R/convenience_functions.R

get_denominatorR Documentation

Get denominator of association indices

Description

For many functions, the denominator of association indices is needed, rather than the final network. This function allows to user to easily extract these.

Usage

get_denominator(data, index = "SRI", data_format = "SP", return = "vector")

Arguments

data

The association data.

index

The association index to use, one of "SRI", "HWI", and "BII".

data_format

Character, indicating what form the data is in.

return

Character, indicating whether a vector or square matrix should be returned

Details

Data format can be either "SP" or "GBI", the two main data formats used by "asnipe". Passing index = "SRI" returns the denominator of the simple ratio index, index = "HWI" returns half-weight index, while index = "BII" uses a "both-identified" index.

Value

Either a vector of denominators (if return = "vector") or a square matrix of denominators (if return = "matrix").


MNWeiss/aninet documentation built on Jan. 31, 2023, 3:55 a.m.