calculate_autocorrelation: Calculate autocorrelation after removal of each observation

Description Usage Arguments Value

View source: R/calculate_autocorrelation.R

Description

Conventionally, autocorrelation refers to the correlation between a signal and a delayed copy of that signal. In modern, autocorrelation is calculated as the correlation between the global interaction profile of a given node, represented as a vector of correlation coefficients to all other nodes in the network, before and after the removal of a given data point. The autocorrelation is calculated for each data point in turn, and observations that have a large impact on the global interaction profile are flagged as outliers.

Usage

1
2
calculate_autocorrelation(mat, min_pairs = 10, method = c("pearson",
  "kendall", "spearman"))

Arguments

mat

a numeric matrix, with nodes (e.g., analytes such as genes, proteins, or metabolites) in columns, and samples in rows

min_pairs

minimum number of paired, non-missing observations to calculate a correlation coefficient; correlations between vectors with fewer than this number of paired observations will be replaced with NA

method

the correlation coefficient to be computed; one of "pearson" (default), "kendall", or "spearman"; can be abbreviated

Value

a matrix with identical dimensions to the input matrix, containing the autocorrelation for each non-missing observation


skinnider/modern documentation built on Feb. 20, 2020, 1:52 p.m.