calc_autocorrelation: Calculate lagged autocorrelation

Description Usage Arguments Value Examples

View source: R/visualization.R

Description

Calculate lagged autocorrelation

Usage

1
2
3
4
5
6
7
8
9
calc_autocorrelation(
  data,
  lag_units = "weeks",
  lag_max = 52,
  use_lr = "ilr",
  alr_ref = NULL,
  resample = FALSE,
  resample_rate = 0.2
)

Arguments

data

a phyloseq object

lag_units

units of autocorrelation lag ("weeks", "months", "seasons")

lag_max

maximum lagged difference to evaluate

use_lr

log ratio representation ("ilr", "alr", "clr")

alr_ref

if using the additive log ratio (ALR), which reference taxon index to use

resample

use resampling for uncertainty estimation

resample_rate

percent of samples to randomly subsample if resampling

Value

data.frame of (bounded, if resampled) autocorrelation, indexed by lag in lag_units

Examples

1
lagged_ac <- calc_autocorrelation(data, lag_units="weeks", lag_max=52, use_lr="ilr", alr_ref=NULL, resample=FALSE, resample_rate=0.2)

kimberlyroche/ROL documentation built on Dec. 10, 2020, 2:18 a.m.