best.lag: Best Lag

Description Usage Arguments Value Author(s) Examples

View source: R/bestlag.R

Description

best.lag computes the best lags for a dataset using weighted correlation. The lags obtained are in reference to the original timepoints.

Usage

1
best.lag(data, timepoints, max.lag = NULL, C)

Arguments

data

a matrix or data frame with rows representing genes and columns representing different timepoints. If data is a data frame, the gene names can be specified using the row.names().

timepoints

a vector of time points used in the dataset

max.lag

a numeric value of the maximum lag allowed, if null, defaults to the floor of the number of timepoints divided by 4

C

a numeric value of C used in computing weighted correlation

Value

a vector of best lags used in the dataset, one per gene

Author(s)

Thevaa Chandereng, Anthony Gitter

Examples

1
2
3
best.lag(data = array(rnorm(20), c(4, 5)), timepoints = c(0, 5, 10, 20, 40), C = 300)
best.lag(data = array(runif(100), c(5, 20)), timepoints = seq(2, 40, 2), C = 10)
best.lag(data = array(runif(100), c(5, 20)), timepoints = seq(2, 40, 2), max.lag = 2, C = 10)

gitter-lab/LPC documentation built on May 2, 2020, 4:33 a.m.