Learn R Programming

LPWC (version 0.99.2)

corr.bestlag: Computes best lag correlation

Description

This function computes correlation based on best picked lags. The lags indicate delayed changes.

Usage

corr.bestlag(data, timepoints, max.lag = NULL, C = NULL, penalty = "high",
  iter = 10)

Arguments

data

a matrix with rows representing genes and columns representing different timepoints

timepoints

a vector of time points used in the dataset

max.lag

a integer value of the maximum lags allowed in the dataset, 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, if null, a default is computed based on the penalty argument

penalty

a factor with two levels high and low penalty on the weighted correlation

iter

an integer indicating the number of C values to test for low penalty

Value

a list containing weighted correlation and best lags used in each row

Examples

Run this code
# NOT RUN {
corr.bestlag(array(rnorm(30), c(5, 6)), max.lag = 1,
          timepoints = c(0, 5, 10, 15, 20, 25), C = 10, penalty = "high")


# }

Run the code above in your browser using DataLab