LaggedCorrelation: Calculate pearson correlation coefficient between two data...

Description Usage Arguments Value

View source: R/LaggedCorrelation.R

Description

Calculate pearson correlation coefficient between two data sets for different lags.

Usage

1
LaggedCorrelation(x, y, lags, independent.obs = length(x), parallel = T)

Arguments

x

vector containing the independent variable

y

vector containing the depended variable

lags

vector of lag

independent.obs

number of independent observations. Defaults to length(x), when x or y is smoothed, the number of independent observations may be lower.

parallel

calculate in parallel, using the foreach package (default True)

Value

data frame containing the lag applied, the correlation coefficient (r), the p-value (p) and the number of independent observations used to calculate the p-value.


smu/smumisc documentation built on March 21, 2021, 3:38 a.m.