Description Usage Arguments Value
View source: R/analysis_functions.R
This function determines lag at which the cross correlation is highest
1 2 3 4 5 6 7 8 9 | cross_corr(
dat,
date_var = NULL,
grp_var,
x_var,
y_var,
max_lag = 20,
subset_date = NULL
)
|
dat |
data frame with columns that correspond to two time series and grouping variable(s) |
date_var |
character string of the column name that corresponds to the date variable date_var must be specified if subset_date is not null. |
grp_var |
character string of column names in dat to be used as grouping variable(s) |
x_var |
primary time series (should be a column in dat) |
y_var |
secondary time series (should be a column in dat) |
max_lag |
integer value of the number of lags to perform cross correlation for |
subset_date |
a character string of the same format as the date variable |
tibble of lags by grp_var
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.