Description Usage Arguments Details Value Examples

This function lags the all series in `x`

according to their cross-
correlation with `y`

.

1 | ```
choose_lag(x, y, lag.max = 0.5)
``` |

`x` |
Array containing the IMFs to lag. |

`y` |
vector containing the response with which to maximize the correlation. |

`lag.max` |
The maximum lag to consider relatively to the mean period of each IMF. |

In this function, the lag is determined automatically for each IMF
in `x`

. The lag chosen is the one maximizing the cross-correlation
(in absolute value) between the IMF and `y`

.

For each IMF in `x`

, the maximum lag considered in the search
is lag.max * IMF period (rounded). For example, for an IMF of mean period
10 and `lag.max = 0.5`

, the maximum lag considered is 5.

An array with the same dimensions as `x`

containing the lagged
IMFs. In addition contains an attribute `lag`

storing the lags chosen
for each IMF.

1 2 | ```
choose_lag(cos(3:22), cos(1:20))
choose_lag(cos(2:21), cos(1:20))
``` |

Embedding an R snippet on your website

Add the following code to your website.

For more information on customizing the embed code, read Embedding Snippets.