Description Usage Arguments Examples
Calculating correlation of two vectors with lag and lead periods. The correlations are used to determine the lag or lead effect between two variables. The correlation function uses "na.or.complete" method and calculate the Pearson's correlation.
1 |
x |
:the moving vector |
y |
:the fixed vector |
lag |
:number of lag periods |
lead |
:number of lead periods |
1 |
lag1 lag2 lag3 0 lead1 lead2 lead3
1 -0.4568483 -0.09564063 0.3799874 -0.852162 -0.3576969 -0.1025955 0.4523748
Warning messages:
1: In cv.lag(x, i) : NAs introduced by coercion
2: In cv.lag(x, i) : NAs introduced by coercion
3: In cv.lag(x, i) : NAs introduced by coercion
4: In cv.lead(x, i) : NAs introduced by coercion
5: In cv.lead(x, i) : NAs introduced by coercion
6: In cv.lead(x, i) : NAs introduced by coercion
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.