This function matches vectors of two different lengths
weight.lag(x1, x2)
x1 | a vector |
---|---|
x2 | a vector |
a matrix with two rows with the shortest length of the vector as the number of columns
weight.lag(1:5, 2:9)#> [,1] [,2] [,3] [,4] [,5] #> x1 1 2 3 4 5 #> x2 2 3 4 5 6#> [,1] [,2] [,3] [,4] #> x1 0 2 4 6 #> x2 4 6 8 10