LagI | R Documentation |
Lags within clusters based on a time vector with possibly unequal intervals
LagI(x, id, time, lag = 1, delta = 0.01, check = T)
x |
vector to be lagged |
id |
clustering variable |
lag |
(default 1) |
delta |
(default .01) |
check |
(default TRUE) check for unique values of idx within each cluster |
idx |
time variable |
return the value of 'x' in the position 'idx - lag' in the same cluster calculated by intrapolation.
LagI
, DiffI
, Diff
,
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.