Last chance! 50% off unlimited learning
Sale ends in
lag.pserie(x,k=1,...)
pserie
,x
containing the
lag values. NA
values are inserted at the correct positions.diff.pserie
library(Ecdat)
data(Produc)
Produc=pdata.frame(Produc,"state","year")
lag(Produc$pc)
lag(Produc$pc,k=2)
Run the code above in your browser using DataLab