lag a ts ignoring NA values
ts=lagda(arg1[,arg2])
* arg1 = the order of differenciation (optional, set to 1 if not provided) or a ts
* arg2 (if arg1 was he order of differenciation) = a time series
* ts = the lagged time series
load('GROCERDIR\data\Daily_P.dat') y = lagda(P) // y is P lagged once. y = lagda(4,P) // y is x lagged four times. y = lagda(-1,x) // y is P forwarded once. | ![]() | ![]() |