Name
delts — differentiates a ts
CALLING SEQUENCE
tsout=delts(arg1[,arg2])
PARAMETERS
- Input
arg1 = the order of differenciation (optional, set to 1 if not provided, can be > 0, =0 or < 0) or a ts
arg2 = a time series if the first argument was set to the order of differentiation
- Output
tsout = the differenciated time series
DESCRIPTION
Computes x(t)-x(t-n) for a timeseries x. Equivalent, but a little bit quicker than x-lagts(n,x)
EXAMPLE
load(GROCERDIR+'data\bdhenderic.dat')
y = delts(lm1)
// simple differentiation of the ts lm1
y = delts(1,lm1)
// simple differentiation of the ts lm1
y = delts(4,lm1)
// y=lm1-lm1(-4) (i.e: year on year difference)
y = delts(-3,lm1)
// y=lm1-lm1(+3)