Returns suitably lagged and iterated difference
diffx
computes simple differences.
rdffix
computes percentage differences.
ldiffx
computes logged differences.
diffx(x, n = 1L, order = 1L, rho = 1, fill = NA) rdiffx(x, n = 1L, order = 1L, rho = NULL, fill = NA) ldiffx(x, n = 1L, order = 1L, rho = 1, fill = NA)
x |
Univariate vector, numeric or ts object with only one dimension. |
---|---|
n |
Value indicating which lag to use. |
order |
Value indicating the order of the difference. |
rho |
Value indicating the autocorrelation parameter. The purpose of this parameter is to provide quasi-differencing assuming the value falls within 0 and 1. |
fill |
Numeric value(s) or function used to fill observations. |
#> [1] NA 2 4 12rdiffx(x)#> [1] NA 1.0 1.0 1.5ldiffx(x)#> [1] NA 0.6931472 0.6931472 0.9162907