diff | R Documentation |
Returns suitably lagged and iterated differences.
# diff.spam(x, lag = 1, differences = 1, ...)
## S4 method for signature 'spam'
diff(x, lag = 1, differences = 1, ...)
x |
a |
lag |
an integer indicating which lag to use. |
differences |
an integer indicating the order of the difference. |
... |
further arguments to be passed to or from methods. |
A spam
matrix with elements similar to
as.spam(diff(as.matrix(x), ...))
.
Reinhard Furrer
diff
in base
, precmat
.
# incidence matrix for a RW(3) model
D <- diff.spam(diag.spam(10), lag=1, differences=3)
t(D)%*%D
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.