Description Usage Arguments Details Value Author(s) References See Also Examples
Computes the dissimilarity between two time series in terms of their Linear Predicitive Coding (LPC) ARIMA processes.
1 2 3 4 |
x |
Numeric vector containing the first of the two time series. |
y |
Numeric vector containing the second of the two time series. |
k |
Number of cepstral coefficients to be considered. |
order.x |
Numeric matrix. Specifies the ARIMA models to be fitted for the series x. When using |
order.y |
Numeric matrix. Specifies the ARIMA ARIMA models to be fitted for the series y. When using |
seasonal.x |
A list of |
seasonal.y |
A list of |
permissive |
Specifies whether to force an AR order of 1 if no order is found. Ignored if neither order.x or order.y are NULL |
If order.x
or order.y are NULL
, their respective series will be fitted automatically using a AR model.
order.x
and order.y
contain the three components of the ARIMA model: the AR order, the degree of differencing and the MA order, specified as in the function arima
.
seasonal.x
and seasonal.y
are lists with two components: 'order' and 'period'. See seasonal
parameter of arima
, except that specification using a numeric vector
of length 3 is not allowed.
If using diss
function with "AR.LPC.CEPS" method
, the argument order
must be used instead of order.x
and order.y
. order
is a matrix with one row per series, specified as in arima
. If order
is NULL
, automatic fitting imposing a AR model is performed. The argument seasonal
is used instead of seasonal.x
and seasonal.y
. seasonal
is a list of elements, one per series in the same order that the series are input. Each element of seasonal
must have the same format as the one in arima
.
The computed distance.
Pablo Montero Manso, José Antonio Vilar.
Kalpakis, K., Gada D. and Puttagunta, V. (2001) Distance measures for effective clustering of arima time-series. Proceedings 2001 IEEE International Conference on Data Mining, 273–280.
Montero, P and Vilar, J.A. (2014) TSclust: An R Package for Time Series Clustering. Journal of Statistical Software, 62(1), 1-43. http://www.jstatsoft.org/v62/i01/.
diss.AR.PIC
, diss.AR.MAH
, diss
1 2 3 4 5 6 7 8 9 10 11 12 13 14 | ## Create three sample time series
x <- arima.sim(model=list(ar=c(0.4,-0.1)), n =100, n.start=100)
y <- arima.sim(model=list(ar=c(0.9)), n =100, n.start=100)
z <- arima.sim(model=list(ar=c(0.5, 0.2)), n =100, n.start=100)
## Compute the distance and check for coherent results
diss.AR.LPC.CEPS(x, y, 25) #impose an AR automatically selected for both series
#impose an ARIMA(2,0,0) for series x and an AR automatically selected for z
diss.AR.LPC.CEPS(x, z, 25, order.x = c(2,0,0), order.y = NULL )
diss.AR.LPC.CEPS(y, z, 25)
#create a dist object for its use with clustering functions like pam or hclust
diss( rbind(x,y,z), METHOD="AR.LPC.CEPS", k=20, order=rbind(c(2,0,0), c(1,0,0), c(2,0,0)),
seasonal=list( list(order=c(1,0,0), period=1), list(order=c(2,0,0), period=3),
list(order=c(1,0,0), period=1)) )
|
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.