stepp | R Documentation |
To compute and plot the observed and simulated distances for measuring similarity between time series. The distance can be computed using ACF, PACF, AR-coefficients, or Periodogram.
stepp( x, M = 100, lmax = 5, alpha = 0.95, dismethod = "ACF", clumethod = "complete" )
x |
T by k data matrix: T data points in rows with each row being data at a given time point, and k time series in columns. |
M |
Number of simulation realizations. Default value is 100. |
lmax |
Number of lags used (for ACF, PACF, AR-coefficient). Default value is 5. |
alpha |
Quantile used in the plotting. Default value is 0.95. |
dismethod |
Summary statistics of each time series to be used in computing distance. Choices include “ACF”, “PACF”, “AR.PIC” and “PER”. Default is "ACF". |
clumethod |
Hierarchical clustering method: choices include “single”, “average”, and “complete”. Default is “complete”. |
The Empirical Dynamic Quantile of the series is obtained, a set of Txk series is generated and the heights in the dendrogram are obtained. This is repeated M times and the alpha quantile of the results of the M simulations are reported. Both dendrogram's heights and steps (differences) of these heights are compared.
Two plots are given in output:
The first plot shows the “height” of the dendrogram. Solid line is the observed height. The points denote the alpha quantile of heights based on the simulated series.
The second plot shows the “step” of the dendrogam (increments of heights). Solid line is the observed increments and the points are those of selected quantile for the simulated series.
A list containing:
mh - alpha quantile of heights based on the simulated series.
mdh - increments of selected quantile for the simulated series.
hgt - observed height.
hgtincre - observed increments.
Mh - the alpha quantile of the results of the M simulations are reported.
data(TaiwanAirBox032017) output <- stepp(as.matrix(TaiwanAirBox032017[,1:50]), M = 2)
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.