Learn R Programming

SLBDD (version 0.0.4)

stepp: Stepp

Description

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.

Usage

stepp(
  x,
  M = 100,
  lmax = 5,
  alpha = 0.95,
  dismethod = "ACF",
  clumethod = "complete"
)

Arguments

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 <U+201C>ACF<U+201D>, <U+201C>PACF<U+201D>, <U+201C>AR.PIC<U+201D> and <U+201C>PER<U+201D>. Default is "ACF".

clumethod

Hierarchical clustering method: choices include <U+201C>single<U+201D>, <U+201C>average<U+201D>, and <U+201C>complete<U+201D>. Default is <U+201C>complete<U+201D>.

Value

Two plots are given in output:

The first plot shows the <U+201C>height<U+201D> 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 <U+201C>step<U+201D> 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.

Details

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.

Examples

Run this code
# NOT RUN {
data(TaiwanAirBox032017)
output <- stepp(as.matrix(TaiwanAirBox032017[,1:50]), M = 2)

# }

Run the code above in your browser using DataLab