dis_var_1 | R Documentation |
dis_cor
returns a pairwise distance matrix based on a generalization of the
dissimilarity introduced by \insertCitepiccolo1990distance;textualmlmts.
dis_var_1(X, max_p = 1, criterion = "AIC", features = FALSE)
X |
A list of MTS (numerical matrices). |
max_p |
The maximum order considered with respect to the fitting of VAR models. |
criterion |
The criterion used to determine the VAR order. |
features |
Logical. If |
Given a collection of MTS, the function returns the pairwise distance matrix,
where the distance between two MTS \boldsymbol X_T
and \boldsymbol Y_T
is defined
as
d_{VAR}(\boldsymbol X_T, \boldsymbol Y_T)=||\widehat{\boldsymbol \theta}^{\boldsymbol X_T}_{VAR}-
\widehat{\boldsymbol \theta}^{\boldsymbol Y_T}_{VAR}||,
where \widehat{\boldsymbol \theta}^{\boldsymbol X_T}_{VAR}
and \widehat{\boldsymbol \theta}^{\boldsymbol Y_T}_{VAR}
are vectors
containing the estimated VAR parameters for \boldsymbol X_T
and \boldsymbol Y_T
, respectively. If VAR models of
different orders are fitted to \boldsymbol X_T
and \boldsymbol Y_T
, then the shortest
vector is padded with zeros until it reaches the length of the longest vector.
If features = FALSE
(default), returns a distance matrix based on the distance d_{COR}
. Otherwise, the function
returns a dataset of feature vectors, i.e., each row in the dataset contains the features employed to compute the
distance d_{VAR}
.
Ángel López-Oriona, José A. Vilar
piccolo1990distancemlmts
dis_var_2
, diss.AR.PIC
toy_dataset <- Libras$data[1 : 2] # Selecting the first 2 MTS from the
# dataset Libras
distance_matrix <- dis_var_1(toy_dataset) # Computing the pairwise
# distance matrix based on the distance dis_var_1
feature_dataset <- dis_var_1(toy_dataset, features = TRUE) # Computing
# the corresponding dataset of features
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.