- array
a 3D or 4D array as produced by read.3d.lsd and read.4d.lsd, where in the first dimension (rows) you have the time steps, in the second (columns), the variables and in the third/fourth dimension, the Monte Carlo experiments, and the instances in the third dimension (4D arrays only). When 4D arrays are provided, only first instances are used in the computation.
- references
a 2D matrix containing the reference time series, time in rows and variable values in named columns, from which the distance measures are to be computed. Columns must be named for the exact match to the names of the desired variables (contained in array). Only variables contained in both array and references are considered in the computation. According to the distance measure chosen, the number of time steps in array and references must be the same (as in the default Euclidean distance).
- instance
integer: the instance of the variable to be read, for variables that exist in more than one object (4D array only). The default (1) is to read first instances.
- distance
string: the distance measure to be used. The default is to compute the Euclidean distance ("euclidean"). For a comprehensive list of measure options, please refer to TSdist package. Measure names can be abbreviated.
- std.dist
a logical value indicating, if TRUE, that the computed distances must be standardized with respect of the number of time steps involved. The default, FALSE, is not standardizing distances. This is relevant for properly comparing the metrics of series containing NAs.
- std.val
a logical value indicating, if TRUE, that the series values must be standardized before computing the distances. The default, FALSE, is not standardizing values. This is relevant for properly comparing the metrics of series for different variables which are not distributed over the same range of values.
- rank
a logical value indicating, if TRUE, that the Monte Carlo runs must be ranked in terms of closeness to the references. The default is not computing the run ranking, as this may be computationally expensive for some distance measures.
- weights
a numerical vector containing the weights to be used for each variable in references when rank = TRUE. If vector has named elements, the vector names must exactly match the names of variables in references, order is not important, If variable names not present in vector, the missing ones are not considered in the ranking. If the vector is not named, the order of the weights must be the same as the one used for the variables (columns) in the references matrix. If the length of weigths is smaller the number of variables and not named, the vector is recycled. The default is to use the same weight for all variables.
- seed
a single value, interpreted as an integer to define the pseudo-random number generator state used when sampling data, or NULL, to re-initialize the generator as if no seed had yet been set (a new state is created from the current time and the process ID).
- ...
additional parameters required by the specific method (see TSdist package).