max_distance | R Documentation |
This function computes the maximum vertical distance between functions.
max_distance(est1, est2, lags = c(), plot = FALSE)
est1 |
A numeric vector representing the first estimated autocovariance function. |
est2 |
A numeric vector of the same length as |
lags |
An optional vector of lags starting from 0 up until some other lag. If empty, a vector of lags is created starting from 0 until |
plot |
A boolean as to whether a plot should be created. By default, no plot is created. |
This function computes the maximum vertical distance between functions:
D(\hat{C}_{1}(h), \hat{C}_{2}(h)) = \displaystyle \max_{h} \left| \hat{C}_{1}(h) - \hat{C}_{2}(h) \right| ,
where \hat{C}_{1}(\cdot)
and \hat{C}_{2}(\cdot)
are estimated autocovariance functions.
It assumes that the estimated values are given for the same set of lags.
The vectors of the function values must be of the same length.
A numeric value representing the maximum vertical distance between the two estimated functions.
x <- seq(0, 5, by=0.1)
estCov1 <- exp(-x^2)
estCov2 <- exp(-x^2.1)
max_distance(estCov1, estCov2, lags=x)
max_distance(estCov1, estCov2, lags=x, plot = TRUE)
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.