## Create three sample time series
x <- cumsum(rnorm(100))
y <- cumsum(rnorm(100))
z <- sin(seq(0, pi, length.out=100))
##
diss.MAH.pvalue <- function(x,y) {
diss.AR.MAH(x,y)$p_value
}
## Compute the distance and check for coherent results
if (require(proxy)) {
dd <- proxy::dist( rbind(x,y,z), diss.MAH.pvalue)
pvalues.clust( dd, 0.05 )
}
Run the code above in your browser using DataLab