#the available dissimilarities can be found in the diss help, page (?diss)
#and their individual pages from there.
### The most common use case begins with a set of time series we want to cluster.
### This package includes several example datasets.
###
data(interest.rates)
###transformation of the interest rates
trans.inter.rates <- log(interest.rates[2:215,]) - log(interest.rates[1:214,])
##use the dist function of the proxy package to easily create the dist object
#applying ACF with geometric decaying to each pair of time series
tsdist <- diss( t(trans.inter.rates) , "ACF", p=0.05)
names(tsdist) <- colnames(interest.rates)
#perform hierachical clustering to the dist object
hc <- hclust(tsdist)
#show the results
plot(hc)
mahdist <- diss( t(trans.inter.rates) , "AR.MAH", p=0.05)$p_value
pvalues.clust(mahdist, 0.05)
Run the code above in your browser using DataLab