The correlation dissimilarity between two observations x_ix_i and
x_jx_j is:
d(x_i, x_j) = 12(1 - (x_i, x_j))d(x_i, x_j) = (1/2)(1 - rho(x_i, x_j))
where rho is the Pearson correlation coefficient. This is used when
ws = NULL.
When ws is specified, the moving correlation dissimilarity is:
d(x_i, x_j; ws) = 12\,ws _k=1^p - ws
(1 - (x_i,(k:k+ws),\, x_j,(k:k+ws)))d(x_i, x_j; ws) = 1/(2*ws) * sum_k=1^p-ws (1 - rho(x_i,(k:k+ws), x_j,(k:k+ws)))
where wsws is the window size and pp is the number of variables.