Aggregate is a nice function. Can we make it gui based.
function: cluster_mean(y, unit){
matrix m = aggregate(y, unit, mean)
series y_cm = replace(unit, m[,1], m[,3])
}
function: centered_within_cluster(y, unit){
matrix m = aggregate(y, unit, mean)
series cluster_mean = replace(unit, m[,1], m[,3])
series y_cwc = y - cluster_mean
}