search for: datascale

Displaying 1 result from an estimated 1 matches for "datascale".

Did you mean: data_scale
2011 Feb 21
0
r-square for cluster
...olution. In fact, I have different cluster solution for a given set of data. I would like to know which cluster solution gives the highest R2. My data (5 variables) are scaled to a 0 mean and 1 std. This is the command lines I used to calculate R2 for 1 cluster solution: SSTot <- (nrow(grid40km.datascale)-1)*sum(apply(grid40km.datascale,2,var)) # total sum of square SStot_grid40km <- NULL for (i in 1:22) # there is 22 clusters { data_group <- subset(grid40km.data,grid40km.cluster==i, select=c(X1, X2, X3, X4, X5)) SSgroup <- (nrow(data_group-1)*sum(apply(data_group,2,var))) # SS for all v...