Description Usage Arguments Details Value Author(s) See Also Examples
The function reorders a list of class "sdfdata"
for displaying scagnostics results in scaggrams.
The reordering algorithm is based on distances between "direct" neighbors. See Details.
1 |
sdfdata |
A list of class |
maxt |
|
select |
|
printmsum |
logical. Should the optimality criterion be printed after each iteration? Default is |
The implemented algorithm to reorder the "sdfdata"
list is greedy. In each iteration all variable changes of exactly two variables are considered, that means associated rows and columns within the scaggram are switched. The (p choose 2) different orders are compared by msum
. The goal is to minimize msum
, which is defined as the sum of distances of all row-wise and all column-wise neighbors. The algorithm stops if no improvement is possible by changing two arbitrary variables or the specified time limit is exceeded.
A list of class "sdfdata"
.
Katrin Grimm
sdf
, scag2sdf
, sdf_quicksort
, scaggram
, iascaggram
1 2 3 4 5 6 7 8 9 10 11 12 13 | data(Election2005)
# consider only demographic/economic information
election05_ds <- Election2005[,1:40]
## Not run:
scagdf <- sdf(election05_ds)
# ordering based on all scagnostics from sdf
scagdf_o2 <- sdf_sort(scagdf)
# compare scaggrams
par(mfrow=c(1,2))
scaggram(scagdf,select=(c(1,5,9)))
scaggram(scagdf_o2,select=(c(1,5,9)))
## End(Not run)
|
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.