Generates a synthetic dataset with one row per patient and columns
C2–C9 holding letter-labelled cluster assignments at successive values
of K (number of clusters). The hierarchical merge structure follows the
pattern from the HVTI PAM clustering analysis:
Usage
sample_cluster_sankey_data(
n = 300L,
probs = c(B = 0.18, F = 0.12, H = 0.06, D = 0.12, I = 0.04, C = 0.14, E = 0.11, G =
0.08, A = 0.15),
seed = 42L
)Value
A data frame with n rows and columns C2–C9, each a factor
ordered by the hierarchical cluster labels.
Details
| C9 label | C2 | C3 | C4 | C5 | C6 | C7 | C8 | C9 |
| A | A | A | A | A | A | A | A | A |
| B | B | B | B | B | B | B | B | B |
| C | A | C | C | C | C | C | C | C |
| D | B | B | D | D | D | D | D | D |
| E | A | C | C | E | E | E | E | E |
| F | B | B | B | B | F | F | F | F |
| G | A | A | A | A | A | G | G | G |
| H | B | B | B | B | F | F | H | H |
| I | B | B | D | D | D | D | D | I |