Clustering the trajectories
Hello everybody,
I am trying to learn the new features in mousetrap (mt_cluster). My goal is to see if people who score high on a certain questionnaire have more trajecotories of cluster 1, while those who score low have more trajectories of cluster 2. My question is the following: how can I "mark" each trajectory (each trial), after clustering, as belonging to cluster 1,2 et cetera? So I can then calculate frequencies of trajectories per person. (i.e., subj. A has 5 trials of cluster 1, 6 trials of cluster B, and so on.)
thank you!
Comments
Hi!
let's start with an example using the example dataset from mousetrap:
By default, mt_cluster stores the cluster of each trial in a new data.frame called "clustering" within mt_example. If you would like to merge it with the trial data, you could simply create a new data.frame that merges them:
Alternatively, you could directly specify that mt_cluster should store the data within mt_example$data via the save_as argument:
See also the online documentation of mt_cluster for additional information.
Hope this helps!
Best,
Pascal