I would like to use MATLAB group statistics functions (like grpstats) on data where each observation can be in multiple groups. For example, pizzas can have {‘pepperoni’, ‘mushroom’,’onions’} or {‘pepperoni’} or whatever and then I want group stats by topping: all of the pizzas with ‘pepperoni’, all of them with ‘mushroom’, etc.
Alternatively if you know a way to do this by hand without iterating like an idiot that would also be helpful.
Just put repeated measures in different rows. For example:
Raw data:
Group stats: