expanded dataframe on new groups ready for a statistical model