Filter variables by group