I have three groups that I would like to match on age and gender. They don't need to be matched one-to-one, I just need group differences p < .05 for both variables. I can find packages that will match TWO groups, but not more than that. Does such a package or code snippet exist?
Secondarily, because the available matching packages only work for two groups, the treatment parameter is required as a logical vector, whereas right now mine are factors. What is the most efficient way to convert a factor to a logical when there are only 2 levels?
Muchos gracias!