# Assign subjects into groups so that group means are as similar as possible

I have some subjects from I have measured a variable (body weight). I want to do a case-control experiment where I will do an intervention on one of the groups (Experimental). I'd like for the group means to be as close as possible to begin. My questions are:

1. Is this a legitimate way to assign subjects?
2. Is there a statistical programming way (R) to do this?

I think this article describes what I'm trying to do, so it sounds like this is accepted practice, but I'm not sure. And it's in SAS, so not helpful to me (I'm using R).

• It sounds reasonable, on the surface to me. You have said a philosophy, not an actual explicit method, so when you ask "legitimate way" I can't answer that. Some of your post-assignment analysis drives how appropriate your assigning method is. That would need to be specified. I assure you there is a way to do it in R. – EngrStudent Feb 2 '18 at 21:53
• It sounds full of pitfalls to me. That's in part because groups must match on other characteristics (such as spread) to have any chance of being comparable. Another reason is that most deterministic algorithmic ways to split subjects into groups have no known (or even computable) statistical properties, making it invalid to apply most statistical testing procedures. Although there are some (weak) objections to randomization, that still is superior to and far simpler (and more defensible) than most alternatives. cc@EngrStudent – whuber Feb 2 '18 at 22:04
• You might also consider a matched subject design. – Sal Mangiafico Feb 3 '18 at 11:56

That all being said, there is a package called optmatch in R. An accessible review of its features can be found here. This is but one option out there, and before you use a tool like this, I strongly recommend testing it out on some simulated data so that you can fully assess the potential consequences of specific choices available to you.
Again, I would say that whenever possible, random assignment is the ideal choice, but there are some tools out there (like optmatch) that can help in specific situations.