I have a client test group that differs based on store location and client spend group ( high, medium low).
I have a larger group of similar control clients created based on past history. I would like to select a random control client for each test client that shares the same store location and spend level.
example of tables:
test:
client id
store_number
spend_level
1
30
1
2
5
1
3
10
2
4
8
2
5
8
3
I have a potential control group that looks like this but with many more clients, and not weighted the same by store and spend.
How do I create a control sample that has the same number of clients by store and spend.
So if Store 3 has 10 low spend, 20 high spend and 3 medium spend clients, and store 5 has 2 low spend, 1 high spend, and 8 medium spend clients, the control will have the same.
I'd like this sample to be random within these conditions.
thank you in advance!
Meredith
... View more