# sample weighting/rim weighting/raking

#### svs

##### New Member
Hello,
I have the following problem.

I have a sample of people say 5 people as shown below, with information on some behavior of theirs, lets say purchases made by them at store 1, store 2, store 3. I also know how much in dollars each store sold to all its customers, say store 1 sold a total of $5000 of merchandise, store 2 sold$10,000 worth of merchandise, etc. i don;t know how many people bought $5000 worth merchandise, all I have is the$5000 amount.

I need to create weights so that the sum of weights for persons that bought at store 1 equals $5000, sum of weights for persons that bought at store 2 equals$10,000, etc. I am not able to figure out how to do this using rim weighting or raking since the metric i am trying to weight is not persons but behaviors ie., volumetric data. Any help or ideas appreciated. Thank you so much.

persons purchase at store1 purchase at store2 purchase at store3
1 $0$100 $20 2$100 etc
3 $24 4$0
5 $90 #### terzi ##### TS Contributor Hi svs, You don't seem to require raking, which is used to adjust the sample for coverage issues or over representation. If you want to create some weights you could add the total amount bought by the people at one store, and use that as a threshold for your weighting. For instance, if the total spent by all the people on store 1 was$1,000 and you have one person who spent $100, which is 10% of a thousand, he gets a weight of 10% of the store's total sales (If its$5,000 the weight would be \$500).

Just be careful because your weights would vary from store to store so people who bought in more than one place would have two or more weights associated.

Hope this helps

#### svs

##### New Member
Thank you Terzi. I agree with you that this is not a weighting problem. Thanks so much.