# Raking to converting a convenience sample to representative sample

I have a convenience sample of patients in a ZIP Code Tabulation Area (ZCTA) for whom I know their gender and age. I also have census data for the ZCTA (in particular I have 1) the percentage of males and females in the ZCTA, and 2) the percentage of the (estimated) population of the ZCTA that is made up of different age groups).

Would raking be the right approach to weight the convenience sample responses so that they constitutes a representative sample of the ZCTA with respect to the following measures:

1. The percentage of males and females in the sample, and
2. The percentage of each age group.
• Rim aka raking weighting is applicable when the frequency distortions in cells are assumed to have been the result of independent marginal (main effect) distortions. For example, you have 2 gender by 3 age groups table. If it is reasonable to suppose that in your sample genders were disbalanced (comparitively with population) and ages were disbalanced - as two independent processes, then rim weighting, to restore the populational proportions, is the choice. Nov 23 '17 at 10:53
• Can you describe an example of how gender and age could be disbalanced as dependent processes? Nov 30 '17 at 19:07
• Any example where specific cells are over- or underrepresented relative a population. Nov 30 '17 at 19:16
• Can you define what a cell being over-represented means? Suppose we say that the cell corresponding to Females in Age Group 20-29 is over-represented. What would tell me that that cell is over-represented relative to the same cell for the population? Nov 30 '17 at 19:42
• Let have variables sex (2 categories) and agegroup (3 categories). Let us know that proportions in all 6 cells are, say, equal in the population. Your representative data of, say, 150, should have 25 in each cell. But, unfortunately, you have underrepresented cell (1,3)=5 and overrepresented cell (2,2)=45. It is clear, that the weight correction should go between these two disbalanced cells only. Then all cell frequencies will be restored to be 25. However, if you apply classic _rim_weighting requesting marginal target proportions 1/2-1/2 and 1/3-1/3-1/3, you'll succeed in the (to cont.) Nov 30 '17 at 23:12