Weight to multiple target characteristics
The weighting examples above are applicable when you only want to apply one weight scheme to the project at a time. However, you might want to weight to multiple target characteristics. We can do this using Random Iterative Method (RIM) weighting.
For example, a survey sample may have set quotas to equally sample physicians and nurses , but in the target market nurses may be 70% of customers.
Gender | Survey | Population |
Physician | 50% | 30% |
Nurse | 50% | 70% |
Similarly, the distribution of region in the survey may differ from the target population.
Region | Survey sample | Population |
East | 40% | 30% |
West | 60% | 70% |
It is possible to calculate one weight scheme that adjusts the distribution for more than one variable. This is a little more complex, as setting weights for one variable may affect the distribution of other correlated variables.
For this you can use an iterative algorithm called "Rim weighting", described , described here https://gist.github.com/pietersv/2855695b0c4f79a8ce242f14655a8adc. This gist shows a function that calculates weights for selected variables, and runs in a data process .