Rim weighting worksheet
This worksheet describes how to apply rim-weighting to an analysis table or chart. You would do this if:
- You wish to apply multiple weights in survey analysis, e.g. You wish to produce an analysis in which the proportion of respondents in your sample are adjusted to match more closely to the proportion in the target population.
(Rim-weighting is also known as "iterative proportional fitting".)
Background
Rim-weighting uses a mathematical algorithm to help you provide an even distribution of results across the entire dataset while balancing certain categories such as age or gender to pre-determined totals. It weights the specified characteristics simultaneously and disturbs each variable as little as possible.
For example, if you wished to weight your samples so that they were 50% male and 50% female, and also 20% in each of five age brackets, the algorithm would calculate the correct weighting that needed to be applied to each table entry (combining age and gender).
It is not a good idea to use rim-weighting if:
- Your variables are related to each other (for example, income bracket and dwelling size).
- The values vary enormously (for example, you have 96 males and four females, and you are attempting to balance it to 50:50).
- You are applying a very large number of weights.
Summary of steps
To use rim-weighting you would need to:
- Open the questionnaire in Snap and export the variables you wish to weight to a Triple-S format file.
- Set the target for each variable code (as an absolute value or a proportion) in the ToolKit Rim Weight program and process the data. This writes extra data back to the original survey and creates a weight variable in a Snap Interchange Format (SIF) file.
- In Snap, import the weight variable and use it in your table generation.
The example below shows a table weighted proportionally by sex, giving 50% males and 50% females, and rounded up to equal absolute numbers by age (giving a total of 300 respondents). You can practice the same example using the SnCrocodile survey that comes with Snap 9.
Step 1: Exporting the variables to be weighted
- Open the survey in Snap and display the Variables Window.
- Select File | Export.
- Specify the Variable Export details:
- Format: Select triple XML (SSS) v1.1
- File: Enter the destination file name and path (Snap supplies a default name and directory).
- Filter: Enter a comma-separated list of the single-response source variables. For example in snCrocodile you could enter "Q9,Q10" for age and gender.
and click [OK].

- Snap prompts for confirmation "Do you want to transfer triple-s data?". Click [Yes]. The Data Export box appears. Confirm the details and click [OK].
- Close the survey in Snap

Step 2: Setting the targets in ToolKit
- Selecting Start | All Programs | Snap 9 | ToolKit | Rim Weight.
- Browse for the exported variable file and click [Next]. (ToolKit automatically selects the associated ASC data file. If it does not find it, you will need to browse for it yourself.)

- Browse for the Snap RDF file for the survey.
- ToolKit automatically displays the corresponding SIF file if it exists. If not, enter a new filename.
Click [Next].

- Select a code and click [Modify]. You can:
- set the code target to be absolute or proportional by clearing or checking the Target values for question are proportions box.
- set all codes for a variable to have the same value by checking the Apply target to all codes in question box

- Set the value for the code and click [OK]. It appears in the Target column. Proportional target values are shown as "value/total". For example 20% would be represented as "20/100".
If you are using absolute values, ensure that you use the same absolute total for all questions.
- You can specify the name of the weight, the number of decimal places that it is calculated to and how often the algorithm is performed by clicking the [Options] button. The default name is Weight
- Click [Process] to calculate the weightings. Then click [Close]

Step3: Importing and using the weight in Snap
- Start Snap and open the survey. Snap will display a warning message when you re-open the survey.

- Open the Variables window and select File | Import.
- Set the Format to Snap Interchange Format (SnIF).

- Browse for the weight variable and click [OK].
- Snap displays a message when it has completed the import process. Click [Done].
- You can now use the weight variable in the same way as a normal Snap weight.

- Select the Results Table button (
) and type in the appropriate break and analysis fields. - Type the name of the imported weight variable into the Weight field.

- Select [OK] to build the rim-weighted table.
