# Advanced RIM Weighting

## Overview

The Advanced Weight Editor allows you to programmatically create and apply a weighting variable within Crosstabs. It also offers a variety of tools to help you further customize any weights created with the Basic Weight Editor, and run test cases to ensure that your final reports are calculated exactly as needed.

The advanced editor can be used for a more advanced weighting setup that will not be possible to create/view in the basic editor. The following criteria are considered advanced setup:

- Dimension logic based on grid (multiple dimension) questions
- Dimension logic based on open end questions or date logic
- Dimensions using not, nested, or vector logic
- Dimensions using multiple groups (separate filter logic per dimension)
- Custom filter logic that doesn’t match a saved crosstab banner

## 1: Accessing the Advanced Weight Editor

The Advanced Weight Editor can only be accessed from the Basic Weight Editor within Crosstabs. To access the Advanced Weight Editor click "Switch to Advanced Weight Editor" at the bottom left of the basic editor screen:

## 2: Overview of the Advanced Weight Editor

Here is a quick outline of the functions available within the Advanced Weight Editor:

**1. Data Map:** This menu displays the survey datamap, including all question, row, and column labels. You can double-click on any question label here to add the logic for each of its answer options to your weighting scheme. Similarly, you can double-click directly on an answer option to add logic for just that option.

For example, double-clicking “Q1” will add the following logic to your weights:

`Q1.r1`

Q1.r2

Whereas double-clicking on “r1” will only add `Q1.r1`

.

The data map has a limit of 199 questions and will not be displayed for surveys with 200+ questions.

**2. Variable Name:** The name for your weighting variable will appear here. If you have not yet added a name for your variable, you can add it here.

**3. Filter:** You can add filters here to apply weighting to only certain question, row, or column data.

**4. Learn More:** Clicking here will direct you back to this guide at any time during weighting.

**5. Weighting Dimensions:** You can use this box to manually build out your weighting scheme.

**6. Qualified Respondents Only:** Checking this box will apply weighting to qualified respondents only (will exclude terminates and overquotas from weighting).

**7. Results: **The results of computed weights will be displayed in this box.

**8. Switch to Basic Weight Editor: **Clicking here will redirect you back to the Basic Weight Editor, with any weights and filters you've added in the Advanced editor still intact.

This link is disabled if the weighting scheme you create within the Advanced editor is too complex for editing within the Basic Weight Editor.

**9. Compute Weights:** Clicking here will compute all weights listed in the “Weighting Dimensions” box into the “Results” box; you can use this to preview the results of a weighting scheme, as weights are not actually applied to the data until you click on "Save".

**10. Save:**** **Clicking here will add your weighting variable to the Crosstabs Weighting menu, where it can be applied to the report at any time.

## 3: Adding Weights & Filters

You will need to use the “Weighting Dimensions” box to begin building out your weighting scheme.

All weights should be added as a logic condition, with the logic listed first and the weighting percentage second, including a single space between each value. Click here for more information on adding logic conditions within a report.

For example, if you wanted to force a 50-50% split between genders from your first survey question, you might use the following script here:

When using decimal values, there must be a number in front of the period (even if it is zero), and no zeros can be added to the end of the number. For example, "`0.5`

" will work, while "`.5`

" and "`0.50`

" will not.

Each individual weight should be applied on a new line, and any empty lines define the start of a new logic set:

Each logic set needs to total to 100, and each set not prefixed with "`@group`

" logic will be used in the calculation.

You can also use the "Filter" box to add filters for applying weights only to certain question, row, or column data. For example, if you wanted weighting applied to only males (row 1 in question 1) and not ages 25-34 (rows 1 and 2 in question 2), you might use the following script within the "Filter" box:

### 3.1: Running Weights

You can run your weights at any time during the editing process to verify that the calculation is correct. Once you have finished entering any weights you would like applied, just click on "Compute Weights" to see a preview of what your applied weighting scheme will look like within the "Results" box:

Running weights will not apply them to your survey data and there is no limit to how many schemes you can compute. With unlimited data runs, the Weighting Scheme Editor gives you the ability to re-calculate your weights over and over again, until you are satisfied with the results.

If you do not want to overwrite an existing weight, you should create a new weight variable before re-running the weighting scheme you have created.

### 3.2: Evaluating the Efficiency Output

The "Results" box also provides you with the Weight Factor Efficiency Output for your weighting scheme:

The Efficiency Output indicates how balanced the sample is. If the output is low, then the data is not well balanced and needs to be weighted either higher or lower. Conversely, if the output is high, then the data is well balanced.

If the Efficiency Output is not what you expected, you can adjust your weighting scheme and re-calculate it as many times as you like.

The system will calculate the efficiency output as close as possible, so the maximum difference will never be more than 0.5%.

### 3.3: Evaluating the Root Mean Square (RMS)

After computing weights, the "Results" box provides the Root Mean Square and number of iterations. The Decipher Weighting tool will run a maximum of 10 iterations of the RIM weighting algorithm, but stop if convergence is reached. Convergence is reached once the RMS is less than 0.000005.

If the weighting scheme does not reach convergence after 10 iterations, it is considered a failure. A failed weighting scheme can still be applied, but researchers should be cautious about drawing conclusion from a data set with a failed weighting scheme applied.

The results of the weighting scheme above indicate convergence was met after 3 iterations and, therefore, the weighting scheme is considered a success.

## 4: Applying Weights

Once you are satisfied with your weighting scheme, you can click on the "Save" button at the bottom right to add your new weighting variable to Crosstabs:

You will then be directed back to the report settings page within Crosstabs. To apply your weights, just select your new weighting variable under the "Wieghting" menu and click the "Apply" button at the bottom:

After you add your weighting variable using the Weighting Scheme Editor, it will be available within the Crosstabs report settings, and you can toggle it on or apply a different weighting scheme at any time. To create another weighting scheme, you would just repeat this process for each individual variable.

## 5: Additional Considerations

### 5.1: Editing Existing Weighting Schemes

Once you have applied a weighting variable within Crosstabs, you can return to edit it at any time, or even remove it altogether. To view the options for existing weighting variables, just hover over the variable name within the "Weighting" drop-down in the report settings menu:

### 5.2: Weighting by Groups

The Scheme Editor also allows you to weight by groups of data, which is particularly helpful when trying to weight data for tracking studies. To weight by group, you would just add “`@`

” before the logic set you would like applied to each group. This makes the weight call exclusive to the code below it, and it will automatically combine with any filters you have applied.

For example, if you wanted to apply your 50-50% gender split to two separate waves of data within a study, you might use the following code, where “`@wave.r1`

” and “`@wave.r2`

” are pointing to the rows for a tracking virtual called “`wave`

”:

For group weighting, the logic for each `@`

group cannot overlap (i.e., group logic cannot be based on a checkbox question, where a respondent could fall into multiple groups that are used).