## Introduction

This article describes how to set different weights to the same target questions/categories within waves.

Otherwise, if you need to apply different weights to different target questions or different categories within a sub-sample, please read below. A couple of examples of where this comes up:

- You need to create weights based on country-regions but there are different regions in each country
- A certain target question category has 0 respondents within a wave

You can manually figure out the population counts or overall weighting percentages and use those in a grid within the weighting tool, but many times that's a little complicated and tedious. The below instructions use the more easily understood target percentages.

## Requirements

A Displayr document

## Method

### Overall Instructions

- Setup the targets for the first group (see How to Configure A Weight from Variable(s) where each weight variable has the group variable listed as the
**Adjustment Variable(s)**and the remaining groups are given 0 targets. For example, if you have three quarters, you could set up my weights for Q1 as follows: - Repeat the above steps for each of the groups
- Create a JavaScript Variable or R Variable to combined the weights. See example below.

### Combining Weights

**If you'd like your groups' populations to be evenly weighted**, you can combine the individual weights directly using code similar to below. Replace group with the group variable from your dataset and add/remove groups as needed.

```
if (group== 1)
weight1;
else if (group == 2)
weight2;
else if (group == 3)
weight3;
else
weight4;
```

**If you'd like your groups' populations to equal the groups' sample size within the unweighted data**, you can combine the individual weights and gross up/down the respondent-level weights to balance out the sample size. Replace YourGroupVariable on line 2 with the name of the group variable from your dataset, replace 1, 2, 3, etc with each group's label, and add/remove groups as needed.

```
# identify group variable
group = YourGroupVariable
#create empty combined weight variable
combweight = rep(NA,length(group))
#for each group, reference the correct individual weight and gross up based on subgroup sample size
combweight[group == "1"] = weight1[group == "1"] * sum(group == "1",na.rm=T)/100
combweight[group == "2"] = weight2[group == "2"] * sum(group == "2",na.rm=T)/100
combweight[group == "3"] = weight3[group == "3"] * sum(group == "3",na.rm=T)/100
combweight[group == "4"] = weight2[group == "4"] * sum(group == "4",na.rm=T)/100
#return final result
combweight
```

## See Also

How to Configure A Weight from Variable(s)

## Comments

0 comments

Article is closed for comments.