# How To Apply Different Weighting Structures To Different Time Periods

Sometimes it is necessary to have different weighting structures for different time periods. For example, in Quarter 1 it may be appropriate to weight by age and gender, whereas in Quarter 2 it may make more sense to weight by Geography. There are lots of different ways of achieving this, three of which are described below.

## Method 1

1. Setup the targets for the first time period (see Construct Weight).
2. Within the same Construct Weight window, change Recompute for each to the time variable (i.e., the variable which demarcates each of the weighting structures) and press OK.
3. Change the Variable Name of the new weight variable to weight1.
4. Repeat the above steps for each of the time periods.
5. Create a JavaScript Variable to combined the weights. See example below.
6. Click the W in the Tags column for this JavaScript variable in the Variables and Questions tab
```if (wave == 1)
weight1;
else if (wave == 2)
weight2;
else if (wave == 3)
weight3;
else
weight4;```

## Method 2

This is probably the best of the methods, but requires the most thinking up front as it requires a good conceptual understanding of data and weighting.

1. Use Copy and Paste Variable(s) > Linked to make copies of each of the variables that you desire to weight for each time period. E.g., if Gender is to be used in the weights for the 1st and 3rd time period, you would take two copies of Gender.
2. Use an if statement to modify the expression, so that it returns a 99 if the person is not in the wave.
3. Set up the weights with the appropriate targets for the 99s, using Add Weight Set to add separate sets of targets for each of the variables. For example, if you have four waves, each which you want weighted equally, you would assign 75% to the 99s in each of the variables, and divide the remaining 25% between the other categories according to the desired targets.

## Method 3

This method is often the easiest. However, it is also the most susceptible to making mistakes that can be hard to spot and even harder to fix. You should only use this method if there is a good reason not to use the other methods.

1. Obtain a separate data file for each wave.
2. Import, selecting No to any questions.
3. Create the weight.
4. Save as an SPSS data file using Tools > Save Data as SPSS/CSV File.
5. Merge the data files (see Merge Data Add Cases).