Where a data file contains two distinct weight variables, such as one weight designed to rectify an imbalance in the sample (e.g., over- and under-representation by age, gender, and geography), and another which represents some aspect of the importance of the respondent (e.g., number of purchases) you can combine weight variables by multiplying them together in a new JavaScript variable.
Requirements
More than one weight variable
Method
- In the toolbar, select the Icon and then Data > Variables > New > Custom Code > JavaScript - Numeric.
- In the Expression box of the object inspector, enter the following code, where weight1 and weight2 are the names of the two weight variables. If you have additional weight variables to combine, continue to add them using the same format.
//Multiply all weight variables together
weight1 * weight2 - Give this new variable a Name and a Label.
- Check Usable as a weight to make this variable available to be used as a weight.