Introduction
Where a data file contains two distinct weight variables, such as one weight designed to rectify imbalance in the same (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
A new combined weight can be created which combines both weights by:
- Creating a new numeric JavaScript Variable with Create > Variables and Questions > Variable(s) > JavaScript Formula > Numeric.
- In the Expression box, 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, then click OK
- Select the new weight variable on the Variables and Questions tab and click the yellow "W" tag to make it available as a weight.
Next
How to Configure a Weight from Variable(s)
How to Make Variables Available as Weights