SET WEIGHT command
See Crunch Automation basics for more information.
The SET WEIGHT command allows you to set either one or more numeric variables as available weights for the dataset users.
The command also allows you to pick a specific numeric variable and set it AS DEFAULT for the dataset, which means the weighting will be applied, as a default, whenever a user views the dataset.
This command takes an existing numeric variable(s). If you don’t have a numeric variable for weighting already created, then you should refer to the CREATE WEIGHT command to create a weight using Crunch Automation.
SET WEIGHT alias, ..., alias;
SET WEIGHT alias AS DEFAULT;
Use cases
The following three examples describe how to set the weight for various use cases.
Example one
If you have created or uploaded/joined a single variable (my_weight), you can set it as follows:
SET WEIGHT my_weight;
Example two
The following example sets two numeric variables as weights using one command:
SET WEIGHT weight_segmentation, weight_demographics;
Example three
Finally, the following example sets a particular weight as the default:
SET WEIGHT my_weight AS DEFAULT;