This article describes how to create expansion weights in Displayr. An expansion weight is used so that the weighted data reflects the size of the population of interest (e.g., if there are 300 million people in the population, but 300 people in the survey, a weight of 1,000,000 may be assigned to each respondent).
How Displayr addresses expansion factors in weighting
Where there is a need to incorporate expansion factors into analyses, this is done by either including them in the weight variable or, by creating a Rule. In general, including them in the weight variable is the better approach. Thus, expansion factors/weights are applied by selecting a weight from the Weight drop-down in the object inspector.
By default, all analyses in Displayr assume that the weight variables contain expansion factors. All the default statistical testing in Displayr are designed with expansion factors in mind (i.e., expansion factors do not invalidate the default statistical tests within Displayr (see Statistical Assumptions).
The following statistics reflect any expansion factors (for all the other statistics, expansion factors cancel out):
- Population
- Row Population
- Column Population
- Base Population
- Sum
Please note these steps require a Displayr license.
Method
1. Incorporating an expansion factor when creating a weight in Displayr
When creating a weight in Displayr, you can create it as an expansion weight by:
- Setting Targets are to Population/Count.
- Enter targets that include the expansion factor.
- Set the Make weights sum to to target values.
2. Creating a weight that only contains an expansion factor
- Create a JavaScript Variable, with an Expression that contains the expansion factor (e.g., if the expansion factor is 312, then type 312 into the Expression section).
- Tag the variable as a weight variable by selecting the variable and checking Useable as a weight in the object inspector.
3. Combining an expansion factor with an existing weight
- Create a JavaScript Variable, with an Expression that multiplies the expansion factor by the existing weight variable (e.g., if the expansion factor is 312 and the existing weight variable has a Name of wgt, then the Expression is 312 * wgt).
- Tag the variable as a weight variable by selecting the variable and checking Useable as a weight in the object inspector.