## Introduction

This article describes how to create expansion weights in Q. 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 Q 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 in the **Weight** drop-down menu at the bottom of the Outputs Tab.

By default, all analyses in Q assume that the weight variables contain expansion factors. And, all the default statistical testing in Q is designed with expansion factors in mind (i.e., expansion factors do not invalidate the default statistical tests within Q; see Statistical Assumptions).

The following statistics reflect any expansion factors (for all the other statistics, expansion factors cancel out):

## Method

### 1. Incorporating an expansion factor when creating a weight in Q

When creating a weight in Q, you can create it as an expansion weight by:

- Setting
**Target numbers**to**Population/Count**. - Enter targets that include the expansion factor.
- Un-checking
**Force sum of weights to equal sample size**.

### 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**). - Tag the variable as a weight variable on the Variables and Questions tab: .

### 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 on the Variables and Questions tab: .

## Comments

0 comments

Article is closed for comments.