How to Construct a Weight for a Self-Weighting Sample
		
		
		
		Jump to navigation
		Jump to search
		
| Related Online Training modules | |
|---|---|
| Deleting Individual Observations | |
| Deleting Multiple Observations | |
| Modifying a .sav file | |
| Generally it is best to access online training from within Q by selecting Help > Online Training | 
Sometimes there is a need to create weights using data which includes people that screened out of a study. For example, the first two questions may be age and gender and the third question the screener, but there is a need to weight the age and gender to the entire population. This is done as follows:
- Obtain a data file that includes the data for the respondents that were screened out but need to be taken into account when creating the weight.
 - Create the weight.
 - In the Variables and Questions tab, right-click on the weight variable and select Copy and Paste Variable(s) > Linked.
 - In the Variables and Questions tab, right-click on the new variable and select Convert Formula to Fixed Data.
 - Tag the new variable as a weight
 - Delete the respondents that screened out.
 - (Optionally) If the data file is huge, Save the data as an SPSS data file and the re-import.
 
Rescaling the weight so that has an average of 1.0
If you wish to rescale the variable so that it has an average of 1.0:
- In the Variables and Questions tab, right-click on the weight variable and select Copy and Paste Variable(s) > Linked.
 - Right-click on the newly created variable and select Edit Variable.
 - Update the Expression. For example, if the Expression is wQPVSF, and its Mean is 0.0275 (shown at the bottom of the dialog box), your expression would be wQPVSF / 0.0275. (If you wish to compute the average with more decimal places, create a table in the Outputs Tab and increase the number of values.)
 - Press OK.
 - Tag the new variable as a weight
 
Automatically completing the above steps
If this process needs to be done automatically as a part of a tracking study this can be done using Access all data rows but this is a very complicated process (as you will need to create the weights using formulas written in JavaScript).