How to Weight Only a Part of a Data File

From Q
Jump to: navigation, search

Sometimes it is desirable to only weight a part of data file. For example, data may have been collected in two regions, and it may be appropriate to weight only one of those regions.

  1. Create a filter which represents the respondents to be weighted, calling this filter Sample to be weighted.
  2. On the Variables and Questions tab, set the Name for the filter to weighted.
  3. On the Outputs Tab create a SUMMARY table of Sample to be weighted (make sure no weights nor filters are applied).
  4. Export this table to Excel.
  5. Start by creating a weight in the normal way.
  6. Select the first variable to be used as a target as Target question(s).
  7. If necessary, add additional variables in the second dropdown menu (e.g., if you have separate targets for combinations of age and gender, you would put age in the first dropdown and gender in the second).
  8. In Excel, compute the desired targets. For example, if 35% of Sample to be weighted are Selected, and your desired targets are are 25% males and 75% females, you compute the target for males as .35*25 and for females as .35*75 (i.e., 8.75 and 29.75).
  9. Repeat the calculations in the previous step for the Not selected data (i.e., multiplying the desired targets by the Not selected value). If you have done this correctly, the targets will add up to precisely 100. Note that whatever values you enter in this step will not contribute to the final weights, and are only being entered because it is a requirement of Q's weighting algorithm that targets are provided for the total database.
  10. Set Target column question(s) to Sample to be weighted.
  11. Fill in the Targets.
  12. Check that the percentages at the bottom of each column are correct (this should align with the proportion of the sample to be not weighted and weighted).
  13. Check that the percentages at the end of each row are correct. These should align with the targets you required in the weighted sample.
  14. If necessary, press Add Weight Set and repeat this process for additional variables.
  15. Press OK.
  16. Change the Name of the newly-created variable to totalWeight.
  17. Right-click on the variable number to the left of totalWeight and select Insert Variable(s) > JavaScript Formula > Numeric.
  18. Give it a Label of Partial Weight and an Expression of if (weighted) totalWeight; else 1 and press OK.
  19. Press the yellow W for the variable in the Tags column.
  20. Apply the weight (in the Outputs Tab).
Personal tools