Advanced tables and statistics > Weighting > Weighting information in axes
 
Weighting information in axes
Quick reference
To define a weighting target for an element, place the option:
wttarget=number
on the n01 that creates the element.
To define a weighting factor for an element, place the option:
wtfactor=number
on the n01 that creates the element.
More information
An alternative to defining weight matrices is to declare weights in the axes themselves. This does not prevent you using the axes as the rows, columns or higher dimensions of tables, nor does it affect the appearance of those tables or their cell values.
Note Elements must be specified using n statements since this facility does not work with col, val, fld or bit statements. Rim weights are not supported by this method; you must specify them using a weight matrix.
To define weighting targets for the elements of an axis, add the option:
wttarget=number
to the n01 statements that create the elements, where number is the number of respondents you want Quantum to show in the element.
The example below shows how to define targets based on sex. When you weight tables by sex, Quantum will count the number of men in the data and will calculate a weight such that the number of men matches the target for men.
l sex
n01Male;c=c156'1';wttarget=485
n01Female;c=c156'2';wttarget=515
n01Not answered;c=c156n'12'
The ‘Not answered’ element has no target defined so it is ignored for weighting purposes. This means that records in that element are unweighted. If you do not already have an axis whose elements define the weighting characteristics you want to use, just create the axis but do not use it on a tab statement.
You define factors in the same way except that you use the keyword:
wtfactor=number
Any elements in a weighting axis that do not contain either wttarget or wtfactor are ignored for weighting purposes.
See
Numbering weighting axes
Preweights, postweights, proportions (input) and weighting to a given total
See also
Weighting