Advanced tables and statistics > Weighting > Rim weighting
 
Rim weighting
Note Rim weighting can only be specified in a weighting matrix, not in an axis.
In all the examples so far, we have known the total number of people in the population who have two or more characteristics in common — one from each axis. For example, in the weighting matrix for age and sex we knew the target number of men who are aged 65 or over.
Suppose, however, you do not have these figures. You know only that the universe of 1,000 people can be described as follows:
470 men and 530 women
220 people aged 18-24, 200 people aged 25-44,
310 people aged 45-64, and 270 people aged 65 and over
200 people live in the north, 380 people live in the south,
150 people live in the east, and 270 people live in the west
You don’t know, for example, how many men there are aged 65 and over, and how many of them live in the north, so you cannot create a standard weighting matrix using region, age and sex as characteristics. Instead, use rim weighting which enables you to weight on these three conditions, thus:
wm8 region age sex;rim;200;380;150;270;
+220;200;310;270;
+470;530
This example list the four population totals for region, followed by the four totals for age with the two totals for sex at the end. The three sets of weights are on separate lines to make the example easier to read, but you can string them all together on the same line if you want.
When rim weighting is used, there is a maximum of 16 weighting axes per run.
Rim weighting is also useful when you know the relationship between some axes but not others; for example, you might know how many people of each sex you have in each age group, but not the relationship between these and the region in which the respondent lives. To weight using age, sex and region as characteristics, create an axis called, say, agesex, which combines the axes age and sex as follows:
l agesex
n10Base
n01Male, 18-24;c=c110'1'.and.c112'1'
n01Female, 18-24;c=c110'2'.and.c112'1'
Your rim weighting matrix then contains weights for age and sex combined and region:
wm9 agesex region;rim; ...
Rim weighting calculates weights using a form of regression analysis. This requires two parameters: a ‘limit’ which defines how close the weighting procedure must get to the targets you have given in order for the weights to be acceptable, and a number of ‘iterations’ which defines the number of times the weight calculations can be repeated in order to reach the cell targets.
At the end of each iteration, Quantum compares the root mean square (rms) with the product of the target sample size and the given limit. The iterations continue until the root mean square is within the limit, in which case weighting is considered successful, or until the maximum number of iterations has been reached. If, after the maximum number of iterations, the root mean square is still outside the limit, Quantum issues the message ‘rim weighting failure’, but continues the run with the weights that have been calculated. For details of the formula used for the root mean square, see Weighting report file.
The default limit is 0.005 and the default number of iterations is 12. You can change these parameters by creating a rim weighting parameters file containing a line of the form:
wm=n    limit=x    iters=y
where n is the number of the weighting matrix concerned, x is the new limit (between 0.0001 and 0.05) and y is the new number of iterations required (between 5 and 500). For example, you might want to reduce the limit and increase the number of iterations on a large sample to increase the accuracy of the weights. For more information about the rim weighting parameters file, see Rim weighting parameters file.
As with ordinary weighting, rim weighting writes a summary report of the weights it applied in a file called weightrp. This shows the weights for each category as they were specified in the Quantum spec, and the input and projected frequencies and percents, and then the weights it calculated. If you want, you can request a more detailed report that shows the rim weights calculated at every iteration.
This more detailed report has, in addition to the standard pages, one page per iteration showing the root mean square (rms) and limit at that iteration, plus a table showing the current weight, output and projected frequency for each weighting category.
For example:
Weighting matrix 1:
After 1 iteration:
rms=607.817042    limit=0.500000
RIM
OUTPUT
PROJECTED
WEIGHT
FREQUENCY
FREQUENCY
----------
----------
----------
    2.200000    
      10.000    
      22.000    
    1.250000
      16.000
      20.000
    1.823529
      17.000
      31.000
    2.250000
      12.000
      27.000
    0.927721
      50.662
      47.000
    1.074218
      49.338
      53.000
To request this level of detail, add the option:
report=detailed
to the weight matrix entries in the rim weighting parameters file for which you require the report. (The standard report type is report=normal, but this need never be specified.)
For more information on rim weighting see the Rim Weighting Theoretical Basis Paper entitled ‘ON A LEAST SQUARES ADJUSTMENT OF A SAMPLED FREQUENCY TABLE WHEN THE EXPECTED MARGINAL TOTALS ARE KNOWN’, by W. Edwards Deming and Frederick F. Stephan, in Volume 11, 1940 of the Annals of Mathematical Statistics.
See
Maximum and minimum weights with rim weighting
See also
Weighting