Calibrating weights (GREG)
In brief
In the "Case weight" dialog → "Calculate weights (raking, calibration)", besides raking there are "Calibrate linearly (GREG)" and "Calibrate with limits". The input is as with raking, but with population counts (not shares). The result is a new weight column.
How it works
- Choose the method, 1 to 3 variables, type the population count for each group. The total may stay empty (then the sum of the first variable counts).
- A column can be chosen as the starting weight (for example the design weight); without one, every case counts 1.
- Linear can give negative weights. Statable then shows a note and the button "Calibrate with limits". With limits, the factor new over old stays between two limits (for example 0.5 to 3).
- As with raking, the question "drawn individually" follows, and the column counts as a survey weight.
For specialists
Calculated with survey::calibrate (calfun = linear, optional bounds); limits need the MASS package. The calculation runs in the browser through webR.