Binned residuals

When you bin the residuals into groups with the same sum of working weights, is the process order by working residuals and keep adding until you get close to the target size, or do you combine random data points to get to the target size regardless of the working residual value?

Comments

  • What we're trying to do is clean up the graph that has the working residual on the y-axis and something of interest on the x-axis. That something of interest is a continuous 'variable' such as the linear predictor, a particular variable of interest, or the exposure usually.

    In any case, there is a natural order to the x-axis values so we arrange the pairs (x1, y1), (x2, y2), ... in ascending order by xi and then choose the number of buckets. Take the total of the working weights and divide by the number of buckets to get the target weight for each bin. Then form each bin by grouping adjacent xi values until you reach (close to) the target weight. Lastly, calculate the binned working residual for each bin and plot.

    If we binned using the y-axis or binned randomly then we would very likely lose the signal that we're trying to clean up.

  • Thanks! Makes sense now.

Sign In or Register to comment.