An official website of the United States government

# Calculating APC with Weighting

Let d1,¼,dn be the directly standardized rates for the n years for which we wish to calculate an APC. Let nij be the population size for the ith year for the jth age group, let zij be the count of the number of cancer cases for the ith year for the jth age group, and let cj be the standard population for the jth age group. Then

$${\Huge d_i = \frac{\sum_{j=1}^{A}\frac{c_j z_{ij}}{n_{ij}}}{\sum_{j=1}^{A}c_j} }$$

Let

yi = log(di)

and let xi be the ith year. Then we estimate the variance of Yi with:

$${\Huge \hat{v_i} = \frac{\sum_{j=1}^{A}\frac{c_j^{2} z_{ij}}{n_{ij}^{2}}}{ (\sum_{j=1}^{A}\frac{c_j z_{ij}}{n_{ij}})^{2}} }$$

and the weight for the ith year is $${\Large w_i = \frac{1}{\hat{v_i}} }$$ .  See:

Kim HJ, Fay MP, Feuer EJ, Midthune DN. Permutation test for joinpoint regression with applications to cancer rates. Statistics in Medicine 2000;19;335-51 (correction: 2001;20:655).

Then the estimate of the slope of the line (on the log scale) is

$${\Huge m = \frac{\left(\frac{\sum_{i=1}^{n}w_ix_iy_i}{\sum_{i=1}^{n}w_i} \right) - \left( \frac{\sum_{i=1}^{n}w_ix_i}{\sum_{i=1}^{n}w_i}\right)\left( \frac{\sum_{i=1}^{n}w_iy_i}{\sum_{i=1}^{n}w_i}\right)}{\left( \frac{\sum_{i=1}^{n}w_ix^{2}_i}{\sum_{i=1}^{n}w_i}\right) - \left( \frac{\sum_{i=1}^{n}w_ix_i}{\sum_{i=1}^{n}w_i}\right)^{2}} }$$

Then the APC is just 100 ×( em - 1 ). To estimate the standard error of m, s, we use the square root of:

$${\Huge s^{2} = \frac{\sum_{i=1}^{n} w_i \left( y_i-\hat{y}_i\right)^{2}}{n - 2} \left( \frac{\sum_{i=1}^{n}w_i}{\left(\sum_{i=1}^{n}w_i\right) \left(\sum_{i=1}^{n}w_ix^{2}_i \right) - \left(\sum_{i=1}^{n}w_ix_i \right)^{2}} \right) }$$

where

$${\Large \hat{y}_i = b + mx_i }$$

and

$${\Huge b = \frac{\sum_{i=1}^{n}w_iy_i - m\sum_{i=1}^{n}w_ix_i}{\sum_{i=1}^{n}w_i} }$$

See:

Neter J, Wasserman W, Kutner M. Applied Linear Statistical Models. R.D. Irwin, 2nd edition, 1985; pages 167, 220.

Then the 100×(1 - a)% confidence intervals for the APCs are:

$${\Large CI_{low} = 100 \times \left( e^{[m - s \cdot t_{1-\frac{\alpha}{2},n-2}]} - 1 \right)}$$

$${\Large CI_{high} = 100 \times \left( e^{[m + s \cdot t_{1-\frac{\alpha}{2},n-2}]} - 1 \right)}$$