# 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

 di
 =

 A å j=1 cj zij nij

 A å j=1 cj

Let

yi = log(di)

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

^
v

i
=
 A å j=1 cj2 zij nij2

 æ è A å j=1 cjzij nij ö ø 2

and the weight for the ith year is . 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

m =

æ
ç
ç
è
 n å i=1 wi xi yi

 n å i=1 wi
ö
÷
÷
ø
- æ
ç
ç
è
 n å i=1 wi xi

 n å i=1 wi
ö
÷
÷
ø

æ
ç
ç
è
 n å i=1 wi yi

 n å i=1 wi
ö
÷
÷
ø

æ
ç
ç
è
 n å i=1 wi xi2

 n å i=1 wi
ö
÷
÷
ø
- æ
ç
ç
è
 n å i=1 wi xi

 n å i=1 wi
ö
÷
÷
ø
2

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

s2 = æ
ç
è
 n å i=1 wi æ è yi - ^ y i ö ø 2

n-2
ö
÷
ø

æ
ç
ç
è
 n å i=1 wi

 æ è n å i=1 wi ö ø æ è n å i=1 wi xi2 ö ø - æ è n å i=1 wixi ö ø 2
ö
÷
÷
ø

where

 ^ y i = b + m xi

and

b =
 n å i=1 wi yi - m n å i=1 wi xi

 n å i=1 wi

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

CIlow = 100 ×( e[ m - s · t1-a/2,n-2 ] - 1 )

CIhigh = 100 ×( e[m + s · t1-a/2,n-2 ] - 1 )

where t1-a/2,n-2 is the inverse of the t distribution evaluated at 1-a/2 with n-2 degrees of freedom.