Calculate the estimated number of cases of dementia for each organisation (denominator) by applying the age and sex-specific reference rates to the age and sex structure of its population:

\(E_k= \displaystyle\sum_{ij}N_{ijk}\times p_{ij}\)

Where:

*E*_{k} is the estimated value for the subject organisation *k*

*N*_{ijk} is the population (65+ patient list size) for each combination of age band *i* and sex* j* in subject organisation *k*

*p*_{ij }is the binomial proportion for each combination of age band *i* and sex *j* in the reference population (CFAS II)

Calculate the estimated diagnosis rate for each organisation (indicator value) by dividing its observed dementia diagnoses by its estimated value and express this as a percentage:

\(\lambda_k =\frac {O_k}{E_k} \times 100\)

Where:

*\(\lambda_k\)* is the estimated diagnosis rate for the subject organisation *k*

*O*_{k} is the recorded 65+ dementia diagnoses in the subject organisation *k*

*E*_{k} is the estimated value for the subject organisation *k*

Calculate the upper and lower 95% confidence limits for each organisation’s indicator value by simulation. Repeat the indicator calculation 100,000 times, randomly resampling each time from the age and sex-specific expected distributions, and the recorded diagnoses count distribution, to create a distribution of 100,000 random samples from the overall indicator distribution. Take the 2500th smallest and the 2500th largest values from this distribution as estimates of the 95% lower and upper confidence limits respectively:

\(\lambda_k^{LL} = \lambda sim_{k(n)} = n (\lambda sim_{k1,...,} \lambda sim_{k100,000})\)

\(\lambda_k^{UL} = \lambda sim_{k(100,000-n)} = 100,000-n(\lambda sim_{k1,...,} \lambda sim_{k100,000})\)

Where:

\(\lambda_k^{LL}\) is the lower 95% confidence interval for subject organisation *k*

\(\lambda_k^{UL}\) is the upper 95% confidence interval for subject organisation *k*

*n* defines the threshold of the indicator distribution based on the number of repetitions, 100,000, and level of confidence, 95%: 100,000 * (1-0.95) / 2

\(\lambda sim_{k1,...,k100,000}\) is the order of randomly sampled indicator values for subject organisation *k* produced by repetition of the following:

\((\lambda sim_k= \frac {Orand_k}{Erand_k} \times100)_{1,...,100,000}\)

Where:

*Orand*_{k} is the randomly sampled diagnoses count value for organisation k produced by the inverse cumulative probability function with:

probability: \(R \epsilon (0,...,1)\)

mean: \(O_k\)

standard deviation: \(\sqrt O_k\)

*Erand*_{k }is the randomly sampled expected value for organisation k produced as follows:

\(Erand_k = \displaystyle\sum_{ii} N_{ijk} \times prand_{ij}\)

Where:

\(N_{ijk}\) is the population (65+ patient list size) for each combination of age band *i* and sex *j* in subject organisation *k*

\(prand_{ij}\) is the randomly sampled binomial proportion for each combination of age band *i* and sex *j* in the reference population (CFAS II) produced as follows:

\(prand_{ij} = \frac {{\exp (p_{ij}^{icf})}}{{1 + {\exp (p_{ij}^{icf})}}}\)

Where:

\(p_{ij}^{icf}\) is the inverse cumulative probability function for each for each combination of age band *i* and sex *j* in the reference population (CFAS II) with:

probability: \(R \epsilon (0,...,1)\)

mean: \(\log_e (\frac {p_{ij}}{100-p_{ij}})\)

Standard deviation: \(\frac {{\log_e ({\frac {p_{ij}^{UL}}{100-p_{ij}^{UL}}})} - {\log_e ({\frac {p_{ij}^{LL}}{100-p_{ij}^{LL}})}}}{2/1.96}\)

Where:

\(p_{ij}^{UL}\) is the lower 95% confidence limit for each combination of age band *i* and sex* j* in the reference population (CFAS II)

\(p_{ij}^{LL}\) is the lower 95% confidence limit for each combination of age band i and sex j in the reference population (CFAS II)