Bayesian hierarchical models for demographic small area estimation John Bryant Statistics New...

14
Bayesian hierarchical models for demographic small area estimation John Bryant Statistics New Zealand September 2013

Transcript of Bayesian hierarchical models for demographic small area estimation John Bryant Statistics New...

Page 1: Bayesian hierarchical models for demographic small area estimation John Bryant Statistics New Zealand September 2013.

Bayesian hierarchical models for demographic small area estimation

John Bryant

Statistics New Zealand

September 2013

Page 2: Bayesian hierarchical models for demographic small area estimation John Bryant Statistics New Zealand September 2013.

Examples of demographic small area estimation

Birth rates by age of mother by ‘area unit’• 39 age groups• 70+ territorial authorities• 61,000 births

Maori deaths by age and sex• 101 age groups• 2 sexes• 3,000 deaths

2

Page 3: Bayesian hierarchical models for demographic small area estimation John Bryant Statistics New Zealand September 2013.

Characteristics of demographic data

Cross-classified counts• Not records × variables

Often ‘complete’ counts rather than survey

Time-varying

Strong regularities

3

Page 4: Bayesian hierarchical models for demographic small area estimation John Bryant Statistics New Zealand September 2013.

Deaths, Maori males

4

Page 5: Bayesian hierarchical models for demographic small area estimation John Bryant Statistics New Zealand September 2013.

Bayesian hierarchical models an attractive approach

Demographic data are hierarchical

Shrinkage

Flexibility

Forecasting, probabilistic statements

Recent surge in number of papers

5

Page 6: Bayesian hierarchical models for demographic small area estimation John Bryant Statistics New Zealand September 2013.

Packages Demographic and DemographicEstimation

Under development

Originally only ‘Demographic accounts’• later realized more general application

Demographicdata structures and basic manipulation functions

DemographicEstimationBayesian hierarchical models, customised for demographic problems

6

Page 7: Bayesian hierarchical models for demographic small area estimation John Bryant Statistics New Zealand September 2013.

Application: Births rates by small area

7

Region 13, 1996 = 11 births; Region 2, 2006 = 1490 births; 10% of cells missing

Page 8: Bayesian hierarchical models for demographic small area estimation John Bryant Statistics New Zealand September 2013.

A model, three ways

8

res <- estimateModel(Model(y ~ Poisson(mean ~ age * region + year), region ~ Exch(mean ~ income + propn.maori, data = data.reg)), y = births, exposure = deaths, file = "fertility.res")

(1) (2)

(3)

Page 9: Bayesian hierarchical models for demographic small area estimation John Bryant Statistics New Zealand September 2013.

Results: All regions and years

9

theta <- fetch(res, where = c("model", "likelihood", "mean"))p <- dplot(~ age | region + factor(year), data = theta, midpoints = "age")useOuterStrips(p)

Page 10: Bayesian hierarchical models for demographic small area estimation John Bryant Statistics New Zealand September 2013.

Results, with unsmoothed rates

10

Page 11: Bayesian hierarchical models for demographic small area estimation John Bryant Statistics New Zealand September 2013.

Results: Change over time

11

regions <- paste("Reg", c(2, 5, 8, 13))p <- dplot(~ year | factor(age) * region, data = theta, subarray = region %in% regions, weights = females, overlay = list(values = subarray(births/females, region %in% regions), pch = 19, col = "black"))useOuterStrips(p)

Page 12: Bayesian hierarchical models for demographic small area estimation John Bryant Statistics New Zealand September 2013.

Results: Covariates

12

covariate <- fetch(res, where = c("model", "hyper", "region", "covariates"))dplot(~ covariate, data = covariate)

Page 13: Bayesian hierarchical models for demographic small area estimation John Bryant Statistics New Zealand September 2013.

Other features

Normal and binomial models

Diagnostics• Convergence• Replicate data

Manipulation of (voluminous) output

13

Page 14: Bayesian hierarchical models for demographic small area estimation John Bryant Statistics New Zealand September 2013.

Future work

More priors

Survey data

Forecasting

Lots more testing• Especially on big datasets

Eventually release on CRAN

14