Undertanding Goodness-of-Fit



Five types of assessment of fit are available for UK small-area synthetic microdata created by Pop91:

(1) Summary assessment at ED-level

(2) Cellular fit at ED-level

(3) Summary assessment at ward level

(4) Tabular & celluar fit at ward level

(5) Recreation of constraints from extracted microdata

See Huang and Williamson (2001) for a more detailed treatment of measures of fit

1) Summary assessment of fit at ED-level

A wide variety of reports on the fit of Pop91-generated synthetic microdata to known constraints are available.  Summary measures for each synthetic ED population are placed in district-specific report files with the name districtcode_Ged.dat (where districtcode = the first four characters of the 8-characters ONS ED name).  These summary reports may be downloaded in zipped format from the project website (follow this link).  An example file for one District is here.

The summary measures contained in districtcode_Ged.dat for each ED are:

EDCode         - ONS 8-character name

Time                - CPU seconds taken to estimate data

Evals               - no. of potential household replacements evaluated

NoOfRep        - no. of actual household replacements made

NFT                 - no. of statistically non-fitting tables

NFC                - no. of statistically non-fitting cells

PFC                - no. of statistically non-fitting cells after allowance for the ±1 impact of pseudo-random pre-release SAS data modification (barnardisation)

OTAE              - Overall Total Absolute Error (sum of absolute error across all cells)

ORSSZ            - Overall Relative Sum of Squared Z-scores

TAE_X            - Total Absolute Error associated with table X (tables numbered in order listed  in Pop91\Pop91CO_t17\Nm.dat)

RSSZ_X         - Relative Sum of Square Z-scores associated with table X

Temp               - final value of ‘temperature’; a simulated annealing control parameter

AreaP             - % of households in final combination drawn from the SAR region within  which the ED is located

NoOfh             - no. of households in synthetic ED

 

As a rule-of-thumb, synthetic microdata for EDs with NFT counts > 0, PFC>0 or OTAE > 250 should be treated with some caution.

Return to top

 

2) Cellular fit at ED-level

For each estimated ED a results file (EDCODE.est) is available detailing both the target constraining counts and their synthetic counterparts (the target counts are Crown Copyright, and are made available under licence).  

In raw form (example) these output files are given as table vectors.  The program Reformat_estimates.exe (download here) reconfigures this information into standard SAS table format (including header and stub labels), to better enable visualisation of the cellular fit achieved and to allow for easier comparison to published 1991 Census SAS tables (example).

Each reformatted output file includes the following information for each of the 14 tables used as constraints on the synthetic population estimation process:

a) constraining SAS counts

NOTE: In some cases these counts are not the ‘raw’ ONS counts, but modelled/revised counts generated to overcome problems of either data inconsistency between tables, or problems of 10% sampling.  Click here for summary.

b) estimated synthetic counts

[Derived by aggregating synthetic microdata for ED of interest]

c) Error (synthetic – target counts)

d) Z-scores

A Z-score of >=1.96 is taken to denote a non-fitting cell

Return to top

3) Summary fit at ward-level

It is possible that systematic biases in synthetic microdata undetectable at ED-level might cause problems when data are aggregated to ward-level.  Consequently a set of summary ward-level assessments of fit have been produced, comparing synthetic microdata, aggregated to ward-level, with known ED-level SAS-constraints, also aggregated to ward-level.

Files named DISTRICTCODE_Gwd.test (example) provide the following measures of overall fit based on a summary of cellular and tabular fit across all tables:

WDCODE      - ONS four-character ward identifier

ATAE               - average and standard deviation of Total Absolute Error across all tables

NOTFT, SD     - average number of statistically non-fitting tables

NOTFC1, SD  - average number of statistically poorly fitting cells

NOTFC2, SD  - average number of statistically non-fitting cells

ATAE/h            - average of (Total Absolute Error / no. of households in ward)

Noofh              - no. of households in ward

Return to top

4) Tabular & cellular fit at ward-level

The summary assessment of fit for data aggregated to ward level is supplemented by more detailed assessments at both tabular and cellular level, as outlined below.

a) Cellular fit

Files named WDCODE_Cwd.test (example) contain the following measures of cellular fit at the aggregated ward-level, reported for each cell count in each constraining table:

·        actual count (ward-level total)

·        synthetic count (ward-level total)

·        maximum and minimum estimated synthetic counts over k runs

[the above will be identical to the synthetic count as Pop91 uses only 1 run per ED]

·        5th and 95th percentile synthetic counts over k runs

[the above will be identical to the synthetic count as Pop91 uses only 1 run per ED]

·        Z-score

·        mean Z-score over k runs

·        poorly fitting cells (Z>±1.96)

·       non-fitting cells (Z>±1.96 even if ±1 added to SAS count to allow for effects of barnardisation)  

b) Tabular fit  

Files named WDCODE_Twd.test (example) contain the following measures of tabular fit at the aggregated ward-level:

WDcode            - ONS 6-character ward identifier

Table                -  SAS Table

Stotal               - SAS table total

Mtotal              - average synthetic table total

Cell                  - no. of cells in constraining table

MTAE              - average Total Absolute Error for table

MRAE             - average Relative Absolute Error for table (=MTAE/Mtotal)

SZ2ofM            - statistical fit of the mean synthetic count

MeanNF%            - % of mean synthetic counts with Z-score > 1.96

MSumZ2            - sum of table cell (Z-scores)2

SZ2>%            -  % of times that a table is statistically non-fitting

MNFC-1            - average number of statistically poorly fitting cells in table

MNFC-2            - average number of statistically non-fitting cells in table

Peakn1             - ‘Peakness’ of the counts of poorly fitting cells

Peakn2             - ‘Peakness’ of the counts of non-fitting cells

NotF1%            - % of table cells that are poorly fitting

NotF2%            - % of table cells that are non-fitting

CV                   - sum of table cell square Z-scores / table critical value

Return to top

5) Recreation of SAS tables using synthetic data

Having extracted the synthetic microdata for one or more EDs (see Extracting microdata), it is possible to double-check model fit by aggregating the microdata back into constraining table format. 

To recreate the default constraining tables, it is necessary to extract not only the SynPop91 default variables (including unique household ids), but also the original individual-level SAR variables ECONSEC (secondary economic activity) and RELAT (relationship to household head), the household-level derived variables DHDEPS (no. of dependants in household), DHRESID (no. of household residents) and HHDCOMP (h/hold composition [no and sex of adults; no. of dependent children]) and the individual-level derived variable OCCMAJOR (occupation recoded into major categories).

For analysis in SPSS, all of these variables should be extracted into a combined household and individual level file.  The SPSS syntax file DefaultTables.sps contains the code required to recreate the default set of constraining tables.

Return to top