Skip to contents

Check the inputs

Check case counts, population estimates and, for the model-based SPI, district boundaries. Use method = "simple" for the simple SPI table.

spi_check_inputs()
Check the inputs before calculating SPI

Calculate the simple SPI

Calculate annual SPI from earlier case counts and population estimates, and inspect the calculation for one district.

spi_simple()
Calculate the simple SPI from preceding reporting
spi_simple_explain()
Show how one district's simple SPI was calculated

Calculate the model-based SPI

Fit expected monthly counts with INLA and calculate annual or monthly SPI, with each year’s expected counts estimated from preceding years only. Pass district boundaries directly, or inspect the neighbour graph separately. spi_compare_overdispersion() compares the three models for count variation.

spi_adjacency()
Build a neighbour graph from district boundaries
spi_expected()
Fit the BYM2 expected-count model
spi_index()
Compute the Surveillance Performance Index (SPI)
spi_compare_overdispersion()
Compare observation models for expected counts

Prepare POLIS data

Place AFP cases in months, build the district by month panel of non-polio AFP cases and the under-15 population panel, and choose the months the model is fitted on and the SPI is read over.

spi_case_date()
Date each AFP case is placed on
spi_case_panel()
District by month panel of non-polio AFP cases
spi_pop_index() spi_pop_panel()
Under-15 population per district and year for the model
spi_window() spi_panel_months()
Months the rolling SPI is read over and the model is fitted on

Read SPI over a rolling window

Read SPI over a rolling window from one fit on the full history, for districts or provinces, and classify it against the SPI threshold and the NPAFP target.

spi_rolling_index()
Rolling SPI for AFP surveillance from POLIS-shaped tables
spi_window_summary()
SPI over a rolling window from one fitted model
spi_window_classify()
Classify a window summary on the SPI and the NPAFP rate

Compare with the NPAFP target

Compare simple or model-based SPI with the conventional NPAFP target and map the result.

spi_compare_npafp()
Compare SPI with the NPAFP target
spi_compare_npafp_maps()
Map the NPAFP rate, SPI, and their classification

Review districts

Organise district review with the five STEPS components, then produce a table or a one-page district report.

spi_field_guide()
Review relative reporting shortfalls with STEPS
spi_field_guide_table()
Render the SPI field guide as a gt or flextable table
spi_field_guide_pager()
Create a one-page SPI district report
spi_field_guide_help()
Learn to read the SPI field guide

Example data

Synthetic surveillance data for the fictional country Harad, used in the examples and articles.

synth_surveillance
Synthetic AFP surveillance data
synth_field_guide
Precomputed SPI field guide for the synthetic data

Methods

Convert package results to tibbles.

as_tibble
Re-export tibble::as_tibble for method dispatch