BSTVCUser Guide
Desktop website ↗Download software

Count: acute hepatitis B

A compact end-to-end Poisson workflow using five US states and annual surveillance counts from 2012 to 2023.

Download this caseGo to the workflow ↓

Know the data

The source case combines acute hepatitis B surveillance counts with socioeconomic and environmental indicators in five Appalachian states: Kentucky, Tennessee, North Carolina, Virginia, and West Virginia. The study period is 2012–2023. The source manual identifies CDC, ACS, and NOAA as data sources.

File / fieldMeaning
hbv_a5_space.xlsxOriginal wide table: one row per state
Hepatitis-B-Ready-Panel.csvAdded panel: 60 rows, with values preserved
us_a5/us_a5.*Five-state map component set
GEOIDState identifier: 21, 47, 37, 51, 54 in map order
YEARCalendar year, 2012 through 2023 in the ready panel
COUNTAcute hepatitis B surveillance case count
PDPopulation density
UNINSUninsured proportion
POVPoverty proportion
PRECIPAnnual precipitation

The five selected variables have no missing entries in the provided source data. The panel has 60 unique state–year observations (5 × 12). All response values are non-negative integers.

1. Convert the wide table

BSTVC Desktop expects a long table with one row per spatial unit and time point. Open Data Conversion, load hbv_a5_space.xlsx, and confirm five source rows. Select the following settings:

ParameterValue
ID columnsGEOID (optionally retain other invariant state attributes)
Time Sequence2012:2023
New Time Column NameYEAR
Number of Variables to Convert5
Count case: the five-state wide table loaded for conversion.
Count case: the five-state wide table loaded for conversion. Click to enlarge.

For each of the five variables, name the converted column and select the inclusive start–end range. Choose Select by Range; verify exactly 12 time columns in chronological order.

New variable nameStart columnEnd column
COUNTCOUNT2012COUNT2023
PDPD2012PD2023
UNINSUNINS2012UNINS2023
POVPOV2012POV2023
PRECIPPRECIP2012PRECIP2023
  1. After selecting all ranges, choose Start Conversion.
  2. Check for 60 rows with fields GEOID, YEAR, COUNT, PD, UNINS, POV, PRECIP, plus any invariant fields you chose to retain.
  3. Download the converted table and save it as Hepatitis-B-Converted-Panel.xlsx.
Count case: converted panel preview and download controls.
Count case: converted panel preview and download controls. Click to enlarge.

2. Import the panel and map

  1. Open Data Input and use the modeling table Browse control to select Hepatitis-B-Ready-Panel.csv (or your saved converted panel).
  2. In the map Browse control, select the complete us_a5 shapefile component set.
  3. Leave the custom matrix input empty for the default neighborhood.
  4. Select Load and Validate Input.
  5. Review Data Table field properties, types, missing-value ratios, and raw preview. Then review Map field properties and the boundary preview.

Review COUNT as numeric counts and the four predictors as numeric variables. Confirm that all five GEOID values are present and match the map. The field is a spatial key, not a predictor. For a population-rate question, raw counts and rates are different targets: the documented example models counts and does not demonstrate an exposure offset control.

Count case: validated input and panel fields.
Count case: validated input and panel fields. Click to enlarge.
Count case: the five-state geographic preview.
Count case: the five-state geographic preview. Click to enlarge.

3. Check spatial order

  1. Open Data Check and select the BSTVC spatiotemporal panel check mode.
  2. Set Time Field to YEAR and Space Field to GEOID.
  3. Select Run Check and read the log. Confirm the full set of map identifiers has matched.
  4. If the application reports automatic rearrangement, export the checked table for your records and use Checked Data during modeling. If it reports an already aligned order, use Raw Data.

The original workbook lists states in a different order from the map: the map order is KY, TN, NC, VA, WV. A reshape alone does not guarantee correct order. The added ready panel follows map order at each year, but verify the application’s check log in either route.

Count case: the source workflow reports automatic rearrangement.
Count case: the source workflow reports automatic rearrangement. Click to enlarge.

4. Configure and run the Poisson model

ParameterChoose
Response Variable YCOUNT
Explanatory Variables XPD, UNINS, POV, PRECIP
Response TypeCount (Poisson)
Time FieldYEAR
Space FieldGEOID
Data SourceRaw Data if already aligned; Checked Data if rearranged
Standardize X VariablesYes for the demonstrated comparisons
Spatial weight matrixDefault QUEEN-B
Threads6 as the starting setting
Count case: source model settings. The historical screenshot uses Year and a shortened UNIN label; select the actual YEAR and UNINS fields in the supplied ready panel.
Count case: source model settings. The historical screenshot uses Year and a shortened UNIN label; select the actual YEAR and UNINS fields in the supplied ready panel. Click to enlarge.
  1. Open BSTVC modeling and enter the settings listed above.
  2. Recheck the response family, time field, spatial field, and Data Source. Do not substitute IDs or time for explanatory variables.
  3. Select Run Model once and wait for the progress message to finish.
  4. When the result table appears, select Download All Tables. Save the workbook as hbv_all_result.xlsx in your case output folder.
  5. Keep the checked input table, map, chosen variables, neighborhood, thread setting, software version, and any error log with that workbook.
Count case: completed model results and export controls.
Count case: completed model results and export controls. Click to enlarge.

5. Read time, space, and contribution

Count-model coefficients describe associations on the log scale of the modeled mean. They are not directly changes in the number of cases. Keep credible intervals in view when discussing direction, magnitude, and variation. Standardization changes a predictor’s interpretation from one raw unit to a standardized unit.

Plot temporal means with both 95% and 50% credible bands. If you add a LOESS curve for visual guidance, retain the original annual points; that smoother is a display layer rather than a new posterior estimate. For maps, join spatial coefficients using GEOID.

As with the binary case, the documented Poisson desktop model does not supply the residual component needed for an overall model explainable percentage. Interpret STVPI as the available relative factor contribution, within the model’s scope.

Source example: count-model temporal coefficients and uncertainty.
Source example: count-model temporal coefficients and uncertainty. Click to enlarge.
Source example: smoothed temporal display with the original annual estimates.
Source example: smoothed temporal display with the original annual estimates. Click to enlarge.
Source example: spatial coefficient maps for PD, POV, PRECIP, and UNINS.
Source example: spatial coefficient maps for PD, POV, PRECIP, and UNINS. Click to enlarge.
Source example: relative spatiotemporal contribution and uncertainty.
Source example: relative spatiotemporal contribution and uncertainty. Click to enlarge.

6. Assess count predictions

Inspect local.prediction and confirm that predict_y is a predicted mean on the count scale. A mean prediction can be fractional; it is not a newly observed integer case count. If an export contains only a linear predictor, confirm the appropriate transformation before using count metrics.

Compare predictions with observed COUNT values. Mean absolute error (MAE) describes the average absolute error in case counts. Mean Poisson deviance respects the count response scale; define the zero-count contribution correctly. A deviance-based pseudo-R² compares that deviance to a mean-only reference and can be negative.

Historical count example: observed versus predicted counts with descriptive error metrics.
Historical count example: observed versus predicted counts with descriptive error metrics. Click to enlarge.
Historical count example: annual maps of predicted mean counts.
Historical count example: annual maps of predicted mean counts. Click to enlarge.

7. Finish the case and keep your evidence

Save the checked panel, model settings, software version, map components, workbook, and any derived plots in an output folder. Read Understand results before drafting conclusions, and use R visualization for the plots above. Your next case can be continuous HALE or binary COVID-19.