Q-Statistics
Q-Statistics asks whether cases stay near other cases, more than they stay near controls — the people who could have become cases but didn't. Where the Space-Time Interaction Tests compare cases only against uniform expectation, Q-Statistics compares them against where people actually are, using a control group. Residential histories are included, so exposure years before diagnosis still count toward the comparison.
Case-Control Data
Q-Statistics needs both cases and controls: at least two of each, with case status read from a binary variable you choose. Each person can be represented either as a moving-point track — one geometry per person whose position changes over time, held at each fix until the next — or as static points grouped by an ID variable, which Vesta assembles into per-person residency segments. Either way, the time axis is cut at every segment boundary across the whole population, and nobody moves within one interval.
Neighbours and Duration Weighting
You choose k, the number of nearest neighbours considered around each case (default 5, up to 50). Neighbours are drawn from the combined pool of cases and controls present in that interval, using fractional-tie k-nearest-neighbour distance.
Duration weighting (on by default) multiplies each interval's contribution by how long that interval lasted before summing or standardizing, so a person's longer stretches in one place count for more than brief ones.
The Four Statistics
- Local — for each case, in each interval, the share of its k nearest present neighbours that are also cases. Summed across a case's life course and standardized by the number of intervals it was present for. Controls never receive a local statistic.
- Global — the local statistic summed across all cases, either per interval or as one life-course total — a population-level answer to "is there clustering anywhere, at any time?"
- Per-interval — the local and global statistics shown as a function of time, rather than collapsed to a single figure.
- Focused — clustering around a putative source you supply, either as coordinates or as the first point of a dataset. Unlike the local statistic, the candidate pool for a focused test is every present individual, case or control.
Statistical Significance
Significance comes from Monte Carlo inference: by default, 999 random reassignments of case/control labels (geometry and movement are never altered), seeded for reproducibility. Global and focused p-values reshuffle labels across the whole population; local, per-case p-values hold the case of interest fixed and reshuffle only the remaining labels, so a single case is never left without a comparison. You can set the number of permutations, the random seed, the significance threshold (default 0.05), and a correction for multiple comparisons (none, Bonferroni, or false discovery rate).
Process Steps
- Click on the "Analyze" button from the side bar menu.
- Select "Q-Statistics" from the available methods.
- Choose Automatic, Guided, or Full control guidance. See Analysis Introduction for more on the Guided Analyze wizard — Full control exposes every Monte Carlo and weighting setting described above.
- Select the dataset containing your case-control data, and the binary variable marking case status.
- Set the neighbour count (k) and whether to apply duration weighting.
- Optionally, provide a putative source location to compute the focused statistic.
- Select "Run".
- Local, global, per-interval, and (if requested) focused results, along with their significance, are saved in the Data panel to the right.