DEV Community

bao han
bao han

Posted on

Preserve the allocation unit when extracting cluster trials

A cluster-randomized trial can report both the number of assigned clinics and the number of individual patients. When the outcome table reports an effect estimated at the patient level, keep the analysis method and location with the estimate. The participant count alone does not tell you whether the analysis accounts for allocation by clinic.

Use separate fields for the unit of allocation, cluster count, participant count, and reported method. A check during extraction can surface rows that need a reviewer to inspect the Methods section. Here is a runnable example with synthetic records.

from dataclasses import dataclass


@dataclass
class Result:
    locator: str
    clinics: int
    participants: int
    method: str | None


rows = [
    Result("Paper A, Table 2", 12, 336, None),
    Result("Paper B, Table 3 and Methods", 10, 280, "cluster-level summary"),
]

for row in rows:
    if not row.method:
        print(f"Review {row.locator} ({row.clinics} clinics, {row.participants} people)")
Enter fullscreen mode Exit fullscreen mode

Expected output:

Review Paper A, Table 2 (12 clinics, 336 people)
Enter fullscreen mode Exit fullscreen mode

The first row needs a source check. Read the paper and supplementary methods for a model or summary that accounts for clustering. When the analysis is suitable under the review protocol, capture the reported effect and uncertainty from that analysis. Keep unknown methods visible so synthesis decisions remain traceable.

Method source: Cochrane Handbook Chapter 23, methods of analysis for cluster-randomized trials.

I work on RigorMed, an AI research workspace. The evidence table example shows how to keep a source location beside a result.

This article was prepared with AI assistance. The example is synthetic.

Top comments (0)