Reporting
AuraScore 91/100

Clinical Trial Telemetry Aggregation and Summary Statistics Script Generator

Create an automated R statistical reporting script to process laboratory trial telemetry and generate publication-grade summary tables.

Use this template when preparing reproducible statistical batch reports from clinical or laboratory research data. It generates an end-to-end analysis script calculating cohort variance and endpoint metrics.

Template

Role: Lead Research Informatics Engineer specializing in reproducible biostatistical reporting scripts.

Context

  • Study identifier: {{trial_phase_name}}
  • Raw data format: {{telemetry_data_schema}}
  • Key endpoint: {{primary_endpoint_metric}}
  • Comparison grouping: {{cohort_grouping_factor}}
  • Significance threshold: {{statistical_significance_cutoff}}
  • Export file format: {{export_file_format}}

Task

Generate a complete, fully documented R statistical script that ingests experimental trial telemetry, validates data integrity, computes baseline demographic and endpoint statistical aggregations across study arms, conducts significance tests, and exports publication-ready summary tables.

Method

  1. Load raw study logs matching {{telemetry_data_schema}} using tidyverse and data.table conventions.
  2. Filter observation records applicable strictly to {{trial_phase_name}} while stripping incomplete patient runs.
  3. Compute central tendency metrics (mean, median, standard deviation, IQR) for {{primary_endpoint_metric}}.
  4. Stratify statistical summaries across cohorts defined by {{cohort_grouping_factor}}.
  5. Execute two-tailed hypothesis testing evaluating cohort separation against {{statistical_significance_cutoff}}.
  6. Construct formatted output tables adhering to clinical summary standards (including sample size, effect sizes, and p-values).
  7. Write the finalized summary datasets to disk matching {{export_file_format}} specifications.

Constraints

  • Code MUST be written in modern R (v4.2+) utilizing tidyverse packages (dplyr, tidyr, readr).
  • MUST NOT modify or overwrite raw primary telemetry source files.
  • MUST explicitly set random seeds for any resampling or non-parametric statistical methods used.
  • Output table column headers must be sanitized for human-readable scientific publication.

Output format

Provide the generated deliverable in these designated sections:

  1. Pipeline Metadata (bulleted list of required R packages, environment assumptions, and input paths).
  2. Complete R Analysis Script (single executable R script structured with explicit headers, transformation functions, and export routines).
  3. Sample Output Table Preview (ASCII or Markdown representation of the resulting summary report).

Self-review

  • Ensure the statistical tests applied are appropriate for the data types implied in {{primary_endpoint_metric}}.
  • Verify all 6 variables are referenced within the R script parameters or data load blocks.
  • Confirm reproducible seed management and file output paths are implemented without syntax errors.
AuraScore breakdown
91/100Provisional
Instruction clarity15/15 · Strong

Explicit role, a named task, and discrete steps the model can follow.

Context architecture12/12 · Strong

Background, inputs and variables the model needs before it starts.

Constraint engineering12/12 · Strong

Hard boundaries — what the model must and must not do.

Output specification14/14 · Strong

A named, field-level shape for the response.

Reasoning structure10/10 · Strong

Ordered work items that force analysis before an answer.

Model compatibility10/10 · Strong

Length and structure that travel across frontier models.

Token efficiency5/10 · Thin

Signal density — instruction weight without padding.

Reusability7/7 · Strong

Documented variables so the scaffold adapts to new inputs.

Robustness5/5 · Strong

Quality bar, assumptions and behaviour when inputs are thin.

Observed performance1/5 · Thin

How much real usage the template has behind it.

data-analytics
data-reporting
research-productivity-operations
research
r-script
biostatistics