Statistical Code Review

Review R statistical analysis code for reproducibility and model specification.

Updated Mar 7, 2026
One-click install
npx skills add https://github.com/ntluong95/agent-skills-statistics --skill statistical-code-review
Or copy as Structured Prompt for Agent
Please help me install this Agent Skill.
Skill: Statistical Code Review
Source: https://github.com/ntluong95/agent-skills-statistics/tree/main/skills/common/code-review
Command: npx skills add https://github.com/ntluong95/agent-skills-statistics --skill statistical-code-review

SYSTEM DOCUMENTATION & REQUIREMENTS

💡 This Skill includes references (resource) components.

What problem does it solve?

This Skill addresses the critical need for maintaining high standards in statistical analysis code, ensuring reproducibility, and catching potential errors before they impact research outcomes.

Core Features & Use Cases

  • Reproducibility Check: Verifies that analyses can be rerun from raw data to final output by checking for proper seeding, data path handling, and session information capture.
  • Model Specification Audit: Reviews the correctness and justification of model choices, including outcome types, degrees of freedom, confounder inclusion, and DLNM parameterization.
  • Data Pipeline Review: Examines data manipulation steps for correctness, missing data handling, temporal alignment, and outlier treatment.
  • Results Integrity: Ensures that results are reported comprehensively with confidence intervals and sensitivity analyses.
  • Use Case: When submitting a pull request for a new analysis script, use this Skill to perform a thorough review against established best practices, ensuring the code is robust, reproducible, and scientifically sound.

Quick Start

Review the attached R script for reproducibility and adherence to statistical best practices.

Frequently Asked Questions about Statistical Code Review

High-intent search queries and answers about installing and using this skill.

FAQPage Schema
How do I review R code for statistical reproducibility?

To review R code for statistical reproducibility, verify proper seeding, data path handling, and session information capture to ensure analyses rerun accurately from raw data to final output.

What should I check when auditing model specifications in R scripts?

When auditing model specifications in R scripts, check the correctness of outcome types, degrees of freedom, confounder inclusion, and DLNM parameterization to ensure model choices are justified.

How do I validate data pipelines for missing data and outliers in R?

Validating data pipelines in R requires examining data manipulation steps to ensure correct handling of missing data, temporal alignment, and outlier treatment throughout the analysis workflow.

How to perform a pull request review for statistical analysis code?

Performing a pull request review for statistical analysis code involves checking reproducibility, auditing model specifications, validating data pipelines, and verifying results integrity against best practices.

Does this code review protocol support DLNM models in R?

Yes, this statistical code review protocol supports DLNM models in R by specifically auditing DLNM parameterization alongside standard model specifications, outcome types, and confounder inclusion.

What is results integrity in statistical code review?

Results integrity in statistical code review ensures that analysis results are reported comprehensively, including confidence intervals and sensitivity analyses, to verify scientific soundness and robustness.