StatAgentWeekly email

Review a statistical program for logic errors and hidden assumptions

AI reads an R or SAS program and lists suspected logic problems, unclear sections and undocumented assumptions, with line references. It is a prompt for human review, not independent QC.

Untested ideaMedium risk

Task
Programming
Roles
Programmer, Statistician
Assistants
Microsoft 365 Copilot, ChatGPT, Claude
Last reviewed

Evidence

Untested idea. No clinical-programming evaluation found. Published tests of LLM-generated unit tests (Java) concern a different task. Prompt not run.

Steps

  1. Paste a short program section.
  2. Ask for a line-referenced review.
  3. Verify each finding by running code.
  4. Reject unsupported claims.
  5. Keep review notes.

Prompt

This is the prompt, typed out. No assistant reply is shown.

You
Review the program below. List, with line references: possible logic errors (population filters, joins, missing handling, rounding), sections where intent is unclear, undocumented assumptions and hard-coded values. For each, state what you would test to confirm. Do not rewrite the code. If unsure, say so. Rules: use ONLY the input below. Tag anything the input does not state as OPEN QUESTION. Never invent numbers; use placeholders such as xx. Do not claim anything is verified. INPUT: [paste input here]

Verify before you use it

How it fails

The AI reports confident bugs that are not there and misses subtle derivation errors.

Data rule: No confidential production code or data. Use public or invented programs.

Related

How we check. Back to the directory.