Skip to content

Checking the methods are correct

I asked Claude to read back over its own code, check it for correctness, and comment it so the working was visible. It found a small problem: a variable called last_event that was actually the last observation, death or censoring, not the last death. The commented code now states its assumptions explicitly: that every mouse not recorded as dead survived to exactly day 50, with no drop-outs.

Then I asked Claude to teach me. What is the log-rank test actually doing? Where can I read more? It suggested Bland & Altman's 2004 BMJ paper, which I added into the folder. I could better see that the analysis checked out.

I then had a discussion with it about log-log plots and it made one for the data in ph_check.py. This illustrated a tendency in Claude to go on doing analyses, even when they are not really needed. It was clear this data set was too small to test assumptions, but Claude kept going anyway.

After I asked for a reference for the log-log diagnostic, I read the Wikipedia article on proportional hazards models it recommended and found no mention of it. This was a clear example of it getting (maybe a minor detail) wrong.

When asked, it found three papers from Cancer Cell and Nature Cancer using survival analysis at small n. Closest match was Di Meo et al. (2025).

That is the finding, and I would not have got there by asking a chatbot. It took reading papers, checking journals, and finding myself contradicted by what the field actually does. The log-log plot is a textbook tool more than a practised one. Knowing that changes what I write in the methods — and means my figure, which carries confidence intervals where published ones do not, is doing more than standard requires.

The pattern to take: use the agent to do the work, then use the agent to attack the work. It is unusually good at the second job, and it is the job most needing doing.

Sources

Also see