Facentrain: AI and Quant Analysis

Working With Claude: A Field Guide for Quantitative Analysts

Facentrain

Working With Claude to Enhance Quantitative Analysis

If you’re taking this training, you already know how to run quantitative analyses. This is about the layer in between — how to work with Claude so it sharpens your thinking instead of replacing it.

~105 min, self-paced 4 checkpoints Feedback via Slack
0

Start here

5 min

This training is not about statistics. It’s about the specific skill of directing AI well enough that it makes your analytic work better instead of murkier — and knowing exactly where the line is that it shouldn’t cross.

Who this is for

Consultants at Facente with intermediate-to-advanced quantitative skills — comfortable in R, Excel, or similar tools, and fluent in the underlying statistics — who want to use Claude well as part of that work. Nothing here will teach you what a confidence interval is. Everything here is about the conversation you have with Claude around your analysis.

How this works

Read, watch the one embedded video, and do the practice prompts as you go — most are short. Four points in the training are marked as checkpoints: you’ll post a small piece of real work to #_facentrain, and Shelley will reply there with feedback or answer questions. You can move through this straight through, or jump to whichever module is most relevant using the menu on the left.

By the end, you’ll be able to

  • 01Explain what Claude can and can’t reliably do with quantitative data, and why that distinction matters for your work.
  • 02Handle client data safely in a Claude conversation — without ever uploading a raw dataset.
  • 03Structure a prompt that produces a genuinely useful analysis plan, not just a plausible-sounding one.
  • 04Use Claude as a debugging partner and a stats tutor — not just a code vending machine.
  • 05Use Claude to pressure-test your framing, equity lens, and limitations before a report goes out the door.
1

How Claude actually works

18 min

1.1  What Claude is actually doing

Claude doesn’t “know” your data, “run” your regression, or “look up” a fact the way a colleague would — unless it’s actually using a tool, like web search or code execution, to do that specific thing. Underneath, at every step, it’s predicting the most plausible next stretch of text given everything you and it have said so far. That’s the whole mechanism. The well-organized bullet points, the confident tone, the apparent understanding — all of that is a byproduct of very good next-word prediction, not a separate layer of comprehension sitting on top of it.

That has a direct, practical consequence for quant work: Claude is genuinely strong at pattern-based reasoning — spotting what’s odd about a regression result, generating analysis options you hadn’t considered, restructuring a dense paragraph. It’s much less trustworthy the moment a task secretly depends on doing arithmetic on data it can’t actually see, or recalling a specific fact rather than a general pattern. Knowing which situation you’re in is most of the skill covered in this training.

For the underlying mechanics — well worth the nine minutes if you want the real model, not a metaphor:

“Large Language Models explained briefly,” 3Blue1Brown (~9 min, free, YouTube).

How to think about it Treat Claude like a sharp new colleague in their first week: quick, well-read, good at structuring a problem — but with no memory of your last project unless you remind them, and no instinct yet for which of your clients hates jargon. They need context, a clear ask, and someone senior enough to catch it when they’re confidently wrong. You bring the curiosity and the critical judgment; Claude doesn’t have either on its own.

1.2  What’s different about this vs. Googling or asking a colleague

  • It reflects the patterns in its training data — which has its own blind spots and dominant assumptions, the same caution you’d apply to any single source. It won’t volunteer where it might be biased on a given topic, but it’s genuinely good at surfacing that if you ask directly: “What assumptions am I making here that you’d push back on?”
  • Long, meandering conversations degrade. If Claude starts repeating itself, contradicting something you already told it, or missing context you gave it earlier, that’s your signal to start a fresh conversation rather than push through the same thread. It’s less that it “runs out of memory” and more that a long, unfocused thread makes it harder for the model to weight what’s actually relevant right now.
  • It can hold a lot in one conversation — a full codebook, long interview transcripts, several documents at once — far more than older tools could. That’s genuinely useful. It is not, however, a reason to paste in more than you need, especially where client data is involved. More on exactly where that line sits in Module 2.

1.3  A few things worth knowing about Claude specifically

  • Projects. Claude.ai has a “Projects” feature — a way to store a client’s codebook, style guide, or background documents once, so every new conversation about that project starts with that shared context instead of you re-explaining it each time.
  • Tools, used directly. Claude can search the web when it’s useful, and — depending on what’s turned on in your workspace — execute code or produce files. Ask for what you actually want rather than working around a limitation Claude may not even have anymore.
  • Facente’s Team plan. By default, Anthropic does not use conversations from commercial plans like ours to train its models (confirm current settings under your workspace’s Data & Privacy settings if you want to check). That’s a genuinely different default than some consumer AI tools. It does not change the rule in Module 2 about never uploading raw client data — that rule is about confidentiality and security norms, not just model training.

Quick self-check

1. Claude gives you a plausible-sounding explanation for a surprising regression result you described to it. What actually happened, mechanically?

2. True or false: because Facente’s Team plan doesn’t train on our chats by default, it’s fine to upload a raw client dataset with participant identifiers.

3. You’ve been in one long Claude conversation for over an hour and it starts contradicting something you told it 40 minutes ago. What’s the best move?

2

Data privacy & confidentiality

15 min

2.1  Why this isn’t optional in our work

Facente Consulting handles HIV, HCV, STI, and substance-use treatment data — often under data use agreements, IRB conditions, or confidentiality obligations that existed long before any AI tool did. Those obligations don’t change because the tool got smarter. The rule in this module applies regardless of which AI tool you’re using, and regardless of how good its privacy settings are.

2.2  What Claude’s Team plan actually does with your data

  • By default, Anthropic does not use commercial-plan conversations (including Team plans like ours) to train its models. That’s a real, verifiable default — not marketing language — and it’s a meaningfully different posture than some consumer AI products.
  • That said, your conversations are still stored on Anthropic’s servers, and a Team account is not a substitute for a properly executed data use or business associate agreement. Treat it the way you’d treat any external SaaS tool without a signed data agreement in place — because unless one exists for our account, that’s exactly what it is.

2.3  The rule: describe your data, don’t upload your data

Never upload a raw dataset with row-level records — especially anything with participant identifiers — to any AI tool, including Claude. Instead, describe it well enough that Claude can reason about its structure without ever seeing a real person’s record.

The TEDS-D / Sierra Health Foundation analysis plan

For the MAT/MOUD landscape analysis using the national TEDS-D substance-use treatment dataset, the actual prompt never included a single row of real data. Instead it gave the model:

  • The dataset’s name, year, and public source (TEDS-D 2022, a publicly available national dataset)
  • A link to the public codebook
  • The exact recode logic already applied to one variable — REASON, recoded into a treatment-success indicator — written out as the actual R code, so there was no ambiguity about what the derived variable meant
  • A column-level summary (mins, quartiles, means, factor-level counts, NAs — generated via R’s summary() and exported to CSV), never individual rows
  • Then, and only then, the actual analytic question

That’s everything Claude needs to reason well about structure, variable types, and plausible analyses — with zero individual records exposed.

Source: AI prompt for analysis planning, MAT/TEDS-D project, Sierra Health Foundation

Common pitfall “Describing your data” is not the same as pasting in a spreadsheet screenshot or the first 20 rows “just to give it a sense of the format.” If a row contains anything that could identify a real person — even indirectly, through a rare combination of variables — leave it out. A codebook plus summary statistics is almost always enough. If it isn’t, that’s a sign to talk through the specific columns you need rather than reaching for the raw file.

Spot the difference

Two ways someone might start a prompt about the same project:

A: “Here’s our client roster spreadsheet [attached] — can you tell me which demographics are underrepresented in MAT access?”

B: “I have a dataset of N=[x] treatment episodes with these variables: [list, with types]. Here’s the summary statistics for each [attached, no row-level data]. Which demographics appear underrepresented in MAT access based on this summary, and what analysis would confirm it?”

Only B is safe to send — and it also happens to produce a more useful answer, because it forces you to hand Claude structure instead of hoping it infers the right thing from a raw file.

Checkpoint 1

Pick a dataset you’re currently working with, or a recent project. Write a one-paragraph description of it the way you’d hand it to Claude: what it is, its variables (grouped by type, not row-by-row), and any summary statistics you’d attach — with zero identifiers.

Post it to #_facentrain tagged “Checkpoint 1”
3

Planning an analysis with Claude

20 min

3.1  Four ingredients of a prompt that actually plans an analysis

  1. What you’re working with — R, Excel, SPSS, and the dataset itself (described per Module 2)
  2. What you want Claude to do — suggest analyses? critique a plan you already have? both?
  3. The scope of this specific question — not “analyze my data,” but the actual research question at hand
  4. What you want the output to sound like, and for whom — a technical peer-review memo reads nothing like an advocacy brief

Giving Claude a role — “Act as a PhD epidemiologist,” “act as a skeptical program officer” — isn’t decoration. It’s telling the model which register and which body of pattern to draw from. A biostatistician’s caveats look different from a policy advocate’s framing, and naming the role gets you closer to the one you actually want.

The full MAT/TEDS-D analysis-planning prompt

The real prompt used for the Sierra Health Foundation landscape analysis had all four ingredients, in this order:

  • Role + audience: “Act as if you are a PhD-level epidemiologist and public health consultant… hired by a large foundation…”
  • Background: a real paragraph on California’s opioid response, funding context, and recent policy shifts (the X-waiver’s elimination), so Claude wasn’t reasoning in a vacuum
  • The actual research questions the foundation had posed, listed out in full — not paraphrased
  • The dataset — TEDS-D, the codebook link, the recode logic, and the summary statistics, exactly as covered in Module 2
  • The specific ask: “What are 3–5 analyses I could run on this dataset that would help answer some of these questions?”

Both Gemini and ChatGPT were run on this same prompt for comparison. Both surfaced four to five candidate analyses, each tied explicitly to one of the foundation’s stated questions and named specific variables and methods (logistic regression on MAT receipt by demographics, stratified comparisons by referral source, an interaction test between co-occurring mental health diagnosis and MAT). They diverged in emphasis — one leaned toward fewer, deeper multivariable models; the other offered more options with lighter write-ups on each. Neither was “the” analysis plan. Getting a second read — from a colleague or a second AI tool — is a legitimate technique here, not a crutch.

Source: AI prompt for analysis planning, MAT/TEDS-D project, Sierra Health Foundation

Try it If you want to see how Claude specifically handles this same prompt, substitute your own project’s details into the four-ingredient structure above and run it. Compare what you get to what’s described above — where does it agree, and where does it push in a different direction?

3.2  Pressure-test the plan before you run it

Three reusable prompts, each catching a different kind of failure:

Test 1 — reality checkHere’s my analysis plan: [paste]. Here’s my dataset summary: [paste]. Can this data actually answer these questions? Are the columns and filters I’m assuming available?
Test 2 — usefulness to interest holdersAct as a skeptical program officer at [organization]. Read this analysis plan and give three reasons it might not meet your needs.
Test 3 — equity coverage scanAct as an equity-focused analyst. Based on this plan, what disaggregations or subgroups are missing that could reveal important differences?

Keep these three almost exactly as written in your own prompt bank (Module 6 has a starter one). They’re reusable as-is across nearly any project.

Checkpoint 2

Take a real (or recent) research question of yours. Using the four-ingredient structure from 3.1, draft the prompt you’d use to ask Claude for 3–5 candidate analyses. Don’t run it yet — just write it.

Post it to #_facentrain tagged “Checkpoint 2” — I’ll reply with what I’d tighten before you actually run it.
📄 Download full MAT/TEDS-D prompt & both AI responses here
4

Writing & debugging code with Claude

20 min

4.1  The core prompt shape for code

Code request templateAct as a [tool] expert. I want to [goal]. My data looks like [description]. Write [code/formula] to do this, and explain the logic — not just the syntax.

The “explain the logic” part matters even when you already know the right answer. It’s your check that Claude’s reasoning is actually sound rather than just plausible-looking — the same instinct you’d apply to a junior colleague’s first draft.

4.2  Real example: the ggplot legend bug

Missing legend symbols, air quality monitoring project

Working with Atmotube Pro sensor data, a recurring ggplot2 problem: AQI categories with no data points on a given day weren’t showing up with a colored symbol in the legend at all.

What made the prompt work wasn’t luck — it included the actual code chunk, what had already been checked (the color-mapping vector, the factor level order), and a precise description of the symptom, rather than “my legend is broken.” That was enough to trace the bug to one specific line: assigning a bare string to a dummy row’s factor column (dummy1$AQI_cat <- "hazardous") silently drops the factor levels back to plain character, which is what broke the legend. The fix — explicitly re-wrapping it in factor(..., levels = levels(GraphData$AQI_cat)) — came with that reasoning attached, not just corrected code.

The lesson isn’t “the AI is smart.” It’s that the prompt included enough of the actual state of the world — the code, what was already ruled out, the exact symptom — that there was only one plausible explanation left standing.

Source: “R coding help” conversation, air quality monitoring project

4.3  Real example: stats-tutor mode, not just code

A confidence interval nobody trusted, DeLIVER Care Van project

Comparing three HCV testing pathways with very different group sizes (23 / 36 / 80), a logistic regression produced an odds ratio with a confidence interval running from 4.49 to over 25,000. The question asked wasn’t “fix my code” — it was “why might this be happening,” described with the actual group structure and sample sizes attached.

That framing is what unlocked a real, situation-specific answer: a small, ambiguous reference group (people never RNA-confirmed, so their outcome status was partly inferred) combined with near-complete separation in the data, rather than a generic “small samples produce wide intervals” non-answer.

A related exchange in the same thread asked why a non-significant Fisher’s Exact Test and a large, significant adjusted odds ratio from Firth’s penalized logistic regression weren’t contradictory — they were answering different questions (crude association vs. adjusted association). That’s a reusable pattern any time two of your own results seem to disagree: describe both results and ask directly whether — and why — they might not actually conflict, instead of assuming one of them is wrong.

Source: “R coding help” conversation, DeLIVER Care Van HCV testing project

4.4  The same structure works outside of code

Qualtrics carry-forward logic

A survey-building problem, not a coding one: carrying forward selected choices from a prior question while adding three new choices at the end of the list — except Qualtrics kept inserting the new choices at the top instead. The fix (per-choice display logic, instead of relying on native carry-forward) was diagnosable because the prompt named the specific tool, the specific goal, and exactly how the actual behavior diverged from the expected behavior.

Same shape as the R examples above: goal, specific mechanism, and exactly how reality diverged from expectation. That structure isn’t R-specific — it works for Excel, SQL, SPSS, Qualtrics, anything.

Source: “Qualtrics help” conversation

Debugging checklist
  • Paste the actual code, formula, or steps — not a paraphrase
  • Paste the actual error message or actual (wrong) output, verbatim
  • State what you expected instead
  • Say what you’ve already tried or already ruled out
  • Ask for the fix and the explanation

Checkpoint 3 (optional / stretch)

Next time you hit a real error — in R, Excel, SQL, Qualtrics, anything — work it using the checklist above.

Post it to #_facentrain tagged “Checkpoint 3” whenever it comes up — no rush on this one.
5

Reviewing framing & limitations

20 min

The fastest way to undermine solid quantitative work is to report it in a way that blames people for what a system did to them — or to let a real limitation surface for the first time in a reviewer’s comments instead of your own draft. Claude is genuinely useful for catching both, if you ask directly. It won’t volunteer this on its own.

5.1  Real example: the equity-lens review

“What am I missing before this goes to the foundation?”

The actual prompt usedConsidering all these findings I have, act as an equity-focused data analyst. Is there anything important I am missing in my analysis, that I should add in before presenting this information to the foundation?

Both Gemini and ChatGPT, run on the same findings, converged on similar territory:

  • A push to look at intersections — race × housing status, race × gender — rather than only single variables in isolation
  • A direct reminder that quantitative data shows what is happening, not why — and a suggestion to say that explicitly rather than let the gap go unnamed
  • A specific, reusable reframing technique: rewrite findings phrased as being about people’s behavior — “patients on MAT are less likely to complete treatment” — into findings about systems — “the system’s definition of ‘completion’ fails to capture the long-term success of patients stabilized on MAT.” Same data. Different accountability.

Source: AI review of framing and limitations, MAT/TEDS-D project

Reusable — systems reframeRewrite this finding so it attributes the pattern to systems and structures rather than to individual choices, without changing what the data actually shows: [insert finding]

5.2  Real example: the limitations review

“What limitations should be in the report?”

The actual prompt usedNow act as a research reviewer. Based on the information I’ve presented thus far, what specific limitations or caveats should be noted in the report?

What came back was specific to this dataset and this population — not generic “more research is needed” filler:

  • TEDS-D only captures publicly funded treatment facilities — not private practice, and not the telehealth or primary-care prescribing that expanded after the X-waiver’s elimination
  • “Treatment success,” defined by discharge status, is a poor fit specifically for MAT, since MAT is long-term maintenance care rather than a time-limited episode with a “completion” date — the finding that MAT was associated with lower completion is likely an artifact of that mismatch, not evidence MAT doesn’t work
  • Correlation-vs-causation caveats on the housing/MAT association specifically
  • Unmeasured confounders named specifically for this population: substance use severity, social support, motivation for change

Notice what made these useful: the prompt handed Claude the actual findings and actual data context, not just “what are some limitations of research in general.”

Source: AI review of framing and limitations, MAT/TEDS-D project

5.3  Two more worth keeping

Overclaiming checkWhat might we be tempted to conclude from this finding that the data doesn’t actually support?
Dehumanizing language checkAre there any phrases in this paragraph that reduce people to labels or obscure their agency? [insert paragraph]

Checkpoint 4 — capstone

Take one real finding or summary sentence from your own current work (or reuse the MAT example if you don’t have one handy). Run it through two prompts above, right now, in your own Claude conversation: the systems reframe, and the limitations reviewer.

Post it to #_facentrain tagged “Checkpoint 4” — this is the one I’ll spend the most time on.
📄 Download full equity & limitations review prompts and responses here
6

Your prompt bank & wrap-up

8 min

6.1  Build a living prompt bank

The fastest way to lose the value of this training is to reinvent these prompts from scratch every time. Keep a running doc — even the checkpoint drafts from this training are a start — with the prompts that actually worked for you.

PurposeTemplateFrom
Bias check“What assumptions am I making here that you’d push back on?”Module 1
Data description (never raw data)“[Dataset, source]. Codebook: [link]. Recodes: [describe]. Summary stats attached, no row-level data. My question: [ask].”Module 2
Analysis planning“Act as [role]. I want to answer [question]. My data: [description]. What are 3–5 analyses that would help?”Module 3
Reality-check the plan“Here’s my analysis plan + dataset summary. Can this data actually answer these questions?”Module 3
Skeptical-funder pressure test“Act as a skeptical program officer at [org]. Give three reasons this plan might not meet your needs.”Module 3
Equity coverage scan“Act as an equity-focused analyst. What disaggregations are missing that could reveal important differences?”Module 3
Code / formula request“Act as a [tool] expert. I want to [goal]. My data looks like [Y]. Write [code] and explain the logic.”Module 4
Debugging“[Goal]. My code: [paste]. Error/unexpected result: [paste]. Already checked: [list]. What’s wrong?”Module 4
Reconcile conflicting results“Result A: [X]. Result B: [Y]. These seem to disagree — do they, or are they answering different questions?”Module 4
Systems reframe“Rewrite this finding to attribute the pattern to systems/structures, not individual choices, without changing what the data shows: [finding]”Module 5
Limitations review“Act as a research reviewer. Based on what I’ve presented, what specific limitations or caveats should be noted?”Module 5
Overclaiming check“What might we be tempted to conclude from this finding that the data doesn’t actually support?”Module 5
📄 Download a copy of this prompt bank here, if you like.

6.2  Wrap-up

Four checkpoints, whenever you reach them: data description, analysis-planning prompt, a real debugging pass, and the framing/limitations capstone — all posted to #_facentrain. I review async and reply there; no need to wait for a live session.

None of this replaces your judgment. It just means the time you spend with Claude produces something worth trusting, instead of something that merely sounds finished.

Built for Facente Consulting  ·  Working With Claude: A Field Guide for Quantitative Analysts