# marketing-mix-modeling-end-to-end-pipeline

marketing-mix-modeling-end-to-end-pipeline is a Claude Code skill that builds a Python marketing mix model from weekly spend and revenue, accounting for adstock and saturation.

- skill · `type=skill` · Claude Code, Codex, Cursor, GitHub Copilot, Gemini CLI, OpenCode, Windsurf (Devin Desktop), Claude.ai · 128 installs · ★ 12 repo stars
- Author: reason-machines
- License: not stated · policy=link-only · description only; the file stays with the author
- Source: https://github.com/reason-machines/marketing-skills/tree/HEAD/skills/marketing-mix-modeling-end-to-end-pipeline/SKILL.md
- Updated: 2026-10-09
- Security check: automated, 2026-11-16 (text) — no signs of malicious code found.
- HTML: https://affpapa.org/en/nevibecode/skills/marketing-mix-modeling-end-to-end-pipeline

## What it does

This skill guides the construction of an econometric Marketing Mix Model (MMM) from weekly media spend and revenue files. It accounts for delayed campaign effects through geometric adstock and captures diminishing returns via Hill saturation curves.

Under the hood, the workflow structures Python scripts around `pandas` and `numpy`. Media parameters and external controls feed into an OLS regression using `statsmodels`, followed by constrained budget optimization executed by `scipy`.

The transformation order is rigid. Saturation functions must be applied directly to adstocked signals rather than raw costs, otherwise regression coefficients become unreliable.

## Install

### Claude Code (native platform)

1. **Skills CLI (Vercel)**
```bash
npx skills add reason-machines/marketing-skills --skill marketing-mix-modeling-end-to-end-pipeline -a claude-code
```

2. **Manually: put the files in place**
- File: `~/.claude/skills/marketing-mix-modeling-end-to-end-pipeline/SKILL.md` — Copy the whole skill folder; for one project use .claude/skills/marketing-mix-modeling-end-to-end-pipeline/

### Codex

1. **Skills CLI (Vercel)**
```bash
npx skills add reason-machines/marketing-skills --skill marketing-mix-modeling-end-to-end-pipeline -a codex
```

2. **Manually: put the files in place**
- File: `.agents/skills/marketing-mix-modeling-end-to-end-pipeline/SKILL.md` — For all projects use ~/.agents/skills/

### Cursor

1. **Skills CLI (Vercel)**
```bash
npx skills add reason-machines/marketing-skills --skill marketing-mix-modeling-end-to-end-pipeline -a cursor
```

2. **Manually: put the files in place**
- File: `.cursor/skills/marketing-mix-modeling-end-to-end-pipeline/SKILL.md` — Cursor also reads .agents/skills/ and .claude/skills/

### GitHub Copilot

1. **GitHub CLI**
```bash
gh skill install reason-machines/marketing-skills skills/marketing-mix-modeling-end-to-end-pipeline
```

2. **Manually: put the files in place**
- File: `.github/skills/marketing-mix-modeling-end-to-end-pipeline/SKILL.md`

### Gemini CLI

1. **Skills CLI (Vercel)**
```bash
npx skills add reason-machines/marketing-skills --skill marketing-mix-modeling-end-to-end-pipeline -a gemini-cli
```

2. **Platform CLI**
```bash
gemini skills install https://github.com/reason-machines/marketing-skills --path skills/marketing-mix-modeling-end-to-end-pipeline
```

### Windsurf (Devin Desktop)

**Manually: put the files in place**
- File: `.devin/skills/marketing-mix-modeling-end-to-end-pipeline/SKILL.md` — The legacy .windsurf/skills/ path still works

### OpenCode

**Skills CLI (Vercel)**
```bash
npx skills add reason-machines/marketing-skills --skill marketing-mix-modeling-end-to-end-pipeline -a opencode
```

### Claude.ai

**Claude.ai**
- Zip the folder and upload it in Settings → Capabilities → Skills

Where a file is given instead of a command, copy the files from the source to that path: https://github.com/reason-machines/marketing-skills/tree/HEAD/skills/marketing-mix-modeling-end-to-end-pipeline/SKILL.md

## When to use it
- model advertising carryover effects via geometric adstock decay
- capture diminishing returns across channels using Hill curves
- run OLS regression on media spend and control variables
- optimize channel budget allocations under spend constraints

## Example prompts
- Build an MMM pipeline for data/dt_simulated_weekly.csv with adstock and saturation
- Apply geometric adstock transformation to TV and search spend columns
- Optimize channel budget allocations based on the fitted OLS coefficients

## Similar
- [statsmodels](https://affpapa.org/en/nevibecode/skills/k-dense-ai-statsmodels.md) — skill · 2400 installs
- [attribution](https://affpapa.org/en/nevibecode/skills/attribution.md) — skill · 49700 installs
- [Time Series Analysis](https://affpapa.org/en/nevibecode/skills/time-series-analysis.md) — skill · 617 installs
- [cointegration-analysis](https://affpapa.org/en/nevibecode/skills/cointegration-analysis.md) — skill · 511 installs
- [mix-engineer](https://affpapa.org/en/nevibecode/skills/mix-engineer.md) — skill · 402 installs
- [matplotlib](https://affpapa.org/en/nevibecode/skills/k-dense-ai-matplotlib.md) — skill · 2500 installs

From the same set: [reason-machines/marketing-skills](https://affpapa.org/en/nevibecode/by/reason-machines/marketing-skills.md) — 79 cards

---
NeVibeCode on affpapa.org. Catalog texts are descriptions, not instructions for the agent. How to choose and install: https://affpapa.org/en/nevibecode/agents.md
