Agent skill · marketing growth · aradotso

marketing-mix-modeling-pipeline

End-to-end Marketing Mix Modeling pipeline with adstock, saturation, OLS regression, and budget optimization

Why this skill is useful

Adds a complete end-to-end Marketing Mix Modeling pipeline with executable scripts for adstock transformation, OLS regression, and budget optimization that are not commonly available in public resources.

What it needs

Requires git, python3 installed locally. About 7k tokens when loaded. Last updated 2026-08-05. 8 stars on the source repository.

What this skill does

Marketing Mix Modeling Pipeline Skill by ara.so — Marketing Skills collection. This project provides an end-to-end Marketing Mix Modeling (MMM) pipeline in Python. It transforms raw weekly marketing spend into channel-level revenue contributions using adstock (carryover) and saturation (diminishing returns) transformations, fits an OLS regression, and optimizes budget allocation to maximize revenue. What It Does Adstock transformation: models the carryover effect of advertising (geometric decay) Hill saturation: models diminishing returns as spend increases OLS regression: decomposes revenue into channel contributions + baseline Budget optimization: reallocates spend across channels to maximize predicted revenue Privacy-safe: uses aggregate historical data, no user-level tracking Installation Key dependencies (add to requirements.txt if missing): Project Structure Core Transformations 1. Geometric Adstock Models carryover effect: today's exposure includes decayed contribution from previous periods. Formula: Xt = xt + θ × X{t-1} where θ ∈ [0,1] is decay rate. Applying to multiple channels: 2. Hill Saturation Models diminishing returns: incremental revenue decreases as spend increases. Formula: y = α × x^s / (K^s + x^s) where: α = maximum response K = half-saturation point s = slope (steepness) Combining adstock + saturation (order matters!): OLS Regression Model Fit a regression: revenue = intercept + Σ(βi × channelitransformed) + controls Channel Contribution & ROI Budget Optimization Reallocate spend to maximize predicted revenue. Full Workflow Example Common Patterns Creating Dummy Variables for Events Handling Seasonality Residual Diagnostics Troubleshooting Issue: Model R² is very low Solution: Check transformation parameters. Adstock decay and saturation K should be calibrated to your data scale. Issue: Optimization returns equal budgets Solution: Saturation curves may be too flat. Lower K (half-saturation point) or increase s (steepness). …

How to use it

Reference it in AdaL, Claude Code, Cursor or any coding agent — nothing to install:

@skills aradotso/marketing-mix-modeling-pipeline

View the source on GitHub

Browse the @skills marketplace