Panel Dynamic Logistic Regression

Customer Analytics Classification

Customers who bought last week are likelier to buy this week. Find out whether that is habit (buying makes them buy again) or loyalty (some customers were always going to buy), because the two call for opposite marketing.

πŸ‘¨β€πŸ« Professor Mode: Guided Learning Experience

New to habit and loyalty? Professor Mode walks you through why repeat buying is not proof of habit, and how the three models pull the two apart.

QUICK START: Choose Your Path

OVERVIEW & WHAT THIS TOOL SOLVES

A brand manager wants to mail 20,000 "first bottle free" coupons ($70,000) because loyalty-card data shows a shopper who bought last week is far likelier to buy this week. A free trial that turns a shopper into a regular (True Habit) pays for itself many times over; one that goes to someone who was going to buy anyway (Baseline Loyalty) is $3.50 handed away. This tool estimates three nested panel models to pull true habit apart from pre-existing customer loyalty.

🎯 Questions It Answers

  • Does buying this week actually cause a shopper to come back next week (habit), or are we just seeing loyal fans repeat-buy?
  • Will a "first purchase free" trial coupon echo into extra future orders after the promotion ends?
  • How much is our promotional lift inflated because offers were targeted to our best customers?

πŸ“‚ What Data You Need

  • A balanced or unbalanced customer panel (one row per customer per period, e.g., week or month).
  • Customer ID, Period Index, and a binary 0/1 Outcome (bought, renewed, opened app).
  • Optional time-varying drivers (coupon, feature, price) and a static customer segment column.

πŸ’‘ What You'll Discover

  • Side-by-Side Model Ladder (A, B, C): Watch how pooled habit shrinks once customer heterogeneity is accounted for.
  • Trial Echo Multiplier: Extra future purchases generated per induced trial order.
  • Out-of-Sample Holdout Check: Forecast accuracy on held-back future periods vs. each customer's own baseline rate.
πŸ” Key Nuances & Common Traps to Watch For Click to expand β–Ύ
  • "Bought last week" has two explanations that need opposite marketing: True habit (state dependence) means trial subsidies pay back across future periods; loyalty (unobserved heterogeneity) means targeting existing fans pays back, while blanket trial coupons subsidize purchases that would have happened anyway.
  • Why a pooled model (Model A) always overstates habit: Stacking all customer-weeks together lets loyal regulars' long buying streaks pose as habit.
  • Why fixed effects fail on short panels (The Nickell Problem): Giving every customer a separate dummy intercept alongside a lagged outcome \(y_{i,t-1}\) biases the habit estimate downward when panel history \(T\) is shortβ€”which is why Model C uses correlated random effects (Wooldridge / Mundlak).
πŸ“ Under the Hood: Model Equations & Variable Definitions Click to expand β–Ύ
The Three-Model Ladder (Pooled → Mundlak/Wooldridge → Random Effects) Panel Dynamic Logit
\[ \text{Model A (Pooled):} \quad \operatorname{logit} P(y_{it}=1) = \alpha + \phi\, y_{i,t-1} + \beta x_{it} \] \[ \text{Model B (Observed History):} \quad \operatorname{logit} P(y_{it}=1) = \alpha + \phi\, y_{i,t-1} + \beta x_{it} + \gamma_0 y_{i0} + \gamma \bar{x}_i \] \[ \text{Model C (Random Effects):} \quad \operatorname{logit} P(y_{it}=1) = \alpha + \phi\, y_{i,t-1} + \beta x_{it} + \gamma_0 y_{i0} + \gamma \bar{x}_i + u_i, \quad u_i \sim \mathcal{N}(0, \sigma^2) \]
πŸ’¬ Read it in plain English: Model A assumes all shoppers start with the same baseline appetite; Model B adjusts for each shopper's initial purchase and average exposure to promotions; Model C gives every shopper their own persistent latent loyalty baseline \(u_i\) so that \(\phi\) captures only true week-to-week habit.
Variable & Symbol Directory (Every Term Defined) Hover or focus any role badge for details
yit, yi,t-1
Current & Prior Period Purchase (0/1) YOUR DATA β“˜
Equals \(1\) if customer \(i\) bought in period \(t\) (or \(t-1\)), and \(0\) otherwise.
φ
True Habit (State Dependence) ESTIMATED β“˜
How much buying in period \(t-1\) causally shifts the log-odds of buying in period \(t\).
β, xit
Marketing Driver Slope & Value ESTIMATED β“˜
\(x_{it}\) is customer \(i\)'s promotional/marketing input in period \(t\); \(\beta\) is its immediate effect.
γ0, yi0
Initial-Condition Anchor (Wooldridge) ESTIMATED β“˜
\(y_{i0}\) is customer \(i\)'s period-0 purchase indicator; \(\gamma_0\) absorbs pre-sample loyalty differences.
γ, x̄i
Mundlak Customer-Mean Adjustment ESTIMATED β“˜
\(\bar{x}_i\) is customer \(i\)'s average driver exposure across all periods; \(\gamma\) captures targeting correlation.
ui, σ
Unobserved Customer Loyalty (Random Effect) ESTIMATED β“˜
\(u_i\) is customer \(i\)'s time-invariant latent loyalty; \(\sigma\) measures how widely baseline loyalty varies across shoppers.

Step 1DATA SOURCE

Start with a case: each was generated from a known model (or, for Crave, comes from the CLV tool with its model known), so at the end you can check the three models against the truth. Or bring your own panel: one row per customer per period.

πŸ“š

Use a Case Study

Four cases: a free-trial campaign for a grocery cold brew, a food-delivery app's win-back credits, a pet shop's VIP coupon, and a bookshop whose readers may all be much alike.

πŸ“€

Upload Your Data

Drag & Drop raw data file (.csv, .tsv, .txt)

Long format: one row per customer per period, with a customer id, a period and a yes/no outcome, plus optional driver columns and a segment. CLV's activity panels load as they are. At least 100 customers; at most 100,000 rows.

No file uploaded.

INPUTS & SETTINGS

Step 2Tell the model who, when and what

Pick the column that says who each row is, the column that says when, and the yes/no outcome. Then pick the drivers: things that could change a customer's chance of a "yes" in a given period, such as a coupon. Then say in a word or two what a "yes" is, and whether it is good or bad news: the write-ups use your words.

Drivers

Tick a driver to include it. "Same period" means this period's value; "1 period earlier" means the customer's value in the period before.

Driver Same period 1 period earlier
Load data to see its columns.

Step 3Decide what the model may know about each customer

Model A treats every customer alike. Model B adds what the data records about each one. Model C also gives every customer their own baseline. Switch pieces off to see what each one does to the habit estimate.

Advanced

πŸ€” Try this:

  1. Load Thistledown Market and run with every box ticked. Note the habit effect under A, B and C.
  2. Untick Fit model C and run again. Read the "Start here" box: what can the page no longer tell you?
  3. Load Crave and run. Then untick The segment column and run again. Which model moved, and which did not?

Load a case or upload a panel to begin.