- name
- marketing-science-academic-writing
- description
- AI agent skill for writing academic marketing science papers from topic selection through structural modeling, identification, estimation, and full draft assembly
- triggers
- ["write a marketing science paper","help me write for Marketing Science journal","design a consumer utility model","set up BLP demand estimation","design identification strategy for marketing research","create counterfactual simulations","write academic marketing paper","structural estimation for marketing"]
# Marketing Science Academic Writing
> Skill by [ara.so](https://ara.so) — Marketing Skills collection.
A comprehensive skill for writing quantitative marketing science papers targeting flagship journals (Marketing Science, JMR, JM, JCR, JAMS, IJRM, QME, Marketing Letters). Guides you through the complete 0-to-draft pipeline: topic positioning, consumer utility modeling, identification design, structural estimation, counterfactual simulations, and manuscript assembly.
## What This Skill Does
This skill transforms your research idea into a complete academic paper draft by:
1. **Topic Positioning**: Gap analysis, journal selection, contribution framing
2. **Consumer Utility Modeling**: Micro-founded demand systems, notation, utility specification
3. **Identification & Estimation**: Causal inference strategies (DID/RDD/IV), structural estimation (BLP/GMM)
4. **Counterfactuals & Experiments**: Simulation design, conjoint analysis, field experiments
5. **Full Draft Assembly**: Complete LaTeX manuscript with INFORMS formatting
**Key differentiator**: Domain-specific conventions for marketing journals that generic writing skills don't cover — utility model structure, identification justification, structural estimation workflows, and journal-specific reviewer expectations.
## Installation
The project is a skill repository that you reference, not a package you install. The skill files provide structured guidance and reference materials.
### For AI Coding Agents
**OpenCode**:
```bash
cp -r marketing-science-writing ~/.config/opencode/skills/
```
**Claude Code**:
```bash
cp -r marketing-science-writing ~/.claude/skills/
```
**Codex**:
```bash
cp -r marketing-science-writing ~/.agents/skills/
```
**Cursor / Windsurf**:
```bash
cp -r marketing-science-writing ~/.cursor/skills/
# or
cp -r marketing-science-writing ~/.windsurf/skills/
```
### Manual Integration
Reference `SKILL.md` and the `references/` directory in your agent's custom skills path, or concatenate the markdown files into your system prompt.
## Project Structure
```
marketing-science-writing/
├── SKILL.md # Main skill orchestration
├── references/
│ ├── journal-characteristics.md # 8 journals: profiles & expectations
│ ├── modeling-conventions.md # Utility models, demand systems
│ ├── identification-guide.md # DID, RDD, IV strategies
│ ├── estimation-guide.md # BLP, GMM, MLE, Bayesian
│ ├── counterfactual-guide.md # Simulation design
│ ├── conjoint-analysis.md # Conjoint experiment design
│ ├── field-experiments.md # Field experiment protocols
│ ├── marketing-implications.md # Actionable implications framework
│ ├── reviewer-expectations.md # Reviewer checklist
│ └── writing-patterns.md # Reusable writing templates
├── assets/
│ └── demand-model-reference.md # Generic demand model structures
├── examples/
│ ├── manuscript_template.tex # INFORMS LaTeX template
│ └── blp_estimation_example.py # BLP estimation starter code
└── README.md
```
## Core Usage Patterns
### Pattern 1: Full 0-to-Draft Pipeline
**Trigger**: "Take me through the full marketing science pipeline for a paper on [topic]"
**Workflow**:
1. **Stage 1**: Topic positioning → gap table, journal selection, contribution list
2. **Stage 2**: Consumer utility model → notation, utility specification, demand derivation
3. **Stage 3**: Identification & estimation → DID/RDD/IV design, estimator choice
4. **Stage 4**: Counterfactuals & experiments → simulation design, experiment protocol
5. **Stage 5**: Full draft → LaTeX manuscript assembly
**Example**:
```
User: "Write a Marketing Science paper on BLP demand estimation
for the smartphone market with merger counterfactuals."
Agent: [Executes Stage 1]
→ Gap table: 8 closest papers (Nair 2007, Berry et al. 1995, etc.)
→ Target journal: Marketing Science (structural + IO focus)
→ Contributions: (1) First BLP on smartphone market,
(2) New demand-side micro moments using clickstream data,
(3) Merger simulation with regulatory implications
[Stage 2]
→ Utility specification with random coefficients on price, screen size, brand
→ Nested logit within operating system
→ Supply-side: Bertrand-Nash pricing game
[Stage 3]
→ Identification: Cost shifters as IVs (component prices from Counterpoint)
→ Micro moments: Match cross-price elasticities from clickstream
→ GMM estimation with optimal weighting matrix
[Stage 4]
→ Counterfactual: Simulate Apple-Samsung merger
→ Equilibrium: New Nash equilibrium prices post-merger
→ Welfare: Consumer surplus loss, producer profit gain
[Stage 5]
→ Complete LaTeX manuscript with INFORMS template
```
### Pattern 2: Stage-Specific Deep Dive
**Trigger**: "Help me design the consumer utility model for my paper"
**Focus**: Stage 2 only — utility specification, notation system, demand derivation.
**Example**:
```
User: "I'm studying ride-sharing demand. Help me specify the utility model."
Agent:
# Consumer Utility Model
## Notation
- $i$: consumer index
- $j$: ride option (Uber, Lyft, taxi, outside option)
- $t$: time period
- $p_{jt}$: price per mile
- $x_{jt}$: observable characteristics (wait time, vehicle quality)
- $\xi_{jt}$: unobserved quality shock
## Indirect Utility
Consumer $i$ obtains utility from option $j$ at time $t$:
$$u_{ijt} = \alpha_i p_{jt} + x_{jt}'\beta_i + \xi_{jt} + \epsilon_{ijt}$$
where:
- $\alpha_i \sim N(\alpha, \sigma_\alpha^2)$: random price coefficient (negative)
- $\beta_i \sim N(\beta, \Sigma_\beta)$: random coefficients on characteristics
- $\epsilon_{ijt}$: i.i.d. Type-I extreme value
## Choice Probability (Random Coefficients Logit)
The probability consumer $i$ chooses option $j$:
$$s_{ij}(\theta) = \int \frac{\exp(u_{ijt})}{\sum_{k=0}^J \exp(u_{ikt})} dF(\alpha_i, \beta_i)$$
Aggregate market share: $s_j = \int s_{ij}(\theta) dF(i)$
## Demand Inversion
For estimation, invert share equation:
$$\delta_j = \ln(s_j) - \ln(s_0)$$
where $\delta_j = \alpha p_j + x_j'\beta + \xi_j$ (mean utility).
```
### Pattern 3: Identification Strategy Design
**Trigger**: "I need to design the identification strategy for my marketing paper"
**Focus**: Stage 3 — causal inference or structural identification.
**Example for DID**:
```
User: "Amazon introduced same-day delivery in select cities.
I want to estimate the causal effect on sales."
Agent:
# Identification Strategy: Difference-in-Differences
## Treatment & Control
- **Treatment**: Cities with same-day delivery (rollout: 2014-2016, staggered)
- **Control**: Cities without same-day delivery (matched on demographics)
## Specification
$$\log(sales_{ct}) = \beta_0 + \beta_1 SameDay_{ct} + \gamma_c + \lambda_t + \epsilon_{ct}$$
where:
- $SameDay_{ct}$: indicator for city $c$ having same-day delivery at time $t$
- $\gamma_c$: city fixed effects
- $\lambda_t$: time fixed effects
## Parallel Trends Test
Event study specification:
$$\log(sales_{ct}) = \sum_{k=-K}^{-2} \delta_k D_{ct}^k + \sum_{k=0}^{K} \delta_k D_{ct}^k + \gamma_c + \lambda_t + \epsilon_{ct}$$
where $D_{ct}^k = 1$ if city $c$ is $k$ periods from treatment.
**Test**: $H_0: \delta_{-K} = \cdots = \delta_{-2} = 0$ (pre-trends)
## Robustness Checks
1. Callaway-Sant'Anna estimator (staggered treatment)
2. Synthetic control for treated cities
3. Triple-differences: same-day × product category × time
```
**Example for IV (Structural)**:
```
User: "Price is endogenous in my demand model. How do I construct instruments?"
Agent:
# Instrumental Variables for Demand Estimation
## Endogeneity Problem
Price $p_j$ is correlated with unobserved quality $\xi_j$ due to:
1. Simultaneous pricing (supply-side response to demand shocks)
2. Omitted product characteristics
## IV Strategy: BLP Instruments
### 1. Cost Shifters
**Instruments**: Input prices, wage indices, exchange rates
**Exclusion restriction**: Affect marginal cost → price, but not consumer utility directly
**Example**: Steel prices for automotive demand estimation
### 2. Hausman Instruments
**Instruments**: Prices of same product in other markets
**Assumption**: Market-specific demand shocks are uncorrelated
**Example**: Price of iPhone 13 in New York as IV for Boston demand
### 3. Differentiation Instruments
**Instruments**: Number of competing products, sum of rival characteristics
**Intuition**: More competition → lower markups → lower prices
**Construction**:
```python
# Sum of rival characteristics
df['IV_rival_features'] = df.groupby('market')['feature_score'].transform(
lambda x: x.sum() - x
)
# Number of rivals in same nest
df['IV_nest_count'] = df.groupby(['market', 'nest']).transform('size') - 1
```
### First-Stage Test
$$p_j = \pi_0 + \pi_1 Z_j + \pi_2 x_j + \nu_j$$
**Requirement**: $F$-statistic > 10 (Stock-Yogo weak IV test)
```
### Pattern 4: BLP Estimation Implementation
**Trigger**: "Set up BLP estimation code for my demand model"
**Output**: Working Python code using `pyblp` library.
**Example**:
```python
import pyblp
import numpy as np
import pandas as pd
# Load data
# Expected columns: market_ids, product_ids, shares, prices, characteristics, instruments
data = pd.read_csv('smartphone_data.csv')
# Define product formulation
# Random coefficients on: price, screen_size, brand_apple, brand_samsung
product_formulations = (
pyblp.Formulation('1 + prices + screen_size + C(brand)'), # linear
pyblp.Formulation('1 + prices + screen_size') # random coefficients
)
# Define agent formulation (demographics for random coefficients)
agent_formulation = pyblp.Formulation('0 + income + age')
# Problem setup
problem = pyblp.Problem(
product_formulations=product_formulations,
product_data=data,
agent_formulation=agent_formulation,
integration=pyblp.Integration('monte_carlo', size=1000, seed=0)
)
# Initial parameters
initial_sigma = np.diag([0.5, 0.3, 0.2]) # std dev for price, screen, brand coefs
initial_pi = np.zeros((3, 2)) # interactions with demographics
# Optimization
results = problem.solve(
sigma=initial_sigma,
pi=initial_pi,
optimization=pyblp.Optimization('l-bfgs-b', {'maxiter': 1000}),
iteration=pyblp.Iteration('simple', {'atol': 1e-12})
)
# Results summary
print(results)
# Elasticities
elasticities = results.compute_elasticities()
print("\nOwn-price elasticities:")
print(np.diag(elasticities).mean())
# Micro moments (optional)
# Match observed cross-price elasticity from clickstream data
observed_cross_elasticity = 0.15
micro_moments = pyblp.MicroMoment(
name='cross_price_elasticity',
value=observed_cross_elasticity,
compute=lambda data, results: results.compute_elasticities()[0, 1]
)
# Re-estimate with micro moments
results_micro = problem.solve(
sigma=initial_sigma,
pi=initial_pi,
micro_moments=[micro_moments],
optimization=pyblp.Optimization('l-bfgs-b')
)
# Counterfactual: Merger simulation
# Merge firm 1 (Apple) and firm 2 (Samsung)
changed_ownership = data['firm_ids'].copy()
changed_ownership[data['firm_ids'] == 2] = 1 # Samsung products now owned by Apple
merger_results = results.solve_merger(
changed_ownership=changed_ownership
)
print("\nMerger Effects:")
print(f"Price change: {merger_results.price_changes.mean():.2%}")
print(f"Consumer surplus change: ${merger_results.consumer_surplus_change.sum()/1e6:.1f}M")
```
**Key Configuration**:
- **Integration method**: Monte Carlo (1000 draws) for random coefficients
- **Optimization**: L-BFGS-B (handles bounds on sigma)
- **Iteration**: Simple fixed-point iteration for contraction mapping
- **Micro moments**: Optional — improve identification with additional data moments
**Environment variables** (if using cloud compute):
```bash
export PYBLP_CACHE_DIR=/path/to/cache # Cache intermediate results
export OMP_NUM_THREADS=8 # Parallel computation
```
### Pattern 5: Counterfactual Simulation
**Trigger**: "Design counterfactual simulations for my structural model"
**Example**:
```
User: "I estimated a demand model. Now simulate a price discrimination ban."
Agent:
# Counterfactual: Uniform Pricing Mandate
## Baseline Equilibrium
Current state: Firms set different prices across markets (3rd-degree price discrimination)
## Counterfactual Scenario
Policy: Firms must charge the same price in all markets
## Equilibrium Computation
### Step 1: Compute Baseline
Already have: $p^*, q^*, \pi^*$ from estimation
### Step 2: Constrained Optimization
Firm $f$ solves:
$$\max_{p_f} \sum_{m=1}^M (p_f - mc_{fm}) \cdot q_{fm}(p_f, p_{-f})$$
subject to: $p_f$ is constant across markets $m$
### Step 3: Nash Equilibrium
Iterate best responses until convergence:
```python
def compute_uniform_pricing_equilibrium(results, mc, markets, max_iter=100, tol=1e-6):
"""
Compute Nash equilibrium under uniform pricing constraint.
Parameters:
- results: pyblp estimation results
Voir sur GitHub