Variable Workshop Overview
Creating and Transforming Variables for Better Models
The Variable Workshop is your central hub for engineering new variables from your raw data. This powerful feature lets you create transformations that capture real-world marketing behaviors like carryover effects, diminishing returns, and time-shifted impacts—all without writing code.
What is Variable Engineering?
Beyond Raw Data
Raw marketing data often needs transformation to capture:
- Carryover effects: TV ads continue influencing sales for weeks 
- Diminishing returns: First $10K has more impact than next $10K 
- Time delays: Marketing in Week 1 affects sales in Week 2-3 
- Interaction effects: TV + Digital together more effective than sum of each 
- Seasonal adjustments: Normalize for time-of-year patterns 
Variable Workshop creates these transformations automatically.
Why Transform Variables?
Problem: Linear Models Miss Reality
If you model raw spend:
Sales = β₀ + β₁ × TV_SpendYou're assuming: ❌ Impact is immediate (no carryover) ❌ Returns are constant (no saturation) ❌ Each dollar has same effect (linear)
Reality: ✅ Impact persists over time ✅ Returns diminish with more spend ✅ Relationship is non-linear
Solution: Transformed Variables
With transformations:
Sales = β₀ + β₁ × f(TV_Spend_adstocked_saturated)Now capturing: ✅ Carryover effects (adstock) ✅ Diminishing returns (saturation) ✅ Realistic marketing response
Result: More accurate attribution, better ROI estimates, actionable insights
Variable Workshop Interface
Three Main Sections
1. Available Variables (Left Panel)
- All variables from your uploaded data 
- Previously created transformations 
- Search and filter functionality 
2. Transformation Builder (Center Panel)
- Select transformation type 
- Configure parameters 
- Preview transformation effect 
- Name new variable 
3. Variable Library (Right Panel)
- All created variables 
- Edit or delete transformations 
- Add directly to models 
- Export list 
Transformation Types Available
Time-Based Transformations
Lead/Lag Transformations Shift variables forward or backward in time
- Use case: Model delayed effects 
- Example: - TV_Spend_lag1(last week's TV spend)
Split by Date Create separate variables for different time periods
- Use case: Isolate campaign periods or seasonal changes 
- Example: - TV_Spend_Q4_Only
Mathematical Transformations
Multiply Variables Combine two variables into one
- Use case: Create interaction terms 
- Example: - TV_x_Digital(synergy effect)
Weighted Variables (WGTD) Apply custom weights to variable values
- Use case: Emphasize certain periods or adjust for inflation 
- Example: - Sales_Weighted
Marketing-Specific Transformations
Adstock (Carryover Effects) Model how marketing impact decays over time
- Use case: Capture lasting effects of TV, Radio, Print 
- Example: - TV_Spend_ads60(60% carryover rate)
Saturation Curves Model diminishing returns using S-shape or concave curves
- Use case: Realistic ROI at different spend levels 
- Example: - TV_Spend_ATAN_curve
Statistical Transformations
AVO (Average Value Optimization) Smooth volatile data using moving averages
- Use case: Reduce noise in erratic variables 
- Example: - Sales_AVO_4week
Standardization (STA) Scale variables to mean=0, std=1
- Use case: Compare effect sizes across different units 
- Example: - TV_Spend_Standardized
Basic Workflow
Step 1: Select Base Variable
Choose the variable you want to transform from your uploaded data
Step 2: Choose Transformation Type
Pick from the transformation menu (Lead/Lag, Adstock, Saturation, etc.)
Step 3: Configure Parameters
Set transformation settings:
- Lag periods (1, 2, 3 weeks) 
- Adstock rate (30%, 50%, 70%) 
- Curve parameters (alpha, beta, gamma) 
Step 4: Preview Transformation
Interactive chart shows:
- Original variable (before) 
- Transformed variable (after) 
- Side-by-side comparison 
Step 5: Create Variable
Click "Create" - new variable added to your library
Step 6: Use in Models
Add transformed variable to your models in Model Builder
Preview and Testing
Interactive Preview
Before creating a variable, see:
Visual Comparison:
- Line chart: Original vs. Transformed values 
- Scatter plot: Transformation function shape 
- Statistics: Mean, range, variance changes 
Example Preview:
Original TV_Spend: Mean = $18,500
Adstocked (60%):   Mean = $27,300 (accumulated effect)
Chart shows: Smoother line with peak values extendedTest Before Committing
Preview lets you:
- Experiment with different parameters 
- See immediate visual feedback 
- Understand transformation impact 
- Avoid creating unusable variables 
Iterate until satisfied, then create
Combining Transformations
Chained Transformations
You can apply multiple transformations sequentially:
Example: TV with Adstock AND Saturation
- Start: - TV_Spend(raw)
- Apply adstock: - TV_Spend_ads60
- Apply saturation: - TV_Spend_ads60_ATAN
Order matters:
- Usually: Adstock FIRST, then Saturation 
- Captures: Marketing accumulates over time, then saturates 
Creating Complex Variables
Interaction Terms:
- Create adstocked TV: - TV_ads60
- Create adstocked Digital: - Digital_ads40
- Multiply them: - TV_ads60_x_Digital_ads40
Result: Captures synergy between channels with proper carryover
Best Practices
Start Simple
Build Complexity Gradually:
- First: Use raw variables in OLS model (baseline) 
- Then: Add adstock to media channels 
- Next: Apply saturation curves 
- Finally: Test interaction terms if needed 
Don't over-engineer initially
Name Variables Clearly
Good Naming Convention:
{Base}_{Transformation}_{Parameter}
Examples:
TV_Spend_ads60
Digital_Display_lag2
Radio_ATAN_a15_p12
Sales_AVO_4weekBenefits:
- Easy to identify transformations 
- Understand at a glance 
- Avoid confusion 
Document Your Transformations
Keep Track:
- Why transformation was applied 
- Parameter choices and rationale 
- Which models use which transformations 
Use Variable Notes: Each created variable has optional notes field - use it!
Test Impact on Model
After creating transformation:
- Add to model in Model Builder 
- Check coefficient significance (t-stat) 
- Compare R² with/without transformation 
- Verify makes business sense 
If transformation doesn't improve model, don't use it
Variable Management
Editing Variables
Modify existing transformations:
- Click variable in library 
- Adjust parameters 
- Preview changes 
- Update (replaces in all models using it) 
Deleting Variables
Remove unused transformations:
- Right-click variable → Delete 
- Confirmation dialog (can't undo) 
- Models using it will show warning 
Best Practice: Export models before deleting variables
Exporting Variable List
Download Documentation:
- All created variables 
- Transformation types 
- Parameters used 
- Creation dates 
Format: Excel or CSV
Use Case: Documentation, sharing with team, reproducibility
Common Use Cases
Use Case 1: TV Campaign with Carryover
Scenario: TV ads continue influencing sales for 4-6 weeks
Solution:
- Create - TV_Spend_ads60(60% carryover)
- Test in model 
- Compare with raw TV spend 
- Use adstocked version (higher significance) 
Use Case 2: Digital Diminishing Returns
Scenario: First $5K in digital has high ROI, next $5K less effective
Solution:
- Create - Digital_ATAN_concavesaturation curve
- Test parameters in Curve Testing 
- Use saturated variable in model 
- Calculate ROI at different spend levels 
Use Case 3: Seasonal Campaign Isolation
Scenario: Holiday campaign Q4 only, want to measure separately
Solution:
- Create - TV_Spend_Q4_Only(Split by Date)
- Use in model alongside - TV_Spend_NonQ4
- Compare coefficients 
- Understand seasonal vs. baseline effectiveness 
Use Case 4: Lagged Price Effect
Scenario: Price changes take 2 weeks to affect sales
Solution:
- Create - Price_lag2(2-week lag)
- Test in model 
- If significant, use instead of current price 
- Better captures actual price-sales relationship 
Advanced Features
Batch Creation
Create multiple transformations at once:
- Select multiple base variables 
- Apply same transformation type 
- Configure once, create all 
Example: Transform all media channels with 50% adstock in one step
Template Library
Save transformation configurations:
- Store commonly used parameter sets 
- Apply to new variables quickly 
- Ensure consistency across models 
Example Template: "Standard Media Adstock" = 60% rate, applied to TV/Radio/Print
Variable Dependencies
Track relationships:
- See which variables are based on others 
- Understand transformation chains 
- Avoid circular dependencies 
Visual Dependency Graph (coming soon)
Summary
Key Takeaways:
🛠️ Variable Workshop = Transformation Hub - create all variable engineering here
📊 Multiple transformation types - time-based, mathematical, marketing-specific
👁️ Preview before creating - see transformations visually before committing
🔗 Combine transformations - adstock + saturation for realistic models
📝 Clear naming - use descriptive names with transformation details
✅ Test in models - verify transformations improve fit and make sense
🎯 Start simple, add complexity - don't over-engineer initially
Next Steps: Explore each transformation type in detail in the following pages!
Last updated