Creating Curve Variables
How to Generate and Use Saturation-Transformed Variables
Overview
Creating curve variables transforms your original marketing spend data using saturation curves, generating new variables that capture diminishing returns and threshold effects. These transformed variables replace or supplement original variables in your models.
Two Methods for Creating Curves
Method 1: Via Curve Testing Interface
Path: Variable Workshop → Curve Testing
Process:
Test multiple curve configurations
Review statistical results
Select winning curves
Click "Add to Model" or "Create Variables"
Variables automatically created and added to model
Advantages:
Data-driven selection based on statistical fit
See all options before committing
Visual comparison of curve shapes
Automatically finds optimal parameters
Method 2: Manual Creation
Path: Variable Workshop → Create Curve Variables
Process:
Manually specify curve parameters
Choose specific Alpha and Power values
Create curve without testing
Use when:
You already know optimal parameters
Replicating curves from previous models
Following established guidelines for a channel
Creating Curves from Test Results
Step 1: Run Curve Tests
Navigate to Curve Testing
Select model to test against
Choose formula (ATAN recommended)
Select curve type (ICP or ADBUG)
Select variable to transform
Click "Test Curves"
Step 2: Review Results
Results table shows all tested combinations with:
R² Increase: How much curve improves model fit
P-Value: Statistical significance
Coefficient: Regression coefficient value
Alpha & Power: Parameter values tested
Sort by R² Increase to see best-fitting curves first
Step 3: Visualize Top Candidates
Select curves to compare (checkboxes)
Click "Generate Chart"
Review curve shapes visually
Verify shapes align with business expectations
What to verify:
Saturation level makes sense for channel
Inflection point aligns with spend levels
No unexpected curve behavior
Step 4: Select Winners
Selection Criteria:
✅ Statistical Fit:
High R² increase (> 0.01 meaningful)
P-value < 0.05 (preferably < 0.01)
Positive coefficient (more spend → more sales)
✅ Business Logic:
Parameters align with channel behavior
Curve shape matches expectations
Saturation point is reasonable
Checkbox Selection:
Select 1-3 top candidates per variable
Can create multiple curve versions for comparison
Step 5: Add to Model
Click "Add to Model" or "Create Variables" button
Confirmation message shows variables created
Variables now available in Model Builder
What happens:
New columns added to your dataset
Variables registered in data loader
Transformation parameters stored for Excel export
Variables appear in Model Builder variable list
Variable Naming Convention
ATAN Curve Variables
Format:
OriginalVariable|CurveType_ATAN aX.X_powerY.Y
Components:
Base variable: Your original variable name
Pipe separator:
|divides base from transformationCurve type: ICP (S-shape) or ADBUG (concave)
Formula: ATAN
Alpha value:
a+ value (e.g., a0.5)Power value:
power+ value (e.g., power1.8)
Examples:
TV_Spend|ICP_ATAN a0.5_power1.8Search_Spend|ADBUG_ATAN a0.3_power1.0Display_Impressions|ICP_ATAN a0.7_power2.0
Combined with Adstock
If your original variable already has adstock:
Format:
OriginalVariable_adstock_XX|CurveType_ATAN aX.X_powerY.Y
Example:
TV_Spend_adstock_70|ICP_ATAN a0.6_power1.9
Transformation order:
Original variable
Adstock applied (carryover effects)
Curve applied (saturation effects)
This is the correct order - always apply adstock first, then saturation.
Using Curve Variables in Models
Adding to Model Builder
Navigate to Model Builder
Select your model
Open variable selection interface
Find your curve variable (search or scroll)
Click to add to model
Replacing vs. Supplementing Original Variables
Option 1: Replace (Recommended)
Remove original variable, add curve version:
TV_Spend→ removedTV_Spend|ICP_ATAN a0.6_power1.8→ added
Advantage: Avoids multicollinearity (original and curved are highly correlated)
Option 2: Keep Both
Include both original and curved:
TV_Spend→ keptTV_Spend|ICP_ATAN a0.6_power1.8→ added
Risk: Multicollinearity issues (high VIF), coefficient instability
Best Practice: Replace original with curve version in final models
Running Models with Curves
After adding curve variables:
Remove original variable (if kept)
Run regression (OLS or Bayesian)
Check diagnostics:
VIF < 10 for all variables
Residuals normally distributed
No autocorrelation
Review coefficients:
Positive sign for media variables
Statistically significant (p < 0.05)
Magnitude makes business sense
Creating Multiple Curve Versions
Why Create Multiple Versions?
Testing alternative specifications:
Compare ICP vs. ADBUG for same variable
Test different alpha values
Evaluate sensitivity to power parameter
Model comparison:
Build Model A with ICP curves
Build Model B with ADBUG curves
Compare overall model performance
Managing Multiple Curves
Naming helps differentiate:
TV_Spend|ICP_ATAN a0.6_power1.8TV_Spend|ICP_ATAN a0.7_power1.9TV_Spend|ADBUG_ATAN a0.4_power1.0
Best Practice: Only keep 1-2 versions per variable in final model to avoid clutter
Curve Variables in Excel Export
When you export models to Excel, curve transformations are included in the "All Transformations" sheet:
Information stored:
Original variable name
Curve type (ICP/ADBUG)
Formula (ATAN)
Alpha parameter
Power parameter
Adstock rate (if applicable)
Reimport capability: When you reimport the Excel file, MixModeler automatically recreates all curve variables with exact parameters.
Common Workflows
Workflow 1: Single Variable Optimization
Test curves for one variable (e.g., TV_Spend)
Select best curve based on R² and business logic
Create variable
Add to model, remove original
Run model and validate
Workflow 2: Full Media Mix Saturation
List all media variables
Test curves for each individually:
TV_Spend → ICP curve
Digital_Spend → ADBUG curve
Radio_Spend → ICP curve
Create all winning curves
Build comprehensive model with all curves
Run diagnostics and validate
Workflow 3: Adstock + Curve Combination
For media with carryover effects:
First: Create adstock variable
TV_Spend→TV_Spend_adstock_70Then: Test curves on adstock variable Test
TV_Spend_adstock_70Create curve:
TV_Spend_adstock_70|ICP_ATAN a0.6_power1.8Use in model: Final variable captures both carryover AND saturation
Important: Always adstock first, then curve. Never curve first, then adstock.
Best Practices
Parameter Selection
Don't guess - test systematically:
Use Curve Testing interface to find optimal parameters
Review statistical metrics (R², p-value)
Validate with business logic
Visualize curve shapes before creating
Variable Management
Keep it organized:
Use consistent naming conventions
Document which curves you selected and why
Delete experimental curves you don't use
Keep 1-2 final versions per variable maximum
Model Integration
Replace, don't supplement:
Remove original variable when adding curve version
Avoid including both in same model (multicollinearity)
Check VIF after adding curves
Quality Checks
After creating curves:
Verify variable appears in Model Builder
Check transformation is stored in data loader
Confirm parameters match what you selected
Test in a model to ensure it works
Troubleshooting
Curve Variable Not Appearing in Model Builder
Possible causes:
Variable creation failed silently
Model cache not refreshed
Data loader not updated
Solutions:
Refresh browser page
Re-select model in Model Builder
Recreate variable through Curve Testing
Multicollinearity Issues After Adding Curves
Symptoms:
VIF > 10 for curve variables
Unstable coefficients
Large standard errors
Solutions:
Remove original variable (keep only curve version)
Check if multiple curve versions of same variable are included
Review for other correlated variables
Negative Coefficients on Curve Variables
Possible causes:
Wrong curve type selected (ICP vs. ADBUG)
Multicollinearity with other variables
Variable doesn't have saturation pattern
Solutions:
Try opposite curve type
Remove correlated variables
Consider if curve is appropriate for this variable
Curve Doesn't Improve Model Fit
Possible causes:
Variable has linear relationship (no saturation)
Variable is control factor, not marketing spend
Insufficient data variation
Solutions:
Check if saturation is expected for this channel
Review variable min/max/variance statistics
Consider keeping original variable without curve
Advanced: Manual Curve Creation
For advanced users who want to specify exact parameters without testing:
When to Use Manual Creation
Replicating curves from previous models
Applying standard parameters for a channel type
Creating curves based on external research
Batch creating similar curves for multiple variables
Process
Navigate to Variable Workshop
Select manual curve creation option
Choose base variable
Select formula (ATAN)
Select curve type (ICP or ADBUG)
Enter specific Alpha value (e.g., 0.6)
Enter specific Power value (e.g., 1.8)
Click "Create"
Caution: Manual creation bypasses statistical validation. Only use if you're confident in parameter choices.
Curve Variables in Bayesian Models
Curve variables work identically in Bayesian models:
Priors: You'll set priors on the curve variable coefficient (not the original)
Example:
Interpretation: The prior is on the effect per unit of transformed (saturated) spend, not raw spend.
Model Comparison with Curves
Comparing Models With vs. Without Curves
Model A (No curves):
Variables: TV_Spend, Digital_Spend, Radio_Spend
R²: 0.75
Assumption: Linear relationships (constant ROI)
Model B (With curves):
Variables: TV_Spend|ICP_ATAN, Digital_Spend|ADBUG_ATAN, Radio_Spend|ICP_ATAN
R²: 0.82
Assumption: Saturating relationships (diminishing ROI)
Comparison:
R² improvement: 0.07 (significant)
Model B captures realistic saturation
Model B enables optimization (know where to cut/invest)
Best Practice: Always compare curved vs. non-curved models to quantify improvement.
Key Takeaways
Create curve variables via Curve Testing for data-driven selection
Use ATAN formula (2 parameters) for most channels
Variable naming follows pattern:
Variable|Type_ATAN aX.X_powerY.YReplace original variables with curve versions in models
Combine with adstock: adstock first, then curve
Verify curves improve model fit and make business sense
Keep variable library organized (delete experimental versions)
Curves enable optimization by capturing varying ROI at different spend levels
Last updated