Model Export Structure

Overview

Understanding the structure of MixModeler's Excel exports helps you navigate files efficiently, locate specific information quickly, and ensure successful model reimport. This guide explains the organization, relationships, and data integrity features of exported models.

File Organization Principles

Sheet Ordering

Sheets are organized from general to specific:

  1. Model Info - Overview and metadata (always first)

  2. Data - Complete dataset

  3. Coefficients - Core results

  4. Model Statistics - Fit metrics

  5. Model-type sheets - OLS or Bayesian specifics

  6. Residuals - Predictions and errors

  7. Variable Transformations - Engineering details

  8. Decomposition - Attribution (if included)

  9. Specialized sheets - Weighted variables, etc.

Rationale: Most important information first, technical details later

Data Relationships

Model Info → All Sheets: Metadata applies to entire model

Data → Coefficients: Dataset used to estimate coefficients

Coefficients → Residuals: Coefficients generate predictions

Variable Transformations → Data: Explains how variables were created

Decomposition → Coefficients: Uses coefficients to attribute contributions

Sheet-by-Sheet Structure

1. Model Info Sheet

Purpose: Single source of truth for model configuration

Format: Two-column key-value pairs

Critical Fields:

| Field Name | Field Value |
|------------|-------------|
| Model Name | [Unique identifier] |
| KPI | [Dependent variable name] |
| Model Type | OLS or Bayesian |
| Features | [Comma-separated list] |

Special Considerations:

  • Model Name must be unique for reimport

  • KPI must match a column in Data sheet

  • Features list determines coefficient order

  • Date Range filters are preserved

2. Data Sheet

Purpose: Complete dataset for model recreation

Structure:

  • First column: Date (if time-series)

  • Second column: KPI variable

  • Remaining columns: All independent variables (features + unused variables)

Key Characteristics:

  • Includes ALL observations from original upload

  • Not limited to model's date range filter

  • Contains both used and unused variables

  • Preserves original data types and formats

Why Full Dataset: Enables model recreation with different date ranges or variable selections

3. Coefficients Sheet

Purpose: Core model results with statistical information

OLS Structure:

| Variable | Coefficient | Std Error | T-statistic | P-value | CI Lower | CI Upper |
  • First row: const (intercept) if present

  • Subsequent rows: Features in order

Bayesian Structure:

| Variable | Prior Dist | Prior Mean | Prior Std | Posterior Mean | Posterior Std | HDI 95% Lower | HDI 95% Upper | R-hat | ESS Bulk | ESS Tail |

Important Notes:

  • Variable order matches features list in Model Info

  • Bayesian includes both prior and posterior information

  • Convergence diagnostics (R-hat, ESS) included for validation

4. Model Statistics Sheet

Purpose: Overall model quality metrics

OLS Contents:

  • Goodness of fit: R², Adjusted R², F-statistic

  • Information criteria: AIC, BIC

  • Log-likelihood

  • Sample size information: Observations, degrees of freedom

Bayesian Contents:

  • MCMC settings: Chains, draws, tuning, target accept

  • Convergence summary: Max R-hat, min ESS, divergences

  • Model comparison: WAIC, LOO, BPIC (if available)

Uses:

  • Quick model quality assessment

  • Comparison across multiple models

  • Documentation for stakeholders

5. Type-Specific Sheets

OLS Diagnostics

Additional statistical tests and metrics:

| Statistic | Value |
|-----------|-------|
| Condition Number | [Multicollinearity indicator] |
| Durbin-Watson | [Autocorrelation test] |
| Jarque-Bera | [Normality test] |

OLS Full Summary

Complete statsmodels output as text for detailed analysis.

Bayesian Diagnostics

MCMC convergence details:

| Diagnostic | Value |
|------------|-------|
| Chains | 4 |
| Draws | 2,000 |
| Max R-hat | 1.002 |
| Divergences | 0 |

6. Residuals Sheet

Purpose: Model predictions and errors

Structure:

| Date | Actual | Predicted | Residual | Abs_Error | Pct_Error |

Calculations:

  • Residual = Actual - Predicted

  • Abs_Error = |Residual|

  • Pct_Error = (Residual / Actual) × 100

Special Cases:

  • Rows outside date range: Predicted may be blank

  • Missing KPI values: All fields except Date will be blank

  • Model fitting errors: Error message in dedicated column

Uses:

  • Identify problematic time periods

  • Assess prediction accuracy

  • Find outliers

  • Validate model assumptions

7. Variable Transformations Sheet

Purpose: Complete audit trail of variable engineering

Structure:

| Variable Name | Type | Original Variable | Parameters | Identifier |

Transformation Types:

Adstock:

  • Type: adstock

  • Original Variable: Source variable name

  • Parameters: rate=0.50 (or other rate)

  • Identifier: AD_XX

Logarithm:

  • Type: log

  • Original Variable: Source variable

  • Parameters: base=e (or 10)

  • Identifier: LOG

Multiply:

  • Type: multiply

  • Original Variable: var1 × var2

  • Parameters: Both variable names

  • Identifier: MULT

Split by Date:

  • Type: split_by_date

  • Original Variable: Source variable

  • Parameters: start_date, end_date

  • Identifier: SPL_QX or custom

Weighted (WGTD):

  • Separate "Weighted Variables" sheet with component details

Critical for Reimport: This sheet must be intact for successful model reimport with transformations.

8. Decomposition Sheets (Optional)

Group Decomposition

Channel category contributions over time:

| Date | Base | TV | Digital | Print | Other | Total |
  • Each column represents a contribution group

  • Values sum to KPI at each time point

  • Useful for attribution reporting

Variable Decomposition

Individual variable contributions:

| Date | const | TV_Spend | Digital_Spend | ... | Total |
  • More granular than group decomposition

  • Shows each variable's impact

  • Useful for detailed analysis

9. Weighted Variables Sheet

Purpose: Document composite variable construction

Structure:

| Weighted Variable | Base Name | Component Variable | Coefficient |

Example:

Marketing_Mix_WGTD | Marketing_Mix | TV_Spend | 0.40
Marketing_Mix_WGTD | Marketing_Mix | Digital_Spend | 0.35
Marketing_Mix_WGTD | Marketing_Mix | Print_Spend | 0.25

Interpretation: Weighted variable is sum of (Component × Coefficient)

Data Integrity Features

Header Consistency

All sheets use consistent column headers that must not be modified for reimport:

Never Change:

  • "Variable" (in Coefficients)

  • "Date" (in Data, Residuals)

  • "Type" (in Variable Transformations)

  • "KPI" field name in Model Info

Can Change (won't affect reimport):

  • Cell formatting

  • Column widths

  • Added columns (will be ignored)

Data Validation

Automatic Validations on Import:

  • Sheet names match expected format

  • Required columns present

  • Data types compatible

  • Variable names consistent across sheets

  • Date formats parseable

User Responsibility:

  • Don't delete or rename sheets

  • Don't modify column headers

  • Keep variable names consistent

  • Maintain data row alignment

Common Structural Patterns

Pattern 1: Base Model

Minimal export structure (OLS, no transformations, no decomposition):

Model Info
Data
Coefficients
Model Statistics
OLS Statistics
OLS Diagnostics
Residuals

Total Sheets: 7

Pattern 2: Full OLS Model

Complete OLS with all features:

Model Info
Data
Coefficients
Model Statistics  
OLS Statistics
OLS Diagnostics
OLS Full Summary
Residuals
Variable Transformations
Group Decomposition
Variable Decomposition

Total Sheets: 11

Pattern 3: Bayesian Model

Bayesian with transformations and decomposition:

Model Info
Data
Coefficients
Model Statistics
Bayesian Statistics
Bayesian Diagnostics
Bayesian Model Metrics
Residuals
Variable Transformations
Group Decomposition
Variable Decomposition

Total Sheets: 11

Pattern 4: Complex Model

Bayesian with weighted variables:

Model Info
Data
Coefficients
Model Statistics
Bayesian Statistics
Bayesian Diagnostics  
Bayesian Model Metrics
Residuals
Variable Transformations
Weighted Variables
Group Decomposition
Variable Decomposition

Total Sheets: 12

Finding Information Quickly

Model Overview: Model Info sheet (always first)

Key Results: Coefficients sheet (third sheet)

Validation: Model Statistics + type-specific diagnostics

Attribution: Decomposition sheets (near end)

Technical Details: Variable Transformations, Residuals

Excel Features to Use

Freeze Panes: Freeze headers when scrolling through data

Filter: Enable filtering on Data and Residuals sheets

Conditional Formatting: Highlight significant coefficients (p < 0.05)

Charts: Create visualizations from decomposition data

Pivot Tables: Analyze residuals or decomposition by time period

File Compatibility

Excel Versions

Fully Compatible:

  • Excel 2016 and later (Windows/Mac)

  • Excel 365

Mostly Compatible:

  • Excel 2013 (some formatting may differ)

  • LibreOffice Calc 6.0+

Limited Compatibility:

  • Google Sheets (uploads work, some formatting lost)

  • Excel 2010 and earlier (not recommended)

Cross-Platform Considerations

Windows → Mac: Perfect compatibility

Mac → Windows: Perfect compatibility

Desktop → Google Sheets: Works but loses some formatting

Desktop → Numbers (Mac): Partial compatibility, some features unsupported

Best Practices

Preserve Original: Keep an unmodified copy of exports for reimport purposes

Add, Don't Modify: Add new sheets or columns for your analysis rather than modifying existing structure

Document Changes: If sharing edited versions, note what was changed

Version Control: Include date/version in filename when creating modified copies

Validation: After any edits, verify Model Info and Coefficients sheets remain intact


Next Steps: Explore Model Reimport to learn how to reload exported models, or see Sharing Results with Stakeholders for presentation tips.

Last updated