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:
Model Info - Overview and metadata (always first)
Data - Complete dataset
Coefficients - Core results
Model Statistics - Fit metrics
Model-type sheets - OLS or Bayesian specifics
Residuals - Predictions and errors
Variable Transformations - Engineering details
Decomposition - Attribution (if included)
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:
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:
First row: const (intercept) if present
Subsequent rows: Features in order
Bayesian Structure:
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:
OLS Full Summary
Complete statsmodels output as text for detailed analysis.
Bayesian Diagnostics
MCMC convergence details:
6. Residuals Sheet
Purpose: Model predictions and errors
Structure:
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:
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:
Each column represents a contribution group
Values sum to KPI at each time point
Useful for attribution reporting
Variable Decomposition
Individual variable contributions:
More granular than group decomposition
Shows each variable's impact
Useful for detailed analysis
9. Weighted Variables Sheet
Purpose: Document composite variable construction
Structure:
Example:
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):
Total Sheets: 7
Pattern 2: Full OLS Model
Complete OLS with all features:
Total Sheets: 11
Pattern 3: Bayesian Model
Bayesian with transformations and decomposition:
Total Sheets: 11
Pattern 4: Complex Model
Bayesian with weighted variables:
Total Sheets: 12
Navigation Tips
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