Skip to content

Statistical Optimization of Multi-Factor Adsorption Processes Using Factorial ANOVA: A JASP-Based Methodology Demonstration | Synthetic dataset (n=2,304), Python data generation, JASP analysis workflow | Open Science

License

Notifications You must be signed in to change notification settings

Anfal-AR/Adsorption-Factorial-ANOVA

Folders and files

NameName
Last commit message
Last commit date

Latest commit

Β 

History

1 Commit
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 

Repository files navigation

Statistical Optimization of Multi-Factor Adsorption Processes Using Factorial ANOVA

DOI License: CC BY 4.0 JASP Python 3.8+ Open Science

πŸ“„ Overview

This repository contains the complete supplementary materials for the methodology paper "Statistical Optimization of Multi-Factor Adsorption Processes Using Factorial ANOVA: A JASP-Based Methodology Demonstration" (Rababah, 2025).

The study demonstrates a comprehensive statistical framework for optimizing multi-factor adsorption processes using factorial analysis of variance (ANOVA), with emphasis on detecting and interpreting interaction effects that are unattainable through traditional one-factor-at-a-time (OFAT) approaches.

🎯 Key Contributions

  • Complete factorial ANOVA workflow using accessible open-source software (JASP)
  • Interaction effects analysis revealing that optimal dosage depends on adsorbent type
  • Simple effects decomposition showing differential dosage sensitivity across materials
  • Reproducible methodology with all data, code, and analysis files provided
  • Educational resource for researchers learning factorial experimental design

πŸ“Š Study Summary

Aspect Details
Dataset 2,304 synthetic experiments (768 conditions Γ— 3 replicates)
Adsorbents Activated Carbon, Biochar, MOF, Zeolite
Factors Adsorbent type, Dosage (4 levels), Contact time (4 levels), Initial concentration (4 levels), pH (3 levels)
Models Langmuir isotherm, Pseudo-second-order kinetics
Variability CV = 6.6–8.7% (realistic laboratory precision)
Analysis Software JASP v0.18.3 (open-source)
Data Generation Python 3.8+ with NumPy, Pandas, SciPy

πŸ”¬ Key Findings

Main Results

Analysis F-statistic p-value Effect Size (Ξ·Β²) Interpretation
One-way ANOVA (Adsorbent Type) F(3,2300) = 34.8 p < .001 Ξ·Β² = .043 Significant differences among adsorbents
Two-way ANOVA (Adsorbent Γ— Dosage) F(9,2288) = 17.74 p < .001 Ξ·Β² = .042 Critical interaction effect
Three-way ANOVA (+ Contact Time) F(27,2208) = 0.06 p = 1.000 Ξ·Β² < .001 No higher-order interaction

Descriptive Statistics by Adsorbent Type

Adsorbent Mean qβ‚‘ (mg/g) SD Min Max
MOF 47.26 59.16 0.199 300.0
Activated Carbon 41.87 50.63 0.153 239.0
Biochar 29.96 34.68 0.099 158.4
Zeolite 23.48 23.27 0.124 102.8

Simple Effects Analysis (Dosage Sensitivity)

Adsorbent F-statistic Ξ·Β² 95% CI Interpretation
MOF F(3,572) = 17.0 .380 [.321, .433] Highest sensitivity
Activated Carbon F(3,572) = 10.2 .366 [.306, .420] High sensitivity
Biochar F(3,572) = 6.46 .366 [.275, .391] Moderate sensitivity
Zeolite F(3,572) = 85.59 .310 [.249, .365] Lower sensitivity

πŸ“ˆ Visualizations

Figure 1: Adsorbent Type Γ— Dosage Interaction (Key Finding)

Interaction Plot

The non-parallel lines indicate a significant interaction effect: optimal dosage strategy depends on adsorbent type. MOF shows the steepest decline, indicating highest dosage sensitivity.

Figure 2: Distribution of Adsorption Capacity

Boxplots

Figure 3: Mean Adsorption Capacity (Β±SE)

Bar Chart

Figure 4: Heatmap - Adsorbent Γ— Dosage

Heatmap

Figure 5: Simple Effects - Dosage Sensitivity (Ξ·Β²)

Effect Sizes

All adsorbents show large effect sizes (Ξ·Β² > 0.14), but MOF and Activated Carbon demonstrate the highest dosage sensitivity.


πŸ“ Repository Structure

Adsorption-Factorial-ANOVA/
β”‚
β”œβ”€β”€ πŸ“„ README.md                          # This file
β”œβ”€β”€ πŸ“„ LICENSE                            # CC BY 4.0 License
β”œβ”€β”€ πŸ“„ CITATION.cff                       # Citation metadata
β”œβ”€β”€ πŸ“„ .gitignore                         # Git ignore rules
β”‚
β”œβ”€β”€ πŸ“‚ data/
β”‚   β”œβ”€β”€ adsorption_dataset_full.csv       # Complete dataset (2,304 experiments)
β”‚   └── DATA_DICTIONARY.md                # Variable descriptions and metadata
β”‚
β”œβ”€β”€ πŸ“‚ code/
β”‚   β”œβ”€β”€ generate_adsorption_dataset.py    # Python script for data generation
β”‚   β”œβ”€β”€ create_figures.py                 # Python script for figure generation
β”‚   └── requirements.txt                  # Python dependencies
β”‚
β”œβ”€β”€ πŸ“‚ analysis/
β”‚   β”œβ”€β”€ adsorption_JASP_analysis.jasp     # JASP analysis file (reproducible)
β”‚   └── JASP_QUICKSTART_GUIDE.md          # Step-by-step JASP instructions
β”‚
β”œβ”€β”€ πŸ“‚ results/
β”‚   └── figures/
β”‚       β”œβ”€β”€ Figure1_interaction_plot.png  # Adsorbent Γ— Dosage interaction
β”‚       β”œβ”€β”€ Figure2_boxplots_by_adsorbent.png
β”‚       β”œβ”€β”€ Figure3_bar_chart_means.png
β”‚       β”œβ”€β”€ Figure4_heatmap_adsorbent_dosage.png
β”‚       β”œβ”€β”€ Figure5_simple_effects_eta_squared.png
β”‚       β”œβ”€β”€ Figure6_removal_efficiency_pH.png
β”‚       β”œβ”€β”€ Figure7_kinetics_by_adsorbent.png
β”‚       └── Figure8_violin_plot.png
β”‚
└── πŸ“‚ docs/
    β”œβ”€β”€ DETAILED_QA_DATASET_GENERATION.md # Q&A about methodology
    └── GITHUB_SETTINGS.md                # Repository setup guide

πŸš€ Quick Start

Option 1: Reproduce the Analysis in JASP

  1. Download JASP (free): https://jasp-stats.org/download/
  2. Download the dataset: data/adsorption_dataset_full.csv
  3. Follow the guide: analysis/JASP_QUICKSTART_GUIDE.md
  4. Or open: analysis/adsorption_JASP_analysis.jasp directly

Option 2: Generate New Dataset

# Clone the repository
git clone https://github.com/Anfal-AR/Adsorption-Factorial-ANOVA.git
cd Adsorption-Factorial-ANOVA

# Install dependencies
pip install numpy pandas scipy matplotlib seaborn

# Generate dataset
python code/generate_adsorption_dataset.py

# Generate figures
python code/create_figures.py

Option 3: Adapt for Your Research

  1. Modify adsorbent parameters in code/generate_adsorption_dataset.py
  2. Adjust experimental conditions (dosages, times, concentrations)
  3. Generate custom dataset for your specific system
  4. Follow the same JASP workflow for analysis

πŸ“ Methodology

Data Generation Framework

β”Œβ”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”
β”‚  STEP 1: Define Parameters (Literature-Based)          β”‚
β”‚  β€’ Adsorbent properties (qmax, KL, k2)                 β”‚
β”‚  β€’ Experimental conditions (dosage, time, conc, pH)    β”‚
β””β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”˜
                        ↓
β”Œβ”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”
β”‚  STEP 2: Solve Langmuir + Mass Balance                 β”‚
β”‚  β€’ Iterative numerical root-finding (scipy.fsolve)     β”‚
β”‚  β€’ Ensures physical consistency                        β”‚
β””β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”˜
                        ↓
β”Œβ”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”
β”‚  STEP 3: Apply Modifying Factors                       β”‚
β”‚  β€’ pH effects (0.75–1.0 multiplier)                    β”‚
β”‚  β€’ Kinetic limitations (PSO model)                     β”‚
β”‚  β€’ Dosage effects (aggregation at high dosages)        β”‚
β””β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”˜
                        ↓
β”Œβ”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”
β”‚  STEP 4: Add Experimental Noise                        β”‚
β”‚  β€’ Normal distribution with CV = 7–10%                 β”‚
β”‚  β€’ Ensures realistic laboratory variability            β”‚
β””β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”˜

Statistical Analysis Workflow

Descriptive Statistics β†’ Assumption Checking β†’ One-way ANOVA
                                                    ↓
                                            Two-way ANOVA
                                                    ↓
                                    Significant Interaction?
                                          /           \
                                        Yes            No
                                         ↓              ↓
                              Simple Effects      Report Main
                                Analysis          Effects Only
                                         ↓
                              Three-way ANOVA
                              (if needed)

πŸ“– Adsorption Models Used

Langmuir Isotherm

$$q_e = \frac{q_{max} \times K_L \times C_e}{1 + K_L \times C_e}$$

Where:

  • qβ‚‘ = equilibrium adsorption capacity (mg/g)
  • qβ‚˜β‚β‚“ = maximum adsorption capacity (mg/g)
  • Kβ‚— = Langmuir constant (L/mg)
  • Cβ‚‘ = equilibrium concentration (mg/L)

Pseudo-Second-Order Kinetics

$$q_t = \frac{k_2 \times q_e^2 \times t}{1 + k_2 \times q_e \times t}$$

Where:

  • qβ‚œ = adsorption capacity at time t (mg/g)
  • kβ‚‚ = rate constant (g/(mgΒ·min))
  • t = contact time (min)

Adsorbent Parameters (Literature-Based)

Adsorbent qβ‚˜β‚β‚“ (mg/g) Kβ‚— (L/mg) kβ‚‚ (g/(mgΒ·min)) Noise (CV)
Activated Carbon 250 0.15 0.0003 8%
Biochar 180 0.10 0.0002 10%
MOF 300 0.20 0.00035 7%
Zeolite 120 0.08 0.00025 9%

πŸ”§ Dependencies

For Data Generation & Visualization (Python)

numpy>=1.20.0
pandas>=1.3.0
scipy>=1.7.0
matplotlib>=3.5.0
seaborn>=0.11.0

For Statistical Analysis


πŸ“š Citation

If you use this dataset, methodology, or code in your research, please cite:

@article{rababah2025factorial,
  title={Statistical Optimization of Multi-Factor Adsorption Processes 
         Using Factorial ANOVA: A JASP-Based Methodology Demonstration},
  author={Rababah, Anfal},
  journal={Zenodo},
  year={2025},
  doi={10.5281/zenodo.17563321},
  url={https://doi.org/10.5281/zenodo.17563321}
}

APA Format:

Rababah, A. (2025). Statistical optimization of multi-factor adsorption processes using factorial ANOVA: A JASP-based methodology demonstration. Zenodo. https://doi.org/10.5281/zenodo.17563321


🀝 Contributing

Contributions are welcome! Please feel free to:

  • πŸ› Report bugs or issues
  • πŸ’‘ Suggest improvements to the methodology
  • πŸ“ Improve documentation
  • πŸ”§ Add new features to the data generation script
  • 🌍 Translate guides to other languages

πŸ“œ License

This work is licensed under the Creative Commons Attribution 4.0 International License (CC BY 4.0).

You are free to:

  • Share β€” copy and redistribute the material
  • Adapt β€” remix, transform, and build upon the material

Under the following terms:

  • Attribution β€” You must give appropriate credit and indicate if changes were made

πŸ‘€ Author

Anfal Rababah


πŸ™ Acknowledgments

  • JASP Team for developing and maintaining the open-source JASP software
  • Scientific Community for establishing the theoretical foundations of adsorption models
  • Claude (Anthropic) for assistance with literature organization, technical writing refinement, and Python code development

Open Science β€’ Reproducible Research β€’ Accessible Statistics

Made with ❀️ for the research community