Skip to content

Ordinal regression and mediation analysis examining the gap between AI adoption and advocacy among K-12 educators. Part 3 of a three-paper series using JASP and Python. N=189 teachers in Jordan.

License

Notifications You must be signed in to change notification settings

Anfal-AR/ordinal-mediation-advocacy

Folders and files

NameName
Last commit message
Last commit date

Latest commit

Β 

History

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

Repository files navigation

Ordinal Regression & Mediation Analysis: AI Advocacy Among K-12 Educators

DOI License: MIT JASP Python ORCID

πŸ“‹ Overview

This repository contains the statistical analysis workflows, visualization code, and supplementary materials for Paper 3 of a three-paper research series examining artificial intelligence adoption among K-12 educators in Jordan.

Research Question: What factors predict educators' willingness to recommend AI tools to colleagues, and do perceptual beliefs mediate the relationship between AI use and endorsement intentions?

πŸ”— Complete Research Series

Paper Title Methods Repository
1 AI Tool Adoption Among K-12 Educators: Prevalence, Barriers, and Cluster Profiles Hierarchical Cluster Analysis ai-barriers-cluster-analysis
2 Factors Predicting AI Tool Adoption: A Random Forest and Logistic Regression Analysis Random Forest, Logistic Regression rf-perception-dominance
3 Analyzing the Gap Between AI Adoption and Advocacy Ordinal Regression, Mediation Analysis This Repository

πŸ“Š Key Findings

The Adoption-Advocacy Gap

Despite 84.7% of educators adopting AI tools, endorsement intentions varied substantially:

Endorsement Level Percentage n
Would Recommend 56.6% 107
Uncertain 21.7% 41
Would Not Recommend 21.7% 41

Primary Predictors (Ordinal Logistic Regression)

Predictor Odds Ratio 95% CI p-value
Perceived Student Effects 9.52Γ— [1.54, 58.82] .003**
Teacher Work Effects (positive) 18.18Γ— [2.70, 125.00] .010*
Efficiency Comparisons 5.35Γ— [1.29, 22.22] .020*
AI Use Status (direct) 0.47Γ— [0.09, 2.44] .343 (ns)

Key Insight: AI use showed no independent effect once perceptions were controlledβ€”endorsement operates entirely through belief formation.

Mediation Pathways

77.7% of the AI use β†’ endorsement relationship was mediated through perceptions:

                    β”Œβ”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”
                    β”‚   Perceived Student Effects β”‚
         a₁=0.65*** β”‚         (55.1%)             β”‚ b₁=0.74***
              β”Œβ”€β”€β”€β”€β”€β”΄β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”΄β”€β”€β”€β”€β”€β”
              β”‚                                         β”‚
              β–Ό                                         β–Ό
β”Œβ”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”      β”Œβ”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”      β”Œβ”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”
β”‚ AI Tool  β”‚      β”‚   Teacher Work Effects  β”‚      β”‚Endorsement β”‚
β”‚   Use    │─────►│         (14.4%)         │─────►│ Intentions β”‚
β””β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”˜      β””β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”˜      β””β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”˜
              β”‚   aβ‚‚=0.31**            bβ‚‚=0.41***  β”‚
              β”‚                                    β”‚
              β”‚   β”Œβ”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”      β”‚
              └──►│  Efficiency Comparisons β”‚β”€β”€β”€β”€β”€β”€β”˜
         a₃=0.28* β”‚         (8.3%)          β”‚ b₃=0.26**
                  β””β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”˜
                           
                  Direct Effect: c' = 0.19 (ns)
                  Total Effect: c = 0.87***

The Barrier Paradox

Implementation barriers showed counterintuitive positive effects on endorsement:

Barrier Type Total Effect Indirect via Perceptions Direct Effect
Availability 0.22* 0.29** (positive) -0.07 (ns)
Language 0.30** 0.18* (positive) 0.12 (ns)
Skill 0.08 (ns) 0.12† -0.04 (ns)
Cost 0.03 (ns) -0.01 (ns) 0.03 (ns)

Interpretation: Educators who overcome barriers become stronger advocatesβ€”likely due to cognitive dissonance (effort justification) and enhanced self-efficacy.


πŸ”¬ Methods

Study Design

  • Sample: N = 189 K-12 educators from 32 schools in Jordan
  • Design: Cross-sectional survey with ordinal outcome
  • Data Collection: April–August 2024 via face-to-face paper survey

Statistical Analyses

Analysis Software Purpose
Bivariate Associations JASP 0.19.3 Chi-square tests, ANOVA, effect sizes
Ordinal Logistic Regression JASP 0.19.3 Proportional odds modeling
Parallel Mediation Python 3.11 Bootstrap CI (5,000 resamples)
Visualizations Python 3.11 matplotlib, seaborn

Model Specifications

Ordinal Regression:

logit[P(Y ≀ j)] = Ξ±β±Ό - (β₁·AI_Use + Ξ²β‚‚Β·Student_Effect + β₃·Work_Effect + 
                        Ξ²β‚„Β·Efficiency + Ξ²β‚…Β·Barrier_Count + covariates)

Mediation Model:

  • X (Predictor): AI Use Status (binary)
  • M (Mediators): Student Effects, Work Effects, Efficiency Comparisons
  • Y (Outcome): Endorsement Intentions (ordinal, treated as continuous for mediation)
  • Covariates: Gender, subject area, sector, √experience

πŸ“ Repository Structure

ordinal-mediation-advocacy/
β”œβ”€β”€ README.md                          # This file
β”œβ”€β”€ LICENSE                            # MIT License
β”œβ”€β”€ .gitignore                         # Git ignore patterns
β”œβ”€β”€ requirements.txt                   # Python dependencies
β”œβ”€β”€ GITHUB_SETTINGS.md                 # Repository configuration guide
β”‚
β”œβ”€β”€ data/
β”‚   β”œβ”€β”€ data_dictionary.md             # Variable definitions and coding
β”‚   └── survey_instrument.md           # Original survey (Arabic & English)
β”‚
β”œβ”€β”€ analysis/
β”‚   β”œβ”€β”€ jasp/
β”‚   β”‚   β”œβ”€β”€ ordinal_regression_workflow.md    # Step-by-step JASP guide
β”‚   β”‚   └── mediation_analysis_workflow.md    # Mediation in Python
β”‚   └── results/
β”‚       └── summary_tables.md          # All statistical tables
β”‚
β”œβ”€β”€ visualizations/
β”‚   └── scripts/
β”‚       β”œβ”€β”€ mediation_path_diagram.py         # Figure 1
β”‚       β”œβ”€β”€ effect_decomposition_bar.py       # Figure 2
β”‚       β”œβ”€β”€ predicted_probabilities.py        # Figure 3
β”‚       └── barrier_effects_comparison.py     # Figure 4
β”‚
└── paper/
    └── [Published PDF - see DOI]

πŸ› οΈ Replication Guide

Prerequisites

# Python environment
pip install -r requirements.txt

# JASP (download from https://jasp-stats.org/)
# Version 0.19.3 or later recommended

Analysis Workflow

  1. Prepare Data

    • Review data/data_dictionary.md for variable coding
    • Ensure variables match specifications
  2. Run Bivariate Analyses (JASP)

    • Follow analysis/jasp/ordinal_regression_workflow.md
    • Generate chi-square tests and effect sizes
  3. Fit Ordinal Regression (JASP)

    • Build nested models (Demographics β†’ Constraints β†’ Perceptions β†’ Full)
    • Test proportional odds assumption (Brant test)
  4. Conduct Mediation Analysis (Python)

    • Follow analysis/jasp/mediation_analysis_workflow.md
    • Run bootstrap resampling (5,000 iterations)
  5. Generate Visualizations (Python)

    cd visualizations/scripts
    python mediation_path_diagram.py
    python effect_decomposition_bar.py
    python predicted_probabilities.py
    python barrier_effects_comparison.py

πŸ“ˆ Model Performance

Ordinal Regression Model Fit

Metric Value Interpretation
McFadden RΒ² 0.578 Excellent fit
Nagelkerke RΒ² 0.789 Strong prediction
LR χ²(10) 95.57 p < .001
AIC 155.7 (vs. 231.3 null)
BIC 194.6 (vs. 237.8 null)
Brant Test χ²(10) = 14.22 p = .163 (assumption met)

Effect Size Benchmarks

Association Cramer's V Interpretation
AI Use Γ— Endorsement .632 Large
Student Effects Γ— Endorsement .647 Large
Work Effects Γ— Endorsement .489 Large
Efficiency Γ— Endorsement .297 Moderate-Large
Barrier Count Γ— Endorsement .215 Moderate

🎯 Practical Implications

For Professional Development Designers

  1. Lead with student outcomes β€” Evidence of student learning gains (55% of advocacy effect) is far more persuasive than productivity benefits
  2. Create peer testimonial programs β€” Leverage educators who overcame barriers as powerful advocates
  3. Move beyond technical training β€” Pedagogical conviction, not tool proficiency, drives institutional diffusion

For Policy Makers

  1. Invest in demonstrable evidence β€” Fund pilots that generate measurable student outcome data
  2. Address access equitably β€” Availability barriers paradoxically strengthen advocacy among successful adopters
  3. Prioritize multilingual tools β€” Language-barrier educators show unique advocacy pathways

πŸ“– Citation

@article{rababah2025advocacy,
  title={Analyzing the Gap Between AI Adoption and Advocacy: An Ordinal 
         Regression and Mediation Analysis Among K-12 Educators},
  author={Rababah, Anfal},
  journal={Zenodo},
  year={2025},
  doi={10.5281/zenodo.17519209}
}

πŸ“¬ Contact

Anfal Rababah
Independent Researcher, Jordan
πŸ“§ Anfal0Rababah@email.com
πŸ”— ORCID: 0009-0003-7450-8907


πŸ“œ License

This project is licensed under the MIT License - see the LICENSE file for details.


πŸ™ Acknowledgments

  • Statistical analyses conducted using JASP (open-source)
  • Visualizations created with Python's matplotlib and seaborn
  • Mediation analysis implemented following Hayes' PROCESS methodology
  • AI language models (Grammarly, Claude Sonnet) assisted with manuscript preparation