Skip to content

Latest commit

 

History

10 Commits

Folders and files

NameName
Last commit message
Last commit date
 
 
 
 
 
 

Repository files navigation

Modeling-NBA-Player-Performance-using-SEM

An analysis of NBA player performance using Confirmatory Factor Analysis (CFA) and Structural Equation Modeling (SEM). The project tests whether player statistics from the 2024-25 season can be explained by latent offensive and defensive ability dimensions, extends the model into a structural regression, and evaluates whether the measurement structure holds across rookie and veteran players

Overview

Basketball performance is widely understood to be multidimensional, with individual box-score statistics only partially capturing a player's overall contribution. This project uses latent variable modeling to investigate broader performance dimensions underlying observed NBA statistics, answering three research questions:

  • Can basketball statistics be explained by offensive and defensive ability of a player?
  • Can an offensive latent construct predict a defensive latent construct among NBA players?
  • Is there a statistically significant difference in measurement structure between rookie and veteran players?

Dataset

  • Source: "NBA Player Stats, Season 24/25" (Kaggle)
  • Raw size: 28,265 player-game observations, 27 variables
  • Aggregation: Averaged to player-level, yielding 569 unique players
  • Variables used:
    • PTS: Points per game
    • FG%: Field Goal percentage
    • 3P%: Three-point percentage
    • AST: Assists per game
    • ORB: Offensive rebounds per game
    • FT: Free-throws per game
    • STL: Steals per game
    • BLK: Blocks per game
    • DRB: Defensive rebounds per game
    • TRB: Total rebounds per game
    • TOV: Turnovers per game
  • Grouping variable: Players manually classified as rookies (first-year in 24/25) or veterans - 20 rookies vs. 549 veterans

Methods used

  • Data cleaning and player-level aggregation
  • Cronbach's alpha (reliability testing)
  • Confirmatory Factor Analysis (CFA)
  • Model respecification based on correlation structure and modification indices
  • Structural Equation Modeling (SEM) / structural regression
  • Multi-group invariance testing
    • Configural, metric, scalar, and residual invariance
  • Robust maximum likelihood estimation (MLR) with FIML for missing data
  • Model fit evaluation (CFI, TLI, RMSEA, SRMR, chi-square)

Key findings

  • A simple offensive / defensive two-factor structure does not adequately explain NBA player performance
  • A revised, role-based model of offensive involvement and interior presence fits the data substantially better
  • Offensive involvement is a significant positive predictor of interior presence
  • The latent structure holds across rookies and veterans at the factor-loading level, but not for direct group comparisons of latent means

Key Skills Demonstrated

  • Confirmatory Factor Analysis (CFA) and Structural Equation Modeling (SEM)
  • Multi-group invariance testing (configural, metric, scalar, residual)
  • Robust maximum likelihood estimation (MLR) and FIML for missing data
  • Model fit evaluation (CFI, TLI, RMSEA, SRMR, chi-square)
  • Model respecification based on empirical evidence
  • Statistical computing in R (lavaan)
  • Data aggregation and cleaning at scale (28k+ rows to player-level)

How to Run

  1. Clone the repository:
git clone https://github.com/Mancon1/Modeling-NBA-Player-Performance-using-SEM
  1. Place the dataset (NBA_data_CI-course.csv) in the project directory.
  2. Open the project R script in RStudio
  3. Install required packages if necessary
  4. Run the script from top to bottom

Authors

  • Måns Conradson
  • Teerth Gupta
  • Jacob Telander

About

Modeling latent dimensions of NBA player performance using CFA and SEM

Topics

Resources

Stars

0 stars

Watchers

0 watching

Forks

Releases

Packages

Contributors