Plant Diversity ›› 2024, Vol. 46 ›› Issue (04): 542-546.DOI: 10.1016/j.pld.2024.06.002

• Software Article • Previous Articles    

Evaluating the relative importance of predictors in Generalized Additive Models using the gam.hp R package

Jiangshan Laia,b,c, Jing Tangd, Tingyuan Lie, Aiying Zhanga,b, Lingfeng Maoa,b   

  1. a. College of Ecology and Environment, Nanjing Forestry University, Nanjing, 210037, China;
    b. Research Center of Quantitative Ecology, Nanjing Forestry University, Nanjing 210037, China;
    c. University of Chinese Academy of Sciences, Beijing, 100049, China;
    d. Guangzhou Climate and Agro-meteorology Center, Guangzhou 511430, China;
    e. Guangdong Ecological Meteorological Center, Guangzhou 510640, China
  • Received:2024-05-24 Revised:2024-06-11 Published:2024-07-29
  • Contact: Jiangshan Lai,E-mail:lai@njfu.edu.cn;Lingfeng Mao,E-mail:maolingfeng2008@163.com
  • Supported by:
    This research was supported by the National Natural Science Foundation of China (32271551), National Key Research and Development Program of China (2023YFF0805803) and the Metasequoia funding of Nanjing Forestry University.

Abstract: Generalized Additive Models (GAMs) are widely employed in ecological research, serving as a powerful tool for ecologists to explore complex nonlinear relationships between a response variable and predictors. Nevertheless, evaluating the relative importance of predictors with concurvity (analogous to collinearity) on response variables in GAMs remains a challenge. To address this challenge, we developed an R package named gam.hp. gam.hp calculates individual R2 values for predictors, based on the concept of ‘average shared variance’, a method previously introduced for multiple regression and canonical analyses. Through these individual R2s, which add up to the overall R2, researchers can evaluate the relative importance of each predictor within GAMs. We illustrate the utility of the gam.hp package by evaluating the relative importance of emission sources and meteorological factors in explaining ozone concentration variability in air quality data from London, UK. We believe that the gam.hp package will improve the interpretation of results obtained from GAMs.

Key words: Average shared variance, Coefficient of determination, Commonality analysis, GAMs, Hierarchical partitioning, Individual R2