# Compare models
model_with_year <- lm(`Coffee Price` ~ Year + `Exchange rate` + `World Population` + `Domestic Consumption` + Imports, data = train)
model_without_year <- lm(`Coffee Price` ~ `Exchange rate` + `World Population` + `Domestic Consumption` + Imports, data = train)
# ANOVA comparison
anova(model_without_year, model_with_year)
# Variable importance
library(relaimpo)
calc_relimp(model_with_year, type = "lmg", rela = TRUE)
I contributed to the ICO Global Coffee Funding Mechanisms report (June 2024), by writing the boxes and providing insights on market dynamics and price drivers in the coffee industry.