Machine Learning for Quality Adjustment in CPI: A Comparison of Hedonic Regression, Elastic Net, and Random Forest and Their Effects on the Swedish Consumer Price Index
2026 (English)Independent thesis Advanced level (degree of Master (Two Years)), 20 credits / 30 HE credits
Student thesis
Abstract [en]
Quality adjustment in price index construction has long been a central issue in inflation measurement, as inadequate quality adjustments may introduce systematic bias into indices and thereby affect measured inflation. In official statistics, explicit quality adjustments are commonly performed using Hedonic regression models or judgmental methods. Although hedonic models have been applied for decades, they are associated with limitations such as assumptions regarding functional form and sensitivity to multicollinearity. Judgmental methods, on the other hand, may lack reproducibility and consistency across products and over time.
This study investigates two alternative approaches to quality adjustment: Elastic Net, as an extension of the traditional hedonic model through regularization, and Random Forest, a machine learning method that may address several limitations associated with linear models. In addition to comparing the predictive performance of these methods, the study examines how different qualityadjustment approaches influence price development and measured inflation in Sweden during the period 2024–2025.
The analysis is conducted for two product groups with distinct market characteristics: mobile phones, representing a high-technology product group, and microwave ovens, representing a more low-technology product group. Mobile phones are primarily quality-adjusted using Hedonic regression, with occasional judgmental adjustments to the model-based estimates, whereas microwave ovens use judgmental methods.
The results indicate that Elastic Net did not provide a clear improvement over traditional hedonic models for either product group. Random Forest consistently achieved the highest predictive performance and the lowest prediction errors, particularly for mobile phones where the improvement relative to linear models was substantial. For microwave ovens, the improvements were less pronounced. The choice of quality-adjustment method had a considerable impact on index development at the product-group level. However, the effects on overall inflation were limited, although differences remained observable after aggregation to the total CPI. Among the evaluated methods, Random Forest produced index series most closely aligned with the officially reported inflation rate.
Since no objective benchmark for true quality adjustment exists, it is not possible to determine which method is most accurate. Nevertheless, the findings suggest that Random Forest may represent a promising alternative or complement to current quality-adjustment methods in Swedish official statistics, particularly for product groups characterized by rapid technological development.
Place, publisher, year, edition, pages
2026.
Keywords [en]
Consumer Price Index (CPI), Quality Adjustment, Hedonic Regression, Elastic Net, Random Forest, Official Statistics
National Category
Probability Theory and Statistics Economics
Identifiers
URN: urn:nbn:se:su:diva-257794OAI: oai:DiVA.org:su-257794DiVA, id: diva2:2088171
External cooperation
Statistiska centralbyrån
Supervisors
Examiners
2026-08-102026-07-242026-08-10Bibliographically approved