of parameters that are very computationally intensive given the size of the data set.<sup>61</sup> In the first stage, the index is constructed at both the monthly and quarterly levels for each product group (125 groups) and store. Stores that do not appear throughout the entire sample period are dropped, retaining around 23,500 stores in the sample. Therefore, the results are not affected by store entry and exit. Among the stores that are in the sample in 2006, 84% remain throughout the entire sample period. Although the scanner data are weekly, they are aggregated up to the monthly or quarterly level to decrease missing values and reduce chain drift, as pointed out by Ivancic et al. (2011). Each base observation is a monthly or quarterly unit value for each store-product, that is, monthly or quarterly revenue divided by the total number of units, which is equivalent to a quantity-weighted average price. Products are defined as UPC codes. Alternatively, weekly prices can be sampled from each store-product-period. Only goods that appear consistently across an entire year are included, such that around 50% and 70% of all sales are used in constructing store-level monthly and quarterly indices, respectively.<sup>62</sup> Quantities are directly observed and used as weights, which is a major advantage relative to the CPI, which collects price quotes at the store level but not quantities, so that they use quantities that are lagged three to four years and are obtained from the BLS CEX. Quantity weights are updated yearly to avoid chain drift, and the weights (denoted as _qi,y_ ) are lagged one year to ensure price changes are not a result of changing consumption patterns in response to current prices or shocks. The CPI weights are updated every two years, which is less frequent than the scanner index. Hence, the CPI is more subject to substitution bias and the basket is less relevant over time. The price index _Pj,t,y_<sup>_L_attime</sup><sup>_t_andyear</sup><sup>_y_forproductgroup</sup><sup>_j_foreachstoreisshownbelowin</sup> equation (22): Each unique item is defined by its UPC code. Prices and quantities are observed for each store and UPC pair, which is denoted as product _i_ . By construction, changes in the price index only reflect relative changes in prices for a given bundle and are unaffected by price levels. Therefore, product switching among consumers to more expensive bundles does not change the price index for given price levels.

The second stage is similar to the first stage and aggregates the product group-specific price indices for each store using expenditure shares _sj,y−_ 1 that are lagged one year and fixed within year. To follow the CPI more closely, a Tornqvist price index can also be constructed using the average expenditure shares between two periods as weights. Although we present results using the first method, both methods give almost identical results and are shown in

> 61There are limitations with the publicly available BLS indices such that we do not to use them in this paper. First, there are only about 25 cities for the BLS indices with many cities defined across state borders, making it difficult to apply our IV which utilizes state-level variation. Second, our retail scanner indices are robust to many weighting schemes and correlates strongly with the BLS indices for the cities that are available, as shown in Leung (2021). Third, with our indices, we can segment by store types, focus on grocery stores and chains that price locally, and have finer location to implement triple differences etc.

> 62Prices of goods that did not sell within a given week are not recorded in retail scanner data. Therefore, aggregating up to the monthly or quarterly level decreases missing values. Furthermore, products that are not bought by consumers are inherently not an important part of the consumer basket.

53