_ESTIMATING FOOD PRICE INFLATION_ _37_

# Mathematical Appendix

# _B1. Prediction strategy_

The imputation strategy used here is based on an adaption of the Multiple Imputations by Chained Equations (see, van Buuren and Groothuis-Oudshoorn (2011); van Buuren (2012); Murray (2018)). In particular, the original approach has been adapted to allow specify the stochastic properties of the initialization and keep track of cross-validation throughout the imputation process. The adapted code base has been made available, see the links provided in the footnotes of the introduction of the main paper. The code base has also been adapted to allow parallelization of computation. Apart from these practical modifications, the sketch of the algorithm is relatively standard. The algorithm produces multiple likely data sets, which are then pooled into a single imputation. The number of imputations is _M_ = 5, and the _m_ -th imputed price data set is _P_<sup>(</sup><sup>_m_)</sup> where _m ∈_ (1 _, . . . , M_ ). Let _P_<sup>_−d_</sup> = ( _P_<sup>1</sup> _, . . . , P_<sup>_d−_1</sup> _, P_<sup>_d_+1</sup> _, P_<sup>_D_</sup> ) denote the collection of the _d −_ 1 variables in _P_ except _P_<sup>_d_</sup> . Note that for a given _P_<sup>_d_</sup> , the set _P_<sup>_−d_</sup> may itself be incomplete, ( _P_<sup>1</sup> _, . . . , P_<sup>_d−_1</sup> _, P_<sup>_d_+1</sup> _, P_<sup>_D_</sup> ) may be correlated with one another, the relationship between _P_<sup>_d_</sup> and _P_<sup>_−d_</sup> could be complex, and _P_<sup>_d_</sup> may also depend on _h_ other available regressors _X_ = ( _X_ 1 _, . . . , Xh_ ). Assume that the hypothetically complete price data _P_ is a partially observed random sample from the _d_ - variate multivariate distribution _P_ ( _P |_ **_θ_** ) and that the multivariate distribution of _P_ is completely specified by the unknown parameter vector **_θ_** . Thus, the objective is to obtain estimates for **_θ_** . The algorithm estimates a posterior distribution of **_θ_** by iteratively sampling from the conditional distributions

The parameters **_θ_** 1 _, . . . ,_ **_θ_** _d_ are specific to the respective conditional densities. Starting from a draw from the marginal distributions, in the current application modeled using univariate time series methods, the _i_ -th iteration of chained equations is a Gibbs sampler that successively draws (B2) where _Pd_<sup>(</sup><sup>_i_)</sup> = ( _Pd,_ obs _, P_<sup>_∗_(</sup> _d_<sup>_i_))isthe</sup><sup>_i_-thimputationofprice</sup><sup>_d_atiteration</sup><sup>_i_.Theimputationsofthe</sup> previous iteration _P_<sup>_∗_(</sup> _d_<sup>_i−_1)</sup> enter the next imputation _P_<sup>_∗_(</sup> _d_<sup>_i_)</sup> through the other price variables _P_<sup>_∗_(</sup> _−_<sup>_i_)</sup> _d_<sup>.</sup> At each iteration, _P_<sup>_∗_(</sup> _d_<sup>_i−_1)</sup> can also be used to generate synthetic cases by adding a random draw of conditional expectations for missing entries to the dependent side of next regression on the same price variable. The process is iterated 8 times, a stopping criterion can be guided by keeping track of prediction validation criteria across _i_ . The imputations and their updates here are done by drawing the conditional means from the posterior distribution of penalized linear regression or cubist regressions. Note that due to the randomness in the cubist algorithm itself, the randomness of the initialization, and the randomness in the synthetic data, there remains substantial randomness in successive iterations that allows the sequence to visit a large variety of likely prediction models for the missing values. For instance, since the models used for prediction can extrapolate beyond the range of training data values to generate synthetic cases with different properties than observed data, and because there are additional sources of randomness such as related to parameter tuning and random components of the cubist model, each iteration may weaken, amplify, or change local correlations between the columns in the data in the next imputation iteration. Hence, while a pre-determined linear regression specification approach artificially amplifies the relations between the columns of the data by reinforcing its own learning pattern throughout the iterations, the stochastic method allows the sequence to find prediction models for the missing values