<< Chapter < Page | Chapter >> Page > |
where ${U}_{i,t}\sim Pois\left({\lambda}_{i,t}\right)$ for $i=e,b,be$ . ${U}_{b,t}$ and ${U}_{e,t}$ represent the consumer's tendency to buy bacon or eggs independently while ${U}_{be,t}$ represents consumer's tendency to buy the two products together. Note that ${Y}_{b,t}$ and ${Y}_{e,t}$ are marginally Poisson since sum of two Poisson variables is still Poisson.
Recall the Poisson log link function for GLM: $log\lambda ={Z}^{T}\beta $ . In the simulation, ${\lambda}_{b,t}$ and ${\lambda}_{e,t}$ are modeled using exogenous covariates (utility, price and product displays) as well as one lag of response, ${Y}_{t-1}$ i.e. the quantities of the product purchased last time period:
for simplicity, $log{\lambda}_{be,t}={\beta}_{be,0}$ .
The consumer's utility, $Util$ , is assumed to follow a Gumbel distribution [link] with location $=0$ and scale=0. After consulting local grocery stores, we let $Pric{e}_{b}\sim N(4,0.7)$ and $Pric{e}_{e}\sim N(3,0.3)$ . $Display$ indicates whether the product was advertized in store. This indicator variable is either on (1) or off (0) with probability p .
A realization of one consumer's purchase over time is plotted in Figure 3. We notice a few things in this plot that make it “realistic”: only small quantities are purchased; when higher quantity was purchased in a previous period, fewer units were purchase during the next period; the pruchases of the two products seem correlated as a number of peaks overlap.
Similar to data simulation, we model the consumer purchases of bacon and eggs using a trivariate reduction.
Where ${U}_{i,t}\sim Pois\left({\lambda}_{i,t}\right)$ for $i=b,e,be$ . However, we constrain the covariates to include only observable variables: price, display and past purchase. Thus in the log link function for Poisson GLM, we model λ like this:
Methods for estimating bivariate Poisson regression models are available in R package “bivpois” [link] . We can compare the $\widehat{\lambda}$ generated by the model against the “real” λ used in the simulation. Note that ${\widehat{\lambda}}_{i,t}=\widehat{{\lambda}_{i,t}}+\widehat{{\lambda}_{be,t}}$ for $i=b,e$ .
We also tested the robustness of regression model to varying strengths of ${\lambda}_{be,t}$ , the covariance term. A summary of the simulation studies is presented in Figure 5.
The regression is slightly more accurate with a lower ${\lambda}_{be,t}$
We are currently working to extend the univariate MBC method to the bivariate case. The extension process consists of developing the bivariate model for the simulated consumer TSC data, deriving the bivariate KL metric, and improving the clustering algorithm to cluster bivariate models. So far, we have developed a working bivariate Poisson regression model using the bivpois package. The clustering algorithm is still under development.
Notification Switch
Would you like to follow the 'The art of the pfug' conversation and receive update notifications?