# Interpreting a regression equation with summation notaion

I am definitely more of an applied statistician than one with a strong background in the specific mathematical notation. I'd like to recreate a model I ran across in a paper, and though I understand how to do nonlinear regression (in this case, negative binomial), I'm not sure about how to interpret the following equation that was given as the model for the relationship:

$$ln(Q_{it}) = \beta_1 +\sum_{\theta} (\beta_\theta ln(P_{it}) * storetype_{\theta,i} )) + \sum_{\pi} (\beta_\pi ID_{\pi,i}) + \sum_\delta (\beta_\delta Region_{\delta,i} * endcap_{it}) + \beta_2 radio_{it} + \epsilon_i + \gamma_t$$

for item i in time period t.

It's obviously a demand equation. I understand the general structure of regression equations, but am unsure how to translate the presence of the summations. There are multiple coefficients for each of the independent variables, and there seems to be a hierarchical structure of some sort. I haven't been able to find any formal examples of this structure in my searches and I want to make sure I understand what's going on before I proceed. Thanks for any help you can provide.

• Aren't the summations going over the "i" as well? So you would have for instance something as $\beta_1*stereotype_1+\beta_2+stereotype_2$ written as $\sum_{i=1}^2 beta_i*stereotype_i$ – Pugl Aug 2 '17 at 18:41
• No, the summations appear as I have written them . . . – mmmm Aug 2 '17 at 19:08

## 1 Answer

Let's say the equation were:

$$ln(Q_{it}) = \beta_0 + \sum_{\theta} \beta_\theta \ln(P_{it}) \mathit{Storetype}_{\theta,i} + \epsilon_{it}$$

And imagine $\theta \in \{ 1,2,3\}$ hence the above regression equation would simply be: $$ln(Q_{it}) = \beta_0 +\beta_1 \ln(P_{it}) \mathit{Storetype}_{1,i}+ \beta_2 \ln(P_{it}) \mathit{Storetype}_{2,i}+ \beta_3 \ln(P_{it})\mathit{Storetype}_{3,i} + \epsilon_{it}$$

That is, you'd be estimating a different coefficient $\beta_\theta$ for each possible value of $\theta$. The summation is just a more compact way to write the regression model.

### But what is $\mathit{Storetype}_{\theta,i}$?

You'll have to read the paper to know for sure, but I'd guess that $\mathit{Storetype}_{\theta,i}$ is an indicator variable:

$$\mathit{Storetype}_{\theta,i} = \left\{ \begin{array}{ll} 1& \text{if observation i is storetype \theta} \\ 0 & \text{otherwise} \end{array} \right.$$

And then you'd be estimating a different elasticity $\beta_{\theta}$ for each storetype $\theta$. But that's just a guess.

• So, given an item type i at a time t, it could be present in each of the different storetypes but has a different demand relationship depending on the storetype? Am I saying that correctly? And yes, storetype is an indicator variable. – mmmm Aug 2 '17 at 19:07
• Hmmm... generally with indicator variables, you have something like for any observation $i$ you have$\sum_\theta \mathit{Storetype}_{i,\theta} = 1$. For any $i$, only one of the Storetype indicator variables would be true. As I said though, you really have to look carefully at how they're defining each variable. I'm making educated guesses. – Matthew Gunn Aug 2 '17 at 19:12
• That makes sense in the context of the expanded equation you provided in your example. If it's not present, the zero will wipe out the influence of that particular coefficient and the only coefficient that will impact the result is the storetype = 1 for item i. – mmmm Aug 2 '17 at 19:23
• @mmmm Exactly! With indicator variables, that's generally the idea. – Matthew Gunn Aug 2 '17 at 19:25
• Thanks for helping me put that together. As a final question, and maybe I should make it's own question, but what is the general term for the type of model where there are different coefficients in play for different variables? Is this a fixed/random effects sort of model? I'm just not familiar enough with interpreting things from this end to know what I'm looking at. – mmmm Aug 2 '17 at 20:29