Hypothesis Testing w/ Year Indicator Variables

This is a fairly basic question, but I was hoping that you all could help me nail down the language of this test.

I have six years of data in the sample and the following general model:

$$y = b_0 + b_1 x + b_2 \text{year1} + b_3 \text{year2} + b_4 \text{year3} + \epsilon$$

y = continuous outcome variable
x = continuous independent variable
year1 = indicator variable set to one for year1 observations, zero otherwise
year2 = indicator variable set to one for year2 observations, zero otherwise
year3 = indicator variable set to one for year3 observations, zero otherwise

If I want to test whether the early period (year1, year2, year3) is different from the late period, then which of the following tests will I conduct (assuming year4, year5, year6 is in the intercept)?

(using Stata notation)
Option A: test year1 = year2 = year3 = 0
Option B: test year1 + year2 + year3 = 0

What incremental information does each test provide (i.e., how are the two tests different)?

• Neither option describe your hypothesis. But your hypothesis is not well articulated. What does it mean that the early period "is the same as" the late period? Commented May 29, 2019 at 13:24
• I want to know whether the impact of the early period on the outcome variable is different from the effect of the later period on the outcome. One way to do this would be to just create an indicator variable for early (if year1, year2, or year3 is one) and examine the significance of that coefficient. I want to have separate year variables because I want to make statements about each year individually and all of the years collectively.
– Tots
Commented May 29, 2019 at 13:27
• why is "year" an indicator variable? Are these data in a long format with one observation per year? That would be wrong because you're ignoring dependence between years. It sounds like an interrupted time series approach is more appropriate. I don't think there's enough info to answer. Commented May 29, 2019 at 15:24

You're on the right track with the idea of testing either a subset or a linear combination of coefficients.

1. "Year1" is the regressor and $$b_1$$ is the coefficient. We don't construct hypothesis around the regressors, they are a vector of observations that have no random properties. $$b_1$$ is a linear function of the outcome and does have random properties, so it's appropriate to construct hypothesis tests about its quantity.

2. If you measured the later periods, you should include their effects to have a fully specified distributed lag model.

3. The hypothesis of no heterogeneity (your option A) would be $$\mathcal{H_0}: b_2=b_3=b_4=b_5=b_6=b_7 \quad \text{vs}$$ $$\mathcal{H_a}: (b_2=b_3=b_4) \ne (b_5=b_6=b_7)$$ The hypothesis of no cumulative trend would be $$\mathcal{H_0}: b_2+b_3+b_4=b_5+b_6+b_7 \quad \text{vs}$$ $$\mathcal{H_a}: (b_2+b_3+b_4) \ne (b_5+b_6+b_7)$$

• Why introduce six parameters in either instance where two will do? (BTW, please check the subscripts on your hypotheses--I think you want some of them to be $\mathcal{H}_A$ instead of $\mathcal{H}_0.$)
– whuber
Commented May 29, 2019 at 14:00
• @whuber because the actual distribution of $year_i$ (whatever that is) may flucatuate and one loses precision and (worse) introduces bias in the presence of trend without having a fully specified distributed lag model. Commented May 29, 2019 at 14:03
• Thank you--this is helpful. The reason that I set the model up without all of the lags is because of my specific research question. In this case, the first three years are defined as "early" and the last three years are defined as "late." I want to compare the first three years to the last three years (i.e., is the collective impact of the first three years different from the last three years?). Assuming I reject H0 in both cases, aren't my conclusions the same (i.e., the early years are different from the late years)?
– Tots
Commented May 29, 2019 at 14:08
• I see--thank you. Your model looks more appropriate for the research question. I see how all six parameters are needed for option A.
– whuber
Commented May 29, 2019 at 14:14
• @Tots Let me expand on why the language is confusing. We have a year (variable) and a beta (coefficient). Suppose for year4 to year6, the variable values were 0. What does that mean? For instance, if I studied whether a new fertilizer boosted crop yield and measured rainfall (yearly as "year"), and my crop yield was 0 because there was drought... would I say my fertilizer kills plants? Or would I have no power to say if the fertilizer did anything? Commented May 29, 2019 at 14:16