# How to incorporate sample groups?

The regression specification is:

$y=\delta_{1}D_{1}+\delta_{2}D_{2}+\delta_{3}D_{3}+\beta_{1}D_{1} \cdot X+ \beta_{2}D_{2} \cdot X+\beta_{3}D_{3} \cdot X+\epsilon$

where $D_{i}$ denotes dummy for each one of three groups, $D_{i} \cdot X$ interaction between $D_{i}$ and independent variable $X$.

Each group has different sample size. Group 1 has much more samples than group 2, and group 2 more than group 3.

If I can incorporate some of these groups, I will remedy the problem of small sample size in group 2 and 3 to some extent.

So I want to test $\hat{\beta_{1}}=\hat{\beta_{2}}=\hat{\beta_{3}}$. $\hat{\beta_{i}}$ is the estimated coefficient of $D_{i} \cdot X$. After test, I will combine interaction terms for the groups not showing significantly different coefficients.

The questions are:

1. Should I use joint test $\hat{\beta_{1}}=\hat{\beta_{2}}=\hat{\beta_{3}}$? If this test cannot be rejected at e.g. 5% level, I will incorporate group 1, 2 and 3. Is that right?

2. If I should use joint test, since group 2 and 3 has very few samples, $\hat{\beta_{2}}$ and $\hat{\beta_{3}}$ may be insignificant even having wrong sign (I mean they are should be positive, but estimates are negative.) Is it right to use joint test $\hat{\beta_{1}}=\hat{\beta_{2}}=\hat{\beta_{3}}$ here?

3. Or should I use pairwise tests? If I use pairwise tests to find that $\hat{\beta_{1}}=\hat{\beta_{2}}$ and $\hat{\beta_{2}}=\hat{\beta_{3}}$ cannot be rejected but $\hat{\beta_{1}}=\hat{\beta_{3}}$ is rejected, how to incorporate these groups?

-
This model suggests you're only interested in group and interaction effect? Why do you not include a term for $X$? (Sidenote: If you have three groups, you only need a two-column dummy variable in your design matrix.) –  chl Mar 31 '12 at 20:59
Yang, I wonder whether small sample size in any group truly is a "problem." Could you perhaps elaborate on what this problem is? –  whuber Mar 31 '12 at 21:46
To Chl. Because Xs among three groups are not comparable. e.g. Group 1, 2 and 3 students use different exam papers, so their test scores cannot be put together even if we rescale scores. The only reason we can put them together is that coefficient of X in three groups are not significantly different. Then we could just control for mean difference i.e. including dummies. @chl. –  Yang Apr 1 '12 at 0:54
To Whuber. When sample size is small in group 2 and 3. Coefficients of X in these two groups are insignificant even negative (they should be positive).So I want to test $\hat{\beta_{1}}=\hat{\beta_{2}}=\hat{\beta_{3}}$, if they are not significantly different, I could put three groups together, only need to add dummies in regression and run regression. @whuber –  Yang Apr 1 '12 at 1:00
Also to Chl. The specification doesn't include constant term, so I think it is OK to add all dummies. –  Yang Apr 1 '12 at 1:03