# How to test if the effects of two covariates are statistically different?

I'm trying to model eating behavior with this model: $y=\beta_0+\beta_1x_1+\beta_2x_2+\beta_3x_3+\beta_4x_4+ϵ$

where y is BMI and the parameters are various characteristics of the food/drink a person orders.

Drink size is represented by $\beta_1$ and $\beta_2$ like so:

• $\beta_1$ can take two values: 1 for large and 0 for not large.
• $\beta_2$ can also take two values: 1 for medium and 0 for not medium.
• If both $\beta_1$ and $\beta_2$ are 0, this represents small.

How do I test if the influence of small drinks on BMI is the same as the influence of large drinks? I would usually proceed like so (the betas do not correspond with the one in the model above):

$H_0: \beta_{small} = \beta_{large} \\ H_A: \beta_{small} \ne \beta_{large}$

but the thing is, small drinks are not directly represented in any parameter.

• Small is your reference category so the other two coefficients (for medium and large) are the difference between small and their respective predictor. Dec 22 '17 at 16:33
• Also, you might want to represent drink size with a single variable instead of two separate variables.
– mkt
Dec 22 '17 at 16:36

## 1 Answer

yes, for small, medium and large it is best to use a "dummy variable" to contain all three possibilities. R will hold one of them as the "standard" and parameter equal to 0 so you would only get output for the other two. If using Excel, you need to hold one of the three out. It does not matter which you choose, but you might choose the one you want to use as the baseline to hold out. -rh

• Ok can you tell me if I'm correct about this: so if I use a dummy variable there would be two rows, one corresponding to large and one corresponding to medium. Then the pvalue in the right-most column of large is what I'm looking for? Dec 22 '17 at 16:51