0
$\begingroup$

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.

$\endgroup$
3
  • $\begingroup$ Small is your reference category so the other two coefficients (for medium and large) are the difference between small and their respective predictor. $\endgroup$
    – mdewey
    Commented Dec 22, 2017 at 16:33
  • $\begingroup$ Also, you might want to represent drink size with a single variable instead of two separate variables. $\endgroup$
    – mkt
    Commented Dec 22, 2017 at 16:36
  • $\begingroup$ I'm pretty sure that you mean $x_1$ etc. rather than $\beta_1$ etc in the first part of your question $\endgroup$
    – Peter Flom
    Commented Jul 20 at 11:06

3 Answers 3

2
$\begingroup$

You may need to think about what you mean by asking if "influence of small drinks on BMI is the same as the influence of large drinks?"

For a non-binary nominal variable, the "influence" of being in a certain category always has to be defined in comparison to some other category. My assumption is that what you really want to know is if people who drink large drinks have a significantly higher BMI than people who drink small drinks. If that's correct then $\beta_1$ already tells you exactly what you need to know!

Whenever you split a nominal categorical variable into dummies, as you did, the coefficients for each dummy variable tell you the "effect" of being in that category as opposed to the "reference category" - the category that you omitted from the list of dummies. Here you omitted "small" which means that

$\beta_1$ tells you the effect of being large as opposed to small

$\beta_2$ tells you the effect of being medium as opposed to small

The one thing this model doesn't tell you is if there is a significant effect for being medium as opposed to large. To test that you would need to run a different model with a different reference category (e.g. including dummies for medium and small)

$\endgroup$
0
$\begingroup$

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

$\endgroup$
1
  • $\begingroup$ 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? $\endgroup$
    – Froge
    Commented Dec 22, 2017 at 16:51
0
$\begingroup$

A better approach is to test a specific contrast. You shouldn’t have to refit a model to ask a specific question, using different indicator variable coding. And note that BMI being a ratio probably needs to be logged. Here is an example using the R rms package.

require(rms). # or library()
dd <- datadist(mydata); options(datadist=‘dd’). # for plotting
f <- ols(log(bmi) ~ size + otther, data=mydata)
# Compare mean log BMI for small vs. large drink
contrast(f, list(size=‘small’), list(size=‘large’))

Note: Testing to see if things are “statistical different” is often not a great goal. Think of compatibility (confidence) intervals instead, or better use Bayesian thinking.

$\endgroup$

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.