# Controlling for age in multiple regression

I am a little stuck on what how to implement and interpret a multiple regression while controlling for age.

I am interested in seeing if there is a positive relationship between depression and use of music for emotional regulation and if this relationship is consistent across adulthood. I have three variables, depression, age and emotional usage of music. All three are continuous data. I have a large data set (2000+) but nearly half the sample are young adults (18-24). There are also very few seniors (65+).

As all the data is continuous and I have two IV's and one DV, multiple regression was the go to. However I am trying to understand how I could make it work and how I could interpret the outcome (I am very new to multiple regression). I have heard that would could hold one variable, like age, constant? How would I do this? Also how much does it matter that younger ages are over represented and the older ages were under represented. Will this bias the data/result?

Any advice would be greatly appreciated!

• how are 'depression' and 'emotional usage' measured? What are you interested in testing? Do you want to see if depression predicts emotional usage for different age groups? If that's the case, you have structure the columns of your data set in a certain way. But after you do that, you'll be able to look at simple t-tests for the parameters to see if they're significant. – Taylor Oct 9 '14 at 14:31
• If you edit your post and mention the software you're using, people with experience in R, Stata, SAS, SPSS, etc. may be more likely to post a piece of code that will do what you want. – mightypile Oct 9 '14 at 14:44
• An extensive and varied discussion of what it means to control for a variable in multiple regression, how to do it, and how to understand it, appears at stats.stackexchange.com/questions/17336. Bias should be a concern not because of the regression technology but because you clearly do not have a random sample of any ordinary human population. Please give some thought to how these data were selected and what population (if any) the results could reasonably be applied to for making inferences or predictions. – whuber Oct 9 '14 at 19:01

Simply adding your age term is equivalent to holding age constant. Let's say you are looking at $\beta_1$, the coefficient on $X_1$. It would be interpreted as "On average, all else equal, a unit increase in $X_1$ is associated with an increase of $\beta_1$ in $Y$."

You could also add an interaction term. Let age be denoted by $X_2$. If you include the term $X_1X_2$ in your regression equation, then the coefficient on $X_1X_2$ is telling you, on average, how much the slope $\beta_1$ (the coefficient on $X_1$) increases per unit increase in age. If the coefficient on $X_1X_2$ is not significantly different from 0, then there isn't enough evidence to say that the effect of $X_1$ on $Y$ varies with age. Note: if you add in $X_1X_2$, be sure to have $X_1$ and $X_2$ in your model.

You could plot the residuals of your model against age - if you see an increase or decrease in variance associated with age, then you have non-constant error variance, and the assumptions of your regression model are violated.

See Kutner et. al. Applied Linear Statistical Models. Fifth Edition. Chapter 6, pp. 236-248 (sorry for the poorly formatted citation).

• Plotting residuals vs age will not provide any diagnosis of a non-random (biased) sample. All it will do is provide evidence of non-constant variance, and possibly a non-linear age effect. – Andrew M Oct 9 '14 at 17:51
• Thank you - edited accordingly. How would one test for bias in results due to a non-representative sample (too few elderly and too many young people, for example)? – mcanearm Oct 9 '14 at 17:54
• The question of whether or not the sample was non-representative (a better term here than biased, I think) can be answered using the age distribution alone. Just compare it to the age distribution of the population of interest, and if it's different then you could use survey-weighting techniques (roughly speaking, you upweight ages that are underrepresented in the regression procedure.) But it might not actually matter if the age distribution is non-representative--you can still compare older participants to younger participants, but maybe you don't want to assume a linear age effect. – Andrew M Oct 9 '14 at 18:06

First I'd create a scatter plot of depression level vs age to get a sense of how depression varies with respect to age.

If it's not clearly linear, then group age by say, decade, and use it as categorical variable.

For that matter, I think I'd group the outcome variable and do an ordinal regression. Why? I think that any numerical rating of depression is unlikely to be linear wrt the actual level of depression (you can trust me on this since I'm bipolar).

Overall, I think your results won't be very useful because a) you don't have enough data -e.g. how many drugs is a person on, are they in psychotherapy, physical health, employment status, self medication via drugs or alcohol and b) I think you're measuring the wrong thing. It's not the level of depression given use of music that you should be studying, it should instead be the improvement in depression due to the use of music.