# Coding Variables for linear regression

1. Apr 30, 2013

### zzmanzz

1. The problem statement, all variables and given/known data

I have to design an experiment with 3 factors. One factor has to be quantitative with at least 3 levels. One Qualitative with at least 3 levels. And the last one can be either quant/qual with at least 2 levels.

My question is in regards to coding the variables. For example, and Im not sure this is correct, one of my quantitative factors is age groups. 10-20,21-30, 31-40,41-50. How would I code this using dummy variables?

2. Relevant equations

3. The attempt at a solution

Since these are age groups it seems that coding my variable using
x1 x2
1 1
0 0
1 0
0 1

with respect to the age groups is more of a qualitative approach.

What I wish to do is make the coded variable be an interval taking into account a persons age. Not just ok, you are in group 1 because u are 15, but rather, your respective interval is x.

Sorry I forgot most of my statistics info and I
Hope this makes sense. Thanks.

Last edited: Apr 30, 2013