I am designing the design matrix for my general linear model (GLM). Besides the dummy constant column, I wish to have 4 regressors (columns) in my design matrix. They are diagnosis, age, gender, and weight.
The diagnosis is definitely the most important. It is trinary, i.e., normal, intermediate, or severe. The age, gender, and weight are just (not important) confounds that I wish to model, just in case they have effects on my observed data.
Originally, I have one column for each of these four factors.
- diagnosis: 0 means normal, 1 means intermediate, and 2 means severe;
- age: 13 means 13 years old, and etc.;
- gender: 0 means male, and 1 means female;
- weight: 75 means 75 kg, and etc..
/0 26 1 75\ - means a 26 year-old and 75 kg female, no disease |2 13 0 60| - means a 13 year-old and 60 kg male, severe stage |1 12 1 77| - means a 12 year-old and 77 kg female, intermediate disease | ... | \ /
I then was told that I better split my diagnosis into 3 columns, with each being binary, because this way I am assuming the intermediate stage (2) is equidistant from normal (1) and sever (3), which is not the case.
So now my design matrix becomes
/1 0 0 26 1 75\ - means a 26 year-old and 75 kg female, no disease |0 0 1 13 0 60| - means a 13 year-old and 60 kg male, severe stage |0 1 0 12 1 77| - means a 12 year-old and 77 kg female, intermediate disease | ... | \ /
This modification makes sense to me, but it gets me wondering if I should do the same thing to the age and weight (no need to gender, since it is already binary).
If I do the same thing, imagine how many more columns I would have (e.g., if the age ranges 12 to 60, I would have 60-12+1=49 binary columns. Same for the weight. Moreover, weight could be a decimal, say 70.3 kg)!
It therefore seems that I can't do the same thing to age and weight. But As you can see, the diagnosis columns and gender column are binary, but the age and weight columns are not! Will this mixture of binary and multinary columns work?