470 likes | 693 Views
Categorical variables in a regression. A categorical variable is one which specifies the observation in one of several groups.Examples are Race, Gender, Eye Color. Often treatment groups (treatment or control, for example) are categorical.Often variables that may have a continuous interpretation a
E N D
1. Including Categorical Variablesin a Regression Analysis STA 671
Summer 2008
2. Categorical variables in a regression A categorical variable is one which specifies the observation in one of several groups.
Examples are Race, Gender, Eye Color. Often treatment groups (treatment or control, for example) are categorical.
Often variables that may have a continuous interpretation are viewed as categorical for fitting the regression (for example, dosage of a drug might be 10mg, 20mg, or 40mg). Fitting this as a categorical variable avoids the assumption that the difference between 10mg and 20mg is twice the difference between 20mg and 40mg, for example.
3. Categorical variables can have interesting attributes Return to the body data
Let’s look at the relationship between shoulder girth and weight.
When we plot the data, we will code the points by whether the individual is a man or a woman.
4. Shoulder girth versus weight, categorized by gender (men=1)