Lecture Overview:
- Qualitative Predictors
- Interaction between variables
- Some considerations in using indicator variables
Qualitative Predictors
One Factor with Two Classes
- A study of the effects of childhood sexual abuse on adult females
- Y: post-traumatic stress disorder (PTSD)
- $X_1:$ Chldhood sexual abuse (csa); Abused or Not abused (Qualitative)
- $X_2:$ The childhood physical abuse (cpa) (Quantitative)
abuse = read.table("Abuse")
head(abuse)
abuse$csa <- as.factor(abuse$csa) # Convert character into factor
class(abuse$csa)
levels(abuse$csa)
- We consider the model with “csa” first
- Quantitative indicators for the classes of the qualitative variable must be employed
Using Indicator Variables
- There are many ways of quantitatively identifying the classes of a qualitative variable.
- Let’s use 0 and 1.