From the course: 11 Useful Tips for Regression Analysis
Unlock the full course today
Join today to access over 22,400 courses taught by industry experts or purchase this course individually.
Factor variables
From the course: 11 Useful Tips for Regression Analysis
Factor variables
- [Instructor] As you well know many regression variables typically come in continuous or scale form. Unfortunately, not all data on measured, continuously other data, come in categorical, or factor, form. Examples are variables that measure qualitative facts such as gender, or Likert scales. And using factor variables in the regression requires coding and reference categories. To use such variables in a regression, We need to do two things. We need to ensure that each category is coded into a dummy variable. And we need to choose a reference category, also called the base category. Let's have a look at how we can do this. A dummy variable also called a binary variable takes only two values, normally zero or one. So how do we record a categorical variable into many dummy variables? Here is a small dataset with five observations. There's one variable with data on categories, A, B and C. To use this variable in a…
Practice while you learn with exercise files
Download the files the instructor uses to teach the course. Follow along and learn by watching, listening and practicing.