Regression With Categorical Predictors Flashcards
What is categorical scale?
Could be gender, city area, level of education, type of illness.
How can you do regression with categorical predictors?
By dummy coding.
What is dummy coding?
A way of representing categories using only the values 0 and 1
What do you do when the predictor has 2 categories in dummy coding?
Choose one as baseline and then compare the other predictor with the baseline.
Assign 1 to the baseline category and 0 to the category you are comparing.
What does the ANOVA table show?
Goodness of fit. If it’s non significant the model is not a better at predicting the change in the variable than a model based on the mean.
Can you make a scatterplot of categorical regression?
Yes, and it will look weird but that’s fine! Also you can still add line of best fit!
What is the null hypothesis for regression?
That there are no difference between the 2 predictors.
What t-test do you perform with categorical regression?
Independent sample t-test
In the independent t-test what cells do you need to read?
t, sig (2-tailed) and mean difference.
What is the mean difference in independent t test the same as?
B ( the slope) in the coefficient regression table of regression analysis
What do you dummy code categorical predictors with more than 2 predictors?
Add the number of variables and subtract 1.
Choose one as the baseline which you call 1 then you call the other variables 0 (yellow 1, green 0 and red 0).
You then compare red vs yellow and green vs yellow.
Then create another dummy variable naming another variable 1 and the two others 0 (green 1, yellow 0 and red 0) which means you can then compare red vs green.
The baseline is always the same variable (red).