Hello Dear,
excuse for taking your time but I am wondering what If the categorical variable is holding more than two levels like ("A", "B"; "C"; "D").
How I should proceed If I want to see the prediction of g1, g2, and g3 on the response variable "sep" in a separate regression ("sepA vs sepC", "sepB vs sepC", "sepD vs sepC and sepD vs sepA)
I mean I want to contrast levels A, B, D with C and D with A in a separate regression.
You may use the following vectors as an example:
sep <- c("A","B", "C", "C", "D", "A","A", "D", "B","B","D";C" )
g1 <- c(35,2,3,4,5,6,7, 10,12,41,76,45)
g2 <- c(20,2,7,2,8,5,5,3,7,2,12, 13)
g3 <- c(5,0,4,5,2,4,8,9,20,1,11, 24)
data <- data.frame(sep, g1, g2, g3)
Thank you!