I have a dataset with 6 variables such as price, country (this is a categorical variable with 7 levels), Rating_A, Rating_B, Rating_C, and Rating_D.
However, if I fit the GLM like
glm(price~factor(country)*Rating_A*Rating_B*Rating_C*Rating_D, family="gaussian", datafile)
Then the lowest AIC of the model will have so many interactions.
My question is how to find the best model? Can I use:
glm(price~factor(country)+Rating_A+Rating_B+Rating_C+Rating_D, family="gaussian", datafile)
to eliminate some variables and then fit the new glm function with interaction?
To find the best variables in GLM model, I use
library(MASS), and use the function
stepAIC() to find the AIC.