# Sensitivity Analysis with categorical predictive variables in R

I am doing a project where I have to predict the Sales Units in fashion and intend to run a Random Forest, Neural Networks and Support Vector Machine models. However, my predictive variables are all categorical, such as colour or price range. How can I do the sensitivity analysis of the actual values of my predictive variables in R?

For instance, if I pick the colour, how do I know if wether blue or yellow have a higher impact?

• (1) Sensitivity analysis is something different from what you are describing (you can see the tag description), (2) You can only assess the "impact" of a variable, not of individual values of that variable. You can determine a variable's relative importance in your model (based, for example on the change in $R^{2}$ when it's added to the model - if it's a regression). So maybe you can clarify what your ultimate goal is. – AlexK May 20 '19 at 3:15
• So, if not Sensitivity Analysis, where would you fit this question into? – Rita Araújo Novo May 20 '19 at 9:33
• Can you clarify what you are trying to do? When you say, "higher impact", higher impact on what? – AlexK May 20 '19 at 20:34
• My model will be something like: Sales~Color + PriceRange+Category So, I am predicting sales, and I have for instance color as one of my predictive variables. I want to know, within the range of colors (yellow, red, blue,...) which ones will represent higher sales and which ones will represent lower. – Rita Araújo Novo May 21 '19 at 9:23
• Isn't that just something you can do by comparing average sales across colors, or doing something like a t-test if you are looking to show statistical significance of the differences? – AlexK May 22 '19 at 3:10