0
$\begingroup$

I'm pretty new to the data analysis and predictive modeling process and I had a quick question about EDA. For numerical variables this seems pretty straightforward to do some quick correlations and scatterplots to try to pick some variables that are most related to the response variable in a regression. However, I'm unsure of the process for categorical variables.

What is the best, simplest way of going about choosing some categorical variables in a large dataset? Furthermore, is it possible to do this after already creating the necessary dummy variables? For example, if I have a dataset and the first thing I do is process it to clean it and create dummy variables, can I then conduct EDA on that to try to identify a handful of variables that have the most influence on the response?

And given that I use a couple categorical variables in my regression, what if they each have a lot of different categories? Would I have to include all of them and would it be bad for the model?

If the questions are unclear please let me know if I can specify anything.

$\endgroup$
  • 1
    $\begingroup$ Having categorical predictors is not that different. You can always plot a response variable against a (0. 1) indicator variable (you say dummy, a poor term in my view but that's a different question). If overplotting is a problem, then use distribution plots instead (e.g. side by side stripplots, histograms, box plots). If an indicator is important as a predictor you'll see a shift. Same applies to categorical variables with multiple categories. Even if numerical coding is, or would be, arbitrary, you can still plot distributions side by side. $\endgroup$ – Nick Cox Aug 31 '17 at 8:12
  • $\begingroup$ Are you asking about exploratory data analysis or about model building? Your question has several question embedded in it and some have a lot of answers on here already. $\endgroup$ – Peter Flom Aug 31 '17 at 11:36

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Browse other questions tagged or ask your own question.