Quantcast
Channel: Data Science, Analytics and Big Data discussions - Latest topics
Viewing all articles
Browse latest Browse all 4448

Handling Categorical Variables in Regression Models

$
0
0

@francy_marin wrote:

How to handle categorical variables in the below two scenarios with respect to Multi Linear Regression Models.

  1. If we have a categorical variable (X1) which consists of 100 factor levels (e.g. Name of Cities in Country), How will we convert them into dummy variables. I understand that we should not create 100 dummy variables (DX1, DX2, …, DX99) to represent these categorical values. How will we handle this situation?

  2. Let’s consider a scenario where we have a categorical variable (X1) which consists of 4 factor levels, what would be the code in R to create the dummy variables for this categorical variable?

Posts: 1

Participants: 1

Read full topic


Viewing all articles
Browse latest Browse all 4448

Latest Images

Trending Articles



Latest Images