I am a newbie in Data Science so that do not judge me for this questions.
Making a regression model (linear model, lm_model) with numeric and categorical variables, I realized that Estimate coefficients in summary (lm_model) are the same for categorical variables whether categorical variables are factors or characters.
So, what is the preferred method to use for modeling (regression or classification)? As I read before, factors are preferred, but in my case, I actually do not see any difference.
In some cases, people say, if categorical variables have many levels (more than 32 levels), it is not possible to use a linear model or random forest model. What are the solutions for this problem, except splitting categorical variables into small groups? Is it ok to convert factors into characters?
Also, I am a bit of stuck in this question. What algorithms are required to transform categorical variables into numeric (or dummy variables)? Or is it not necessary? As I know, algorithms such as linear regression, logistic regression are required; on the other hand, trees algorithms like random forest are not required. But using caret package in R, I noticed that a linear model with categorical variables as factors or even characters runs pretty well and I can see Estimate coefficients. What is a preferred method for this case?
What are real constraints to use dummy variables? Of course, it depends on data, but is there a rule when it is not recommended to use it?
Thank you very much in advance!!