'why a specific model is not appropriate, given a data with 6 variables (they are chr variables)

i want to show why a specific model is not appropriate, given a data with 6 variables (they are chr variables) the model is y= abc*(x1+x2) a and b from the data are non numeric, so is it enough to say that because they are not numeric we cant use this model? and if i want to change a chr variables into numeric how can i do this without making it become NA?



Solution 1:[1]

You can still potentially model non-numeric type data by converting it to factor by: df$a <- as.factor(df$a); df$b <- as.factor(df$b).

However, it might not make sense sometimes. For example, df$a is an unique id for each observation and you don't want to put it as a predictor.

Sources

This article follows the attribution requirements of Stack Overflow and is licensed under CC BY-SA 3.0.

Source: Stack Overflow

Solution Source
Solution 1 Fujibayashi Kyou