How to concatenate a double array and a categorical array?
Ältere Kommentare anzeigen
Hi,
I was trying to run a binary logistic regression using the function fitglm(Tf{:,3:11},Tf.Var2,'Distribution','binomial'). However, it returns me the error "Unable to concatenate a double array and a categorical array." The reason for this is that Tf{:,4} is the categorical variable gender whereas other variables are double. I am wondering how to include both numeric and catogorical variables as predictors in this logistic regression model?
Akzeptierte Antwort
Weitere Antworten (0)
Kategorien
Mehr zu Get Started with Statistics and Machine Learning Toolbox finden Sie in Hilfe-Center und File Exchange
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!