I'm trying to run a logistic regression in R to determine what independent variables may determine if a sea turtle becomes entangled in fishing net or not. My independent variables vary significantly from each other in both scale and class e.g. Mesh size (7mm-1500mm), Twine diameter(0.33-4mm) Colour (red,blue green etc.) Construction (Multi or Mono). Must I first convert all independent variables to a similar scale to run a glm command. If so how do I standardise factors such as Colour and Construction? Also is it necessary to produce a testing dataset and a training data set as I see some people do this and others incorporate the entire model in the glm
command ?
-
$\begingroup$ Your main question is largely a duplicate of Can I use multiple regression when I have mixed categorical and continuous predictors? (although you are performing logistic regression, the answer is the same). $\endgroup$– SilverfishSep 17, 2016 at 14:10
-
$\begingroup$ The answer is probably no and no. But read this post and this post. Note Prof. Harrell' comment at the bottom of the question. My understanding is that separating testing and training is done in the context of machine learning - you want to see your out of sample error with the idea not of identifying relationships between iv and dv, but rather to make predictions on future data. $\endgroup$– Antoni ParelladaSep 17, 2016 at 14:11