0

in my GLM model I tested for not significant variables. One of variable in Geography where values woould be country names. So test showed me that variable GeographyCountryA is significant so I want to keep it but not sure how to properly address it ? below gives an error:

Error in eval(predvars, data, env) : object 'GeographyGermany' not found

Code:

churn_model_rl <- glm(data = train_churn, formula = Exited ~ Age+
                     +NumOfProducts+IsActiveMember+Gender+GeographyGermany,family = binomial(link = "logit"))
AlSub
  • 1,384
  • 1
  • 14
  • 33
  • could you please share `class(train_churn[["GeographyGermany"]]`? – AlSub Jan 27 '21 at 16:16
  • it's: character – Bart Bart Jan 27 '21 at 16:29
  • To fit a `glm()` object , independent and dependent variables need to be numeric/integer, for this case consider to convert `GeographyGermany` to a column of zeros and ones – AlSub Jan 27 '21 at 16:43
  • ok, thank you for the input. – Bart Bart Jan 27 '21 at 16:53
  • [See here](https://stackoverflow.com/q/5963269/5325862) on making a reproducible example that is easier for folks to help with. It's also unclear what you mean by "properly address it"--address what? – camille Jan 27 '21 at 17:29

0 Answers0