I am trying to find predictors for people selling their cars by doing a logistic regression. My sample size is n=922 and has mostly kardinal and ordinal variables. Since some of my variables have up to 7 categories (--> 6 dummyvariables) I came across separation. In the literature they recommend the bias-reduced logistic regression approach of Firth.
After installing the package I used the following formula:
logistf(formula = attr(data, "formula"), data = sys.parent(), pl = TRUE, ...)
and entered (or tried to enter) my data:
mydataBrAll <- logistf(formula = attr(mydataBr$Verkauft, "formula"), data = mydataBr, pl = FALSE)
summary(mydataBrAll)
Verkauft being my dependent variable and mydataBr being my data
What kind of term has to be entered in "formula" ? And if this works, can I use the stepwise backwards algorithm (or the pseudo R² etc) the same way as I'd use it in a regular log.reg. model?:
'Backwards Selection'
backwards <- step(mydataBrAll, direction = "backward")
Some of you might consider this as an easy problem, but I can't figure it out with the help of the explanations online.
Any help is very much appreciated!