I am running a logit regression in R with a large number of input variables.
newlogit <- glm(install. ~ SIZES + GROSSCONSUMPTION.... +
NETTCONSUMPTION..... + NETTGENERATION....... +
GROSSGENERATION.... + Variable. + Fixed +
Cost.of.gross.cons + Cost.of.net.cons + Cons.savings +
generation.gains + Total.savings + Cost.of.system +
Payback + Self.consumption + Total.consumption.as.solar +
Owner.occupied + postcode + Suburb + Market.penetration +
X..green.vote, data = newdata, family = "binomial")
I am getting this error:
Error in contrasts<-(tmp, value = contr.funs[1 + isOF[nn]]) : contrasts can be applied only to factors with 2 or more levels
Would you please be able to advise why this error is occurring and if there is a way to run this regression?