I have a binary outcome fit by a logistic model with a continuous independent variable that is logged to ensure a linear rather than exponential relationship to the dependent variable. I have included the second order term as it appears the fit is improved overall. The resulting formula is:
fit <- glm(y ~ poly(log(x),2), family=binomial(link=logit))
How do I calculate the probability of each event with these higher order terms given a first order term coefficient of A and second order term coefficient of B? Is it
sum = A x log(x) + B x log(x)^2 --> probability = e^sum / (1+e^sum)?