# Logit/Probit: algorithm did not converge and sampling weights

I am running a logit regression in R. I get a warning which signals the missing algorithm convergence.

My experience suggests that the problem may be due to the number of dummies in the model and/or to the limited IWLS iterations set by default by the software (25 in R).

Deleting all dummies from the model and increasing the IWLS iterations using the option maxit = n in R does not produce any positive result.

What I've found is that not including the sampling weights (sw) in the model makes the warning disappear.

Can someone explain why and how I can solve for this problem?

Note that the arbitrary exclusion of the sw causes some (minimal) changes in the results that I get with no-convergence achieved.

You don't say what function you're using in R. The svyglm function in the survey package automatically standardises the weights to have unit mean, for exactly this reason, but you will see this problem with glm
The problem is that the sampling weights can be very large ($$10^4-10^5$$ for an US national survey). Combining this with the exponential in the link function and the $$1/(\mu(1-\mu)$$ in the variance function can lead to overflow of the double-precision floating-point format.
The weights=df$weights/sum(df$weights)