1
$\begingroup$

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.

$\endgroup$
1
$\begingroup$

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.

With infinite-precision maths there would be no problem, but with finite precision the computations can sometimes fail. Fortunately, regression coefficients and their standard errors are not affected by standardising the weights to have unit mean or unit sum (though estimated population totals would be).

| cite | improve this answer | |
$\endgroup$
0
$\begingroup$

I solved the issue with:

The weights=df$weights/sum(df$weights)

| cite | improve this answer | |
$\endgroup$

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.