Solution (source code)

= Solution

The successful hard-margin fit proves that the transformed observations are separable. This creates <complete separation> in unpenalized <logistic regression>: scaling a separating coefficient vector continually raises the likelihood, so no finite maximum-likelihood estimate exists. The nearly singular observed information produces the enormous reported standard errors.

A ridge-penalized logistic regression, or equivalently a Bayesian logistic model with a proper Gaussian prior, gives finite, stable coefficients. Firth bias reduction is another standard remedy.