# penalised logistic regression with brglm - warnings

I've built a logistic model to predict a binary response. I've got four categorical predictors. One of them (posicion) has 6 levels, 3 of which occur not too frequently and are ALWAYS (by definition) associated to one of the response values. Data size is 1690.

I reckon I'm dealing with a problem of separation. As you can see below those levels yield huge coefficients and standard errors.

Call:
glm(formula = transitividad ~ posicion + destinatario + hablante +
nse + posicion:destinatario + posicion:hablante, family = binomial(logit),
data = df)

Deviance Residuals:
Min       1Q   Median       3Q      Max
-2.4983  -0.9403   0.3624   0.6893   1.6018

Coefficients:
Estimate Std. Error z value Pr(>|z|)
(Intercept)                         -0.57275    0.13782  -4.156 3.24e-05 ***
posicionV-FNA                        3.64830    0.32424  11.252  < 2e-16 ***
posicionFNA-V                        2.09234    0.28554   7.328 2.34e-13 ***
posicionFNA-V-FNA                   18.31802  782.51098   0.023  0.98132
posicionV-FNA-FNA                   18.46375 1793.54833   0.010  0.99179
posicionFNA-FNA-V                   18.43491 1972.14578   0.009  0.99254
destinatarioOHS                      0.11269    0.15836   0.712  0.47668
hablanteCHI                          0.37117    0.15853   2.341  0.01922 *
nsensm                              -0.38546    0.12454  -3.095  0.00197 **
posicionV-FNA:destinatarioOHS       -0.79024    0.37067  -2.132  0.03302 *
posicionFNA-V:destinatarioOHS       -0.31599    0.35033  -0.902  0.36707
posicionFNA-V-FNA:destinatarioOHS   -0.04929  876.43494   0.000  0.99996
posicionV-FNA-FNA:destinatarioOHS   -0.20989 2241.50910   0.000  0.99993
posicionFNA-FNA-V:destinatarioOHS   -0.11269 2789.03530   0.000  0.99997
posicionV-FNA:hablanteCHI           -0.90119    0.32300  -2.790  0.00527 **
posicionFNA-V:hablanteCHI           -1.01920    0.32988  -3.090  0.00200 **
posicionFNA-V-FNA:hablanteCHI       -0.32472  791.68545   0.000  0.99967
posicionV-FNA-FNA:hablanteCHI       -0.36725 2241.26181   0.000  0.99987
posicionFNA-FNA-V:hablanteCHI       -0.46440 2787.42986   0.000  0.99987
---
Signif. codes:  0 ‘***’ 0.001 ‘**’ 0.01 ‘*’ 0.05 ‘.’ 0.1 ‘ ’ 1

(Dispersion parameter for binomial family taken to be 1)

Null deviance: 2181.5  on 1689  degrees of freedom
Residual deviance: 1625.5  on 1671  degrees of freedom
AIC: 1663.5

Number of Fisher Scoring iterations: 16


I've tried using the ‘brglm’ package but, although coefficients got lower I get some warnings I don not know how to interpret (see below). I have ruled out ridge or lasso regression because they do not provide p values, SE or CI. I'd like to know whether it's ok to follow this path or I'm completely wrong.

non-integer #successes in a binomial glm!
brglmFit: algorithm did not converge
brglmFit: fitted probabilities numerically 0 or 1 occurred

Call:
glm(formula = transitividad ~ posicion + destinatario + hablante +
nse + posicion:destinatario + posicion:hablante, family = binomial(logit),
data = df, method = "brglmFit", type = "AS_mean")

Deviance Residuals:
Min       1Q   Median       3Q      Max
-2.4798  -0.9426   0.3697   0.6946   1.5983

Coefficients:
Estimate Std. Error    z value Pr(>|z|)
(Intercept)                       -5.721e-01  1.377e-01 -4.156e+00 3.24e-05 ***
posicionV-FNA                      3.599e+00  3.192e-01  1.128e+01  < 2e-16 ***
posicionFNA-V                      2.067e+00  2.843e-01  7.272e+00 3.54e-13 ***
posicionFNA-V-FNA                  4.531e+00  1.394e+00  3.251e+00  0.00115 **
posicionV-FNA-FNA                  5.377e+14  3.025e+07  1.778e+07  < 2e-16 ***
posicionFNA-FNA-V                  9.852e+14  3.355e+07  2.936e+07  < 2e-16 ***
destinatarioOHS                    1.126e-01  1.583e-01  7.110e-01  0.47687
hablanteCHI                        3.696e-01  1.585e-01  2.332e+00  0.01968 *
nsensm                            -3.784e-01  1.239e-01 -3.055e+00  0.00225 **
posicionV-FNA:destinatarioOHS     -7.647e-01  3.660e-01 -2.089e+00  0.03668 *
posicionFNA-V:destinatarioOHS     -3.087e-01  3.492e-01 -8.840e-01  0.37672
posicionFNA-V-FNA:destinatarioOHS  8.656e-01  1.713e+00  5.050e-01  0.61340
posicionV-FNA-FNA:destinatarioOHS  1.880e+14  3.844e+07  4.891e+06  < 2e-16 ***
posicionFNA-FNA-V:destinatarioOHS  3.879e+01  4.745e+07  0.000e+00  1.00000
posicionV-FNA:hablanteCHI         -8.975e-01  3.209e-01 -2.797e+00  0.00515 **
posicionFNA-V:hablanteCHI         -1.010e+00  3.293e-01 -3.067e+00  0.00216 **
posicionFNA-V-FNA:hablanteCHI     -5.387e-01  1.712e+00 -3.150e-01  0.75301
posicionV-FNA-FNA:hablanteCHI     -1.880e+14  3.844e+07 -4.891e+06  < 2e-16 ***
posicionFNA-FNA-V:hablanteCHI     -5.662e+04  4.745e+07 -1.000e-03  0.99905
---
Signif. codes:  0 ‘***’ 0.001 ‘**’ 0.01 ‘*’ 0.05 ‘.’ 0.1 ‘ ’ 1

(Dispersion parameter for binomial family taken to be 1)

Null deviance: 2181.5  on 1689  degrees of freedom
Residual deviance: 1628.5  on 1671  degrees of freedom
AIC: 1666.5

Number of Fisher Scoring iterations: 100


df here.

• I would start with the "non-integer #successes in a binomial glm!" You first need to figure out (1) if you have non-integer values in your response variable, (2) if so why [it's usually a mistake, there are rare exceptions], (3) if not, why brglm thinks you do. Oct 22, 2020 at 23:36
• I have tried to figure that out. If I run a regular glm logistic model I don't get that warning (odd!). My response variable is a factor with two values: "transitive" "intransitive". Oct 23, 2020 at 0:03
• well, can you post a minimal reproducible example? What happens if you convert your response to numeric (0/1)? Oct 23, 2020 at 0:09
• Thanks for the follow up! I've tried turning the DV into 0/1 but got the same result. I've added the dataset as a link in the question. Oct 23, 2020 at 0:25