2
$\begingroup$

I'm using R to estimate a logit model and I use the following to suppress the intercept.

model = glm(output ~ email + search + display + seq1 + seq2 + seq3 + seq4 + seq5 + seq6 + 0, data = dataInput, family = "binomial")

But in the output there is a dispay0 term which I do not understand. Could I know what this is and how to interpret it.

Coefficients: (4 not defined because of singularities)
                Estimate Std. Error z value Pr(>|z|)  
     display0   0.2311     0.9044   0.256   0.7983  
     display1   0.1823     0.6055   0.301   0.7633  
     email1    -0.3646     0.7416  -0.492   0.6229  
     search1        NA         NA      NA       NA  
     seq11     -0.9398     0.5273  -1.782   0.0747 .
     seq21          NA         NA      NA       NA  
     seq31     -0.9163     0.7000  -1.309   0.1905  
     seq41          NA         NA      NA       NA  
     seq51     -1.4759     0.8172  -1.806   0.0709 .
     seq61          NA         NA      NA       NA  

My data looks like below

output seq1 seq2 seq3 seq4 seq5 se6 display email search
1 or 0 1    0    0    0    0    0   1       1     0
1 or 0 0    1    0    0    0    0   1       1     0
1 or 0 0    0    1    0    0    0   1       0     1
1 or 0 0    0    0    1    0    0   1       0     1
1 or 0 0    0    0    0    1    0   0       1     1
1 or 0 0    0    0    0    0    1   0       1     1
$\endgroup$
0

1 Answer 1

2
$\begingroup$

There is no problem in the removal of the intercept part.

The problem of NA in the estimated coefficients is coming from the Multicollinearity. Adding regularization or removing problematic columns should fix it.

Here is a small code to demo the problem. I am using the same information but two columns in the model mpg and 2*mpg.

> summary(glm(am~mpg+I(2*mpg)+0,mtcars, family=binomial))

Call:
glm(formula = am ~ mpg + I(2 * mpg) + 0, family = binomial, data = mtcars)

Deviance Residuals: 
   Min      1Q  Median      3Q     Max  
-1.172  -1.169  -1.166   1.189   1.195  

Coefficients: (1 not defined because of singularities)
            Estimate Std. Error z value Pr(>|z|)
mpg        -0.001239   0.016880  -0.073    0.941
I(2 * mpg)        NA         NA      NA       NA

BTW without seeing the data, I am guessing following columns are identical or very highly correlated: email1 and search1, seq11 and seql21, etc.


You edits included the data, which is much easier for others to help you. From the data you can see, for example, email and search are complementary to each other, which means email= not search. The right way to deal with this is use any one of them. This is similar to, for example, the data has a person's weight in both lb and kg. Using one is sufficient.

$\endgroup$
4
  • $\begingroup$ Thanks for the reply, so I should just ignore it? In your output you do not have a mpg0 like mine. $\endgroup$ Oct 23, 2017 at 2:06
  • $\begingroup$ @user2224555 see my edits $\endgroup$
    – Haitao Du
    Oct 23, 2017 at 2:21
  • $\begingroup$ Thanks, the complementary rule you mention I can see how it applies to the rows 1 - 4 but rows 5 and 6 doesn't fit that rule. so I'm confused from where the multi-colinearity comes from $\endgroup$ Oct 23, 2017 at 2:35
  • $\begingroup$ @user2224555 Please check the correlation. You'll find them 100%. $\endgroup$
    – SmallChess
    Oct 23, 2017 at 8:12

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

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