1
$\begingroup$

In an effort to understand AIC more intuitively, I created a synthetic dataset with the following:

df <- data.frame(replicate(10,sample(0:1,1000,rep=TRUE)))
df['Y'] <- (runif(1000,0,2) + df$X4 + df$X5) < 2

When I run summary(glm(Y~., data=df, family = 'binomial'(link='logit'))) I get this output:

Call:
glm(formula = Y ~ ., family = binomial(link = "logit"), data = df)

Deviance Residuals: 
     Min        1Q    Median        3Q       Max  
-1.26754  -1.05215  -0.00007   0.00009   1.32843  

Coefficients:
              Estimate Std. Error z value Pr(>|z|)
(Intercept)  19.476407 481.689046   0.040    0.968
X1            0.115944   0.180479   0.642    0.521
X2           -0.016184   0.180372  -0.090    0.929
X3            0.027578   0.179069   0.154    0.878
X4          -19.614964 481.688977  -0.041    0.968
X5          -19.539739 481.688977  -0.041    0.968
X6            0.155426   0.179888   0.864    0.388
X7           -0.089721   0.179614  -0.500    0.617
X8           -0.002851   0.179913  -0.016    0.987
X9           -0.010019   0.179219  -0.056    0.955
X10          -0.090924   0.180055  -0.505    0.614

(Dispersion parameter for binomial family taken to be 1)

    Null deviance: 1386.29  on 999  degrees of freedom
Residual deviance:  694.98  on 989  degrees of freedom
AIC: 716.98

Number of Fisher Scoring iterations: 18

Shouldn't X4 and X5 have tiny standard errors and tiny p-values? What am I missing?

$\endgroup$
2
  • 1
    $\begingroup$ You haven't explained your model and what it's intended to do, but you can at least analyze the data you generated. You might be surprised to see what's going on. Examine the relationships among X4, X5 and Y. Since your example is not reproducible, you might get different results than others, so look at several simulations. Use with(df,table(X4,X5,Y)). $\endgroup$
    – whuber
    Feb 7, 2017 at 23:01
  • $\begingroup$ And, search this site for the Hauck-Donner effect $\endgroup$ Feb 8, 2017 at 10:23

0

Your Answer

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

Browse other questions tagged or ask your own question.