Skip to content

Instantly share code, notes, and snippets.

@orome
Created March 28, 2014 18:51
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save orome/9840196 to your computer and use it in GitHub Desktop.
Save orome/9840196 to your computer and use it in GitHub Desktop.
Call:
glm(formula = over50k ~ ., family = binomial, data = censusTrain)
Deviance Residuals:
Min 1Q Median 3Q Max
-5.1065 -0.5037 -0.1804 -0.0008 3.3383
Coefficients: (2 not defined because of singularities)
Estimate Std. Error z value Pr(>|z|)
(Intercept) -8.658e+00 1.379e+00 -6.279 3.41e-10 ***
age 2.548e-02 2.139e-03 11.916 < 2e-16 ***
workclass Federal-gov 1.105e+00 2.014e-01 5.489 4.03e-08 ***
workclass Local-gov 3.675e-01 1.821e-01 2.018 0.043641 *
workclass Never-worked -1.283e+01 8.453e+02 -0.015 0.987885
workclass Private 6.012e-01 1.626e-01 3.698 0.000218 ***
workclass Self-emp-inc 7.575e-01 1.950e-01 3.884 0.000103 ***
workclass Self-emp-not-inc 1.855e-01 1.774e-01 1.046 0.295646
workclass State-gov 4.012e-01 1.961e-01 2.046 0.040728 *
workclass Without-pay -1.395e+01 6.597e+02 -0.021 0.983134
education 11th 2.225e-01 2.867e-01 0.776 0.437738
education 12th 6.380e-01 3.597e-01 1.774 0.076064 .
education 1st-4th -7.075e-01 7.760e-01 -0.912 0.361897
education 5th-6th -3.170e-01 4.880e-01 -0.650 0.516008
education 7th-8th -3.498e-01 3.126e-01 -1.119 0.263152
education 9th -1.258e-01 3.539e-01 -0.355 0.722228
education Assoc-acdm 1.602e+00 2.427e-01 6.601 4.10e-11 ***
education Assoc-voc 1.541e+00 2.368e-01 6.506 7.74e-11 ***
education Bachelors 2.177e+00 2.218e-01 9.817 < 2e-16 ***
education Doctorate 2.761e+00 2.893e-01 9.544 < 2e-16 ***
education HS-grad 1.006e+00 2.169e-01 4.638 3.52e-06 ***
education Masters 2.421e+00 2.353e-01 10.289 < 2e-16 ***
education Preschool -2.237e+01 6.864e+02 -0.033 0.973996
education Prof-school 2.938e+00 2.753e-01 10.672 < 2e-16 ***
education Some-college 1.365e+00 2.195e-01 6.219 5.00e-10 ***
educationnum NA NA NA NA
maritalstatus Married-AF-spouse 2.540e+00 7.145e-01 3.555 0.000378 ***
maritalstatus Married-civ-spouse 2.458e+00 3.573e-01 6.880 6.00e-12 ***
maritalstatus Married-spouse-absent -9.486e-02 3.204e-01 -0.296 0.767155
maritalstatus Never-married -4.515e-01 1.139e-01 -3.962 7.42e-05 ***
maritalstatus Separated 3.609e-02 1.984e-01 0.182 0.855672
maritalstatus Widowed 1.858e-01 1.962e-01 0.947 0.343449
occupation Adm-clerical 9.470e-02 1.288e-01 0.735 0.462064
occupation Armed-Forces -1.008e+00 1.487e+00 -0.677 0.498170
occupation Craft-repair 2.174e-01 1.109e-01 1.960 0.049972 *
occupation Exec-managerial 9.400e-01 1.138e-01 8.257 < 2e-16 ***
occupation Farming-fishing -1.068e+00 1.908e-01 -5.599 2.15e-08 ***
occupation Handlers-cleaners -6.237e-01 1.946e-01 -3.204 0.001353 **
occupation Machine-op-inspct -1.862e-01 1.376e-01 -1.353 0.176061
occupation Other-service -8.183e-01 1.641e-01 -4.987 6.14e-07 ***
occupation Priv-house-serv -1.297e+01 2.267e+02 -0.057 0.954385
occupation Prof-specialty 6.331e-01 1.222e-01 5.180 2.22e-07 ***
occupation Protective-serv 6.267e-01 1.710e-01 3.664 0.000248 ***
occupation Sales 3.276e-01 1.175e-01 2.789 0.005282 **
occupation Tech-support 6.173e-01 1.533e-01 4.028 5.63e-05 ***
occupation Transport-moving NA NA NA NA
relationship Not-in-family 7.881e-01 3.530e-01 2.233 0.025562 *
relationship Other-relative -2.194e-01 3.137e-01 -0.699 0.484263
relationship Own-child -7.489e-01 3.507e-01 -2.136 0.032716 *
relationship Unmarried 7.041e-01 3.720e-01 1.893 0.058392 .
relationship Wife 1.324e+00 1.331e-01 9.942 < 2e-16 ***
race Asian-Pac-Islander 4.830e-01 3.548e-01 1.361 0.173504
race Black 3.644e-01 2.882e-01 1.265 0.206001
race Other 2.204e-01 4.513e-01 0.488 0.625263
race White 4.108e-01 2.737e-01 1.501 0.133356
sex Male 7.729e-01 1.024e-01 7.545 4.52e-14 ***
capitalgain 3.280e-04 1.372e-05 23.904 < 2e-16 ***
capitalloss 6.445e-04 4.854e-05 13.277 < 2e-16 ***
hoursperweek 2.897e-02 2.101e-03 13.791 < 2e-16 ***
nativecountry Canada 2.593e-01 1.308e+00 0.198 0.842879
nativecountry China -9.695e-01 1.327e+00 -0.730 0.465157
nativecountry Columbia -1.954e+00 1.526e+00 -1.280 0.200470
nativecountry Cuba 5.735e-02 1.323e+00 0.043 0.965432
nativecountry Dominican-Republic -1.435e+01 3.092e+02 -0.046 0.962972
nativecountry Ecuador -3.550e-02 1.477e+00 -0.024 0.980829
nativecountry El-Salvador -6.095e-01 1.395e+00 -0.437 0.662181
nativecountry England -6.707e-02 1.327e+00 -0.051 0.959686
nativecountry France 5.301e-01 1.419e+00 0.374 0.708642
nativecountry Germany 5.474e-02 1.306e+00 0.042 0.966572
nativecountry Greece -2.646e+00 1.714e+00 -1.544 0.122527
nativecountry Guatemala -1.293e+01 3.345e+02 -0.039 0.969180
nativecountry Haiti -9.221e-01 1.615e+00 -0.571 0.568105
nativecountry Holand-Netherlands -1.282e+01 2.400e+03 -0.005 0.995736
nativecountry Honduras -9.584e-01 3.412e+00 -0.281 0.778775
nativecountry Hong -2.362e-01 1.492e+00 -0.158 0.874155
nativecountry Hungary 1.412e-01 1.555e+00 0.091 0.927653
nativecountry India -8.218e-01 1.314e+00 -0.625 0.531661
nativecountry Iran -3.299e-02 1.366e+00 -0.024 0.980736
nativecountry Ireland 1.579e-01 1.473e+00 0.107 0.914628
nativecountry Italy 6.100e-01 1.333e+00 0.458 0.647194
nativecountry Jamaica -2.279e-01 1.387e+00 -0.164 0.869467
nativecountry Japan 5.072e-01 1.375e+00 0.369 0.712179
nativecountry Laos -6.831e-01 1.661e+00 -0.411 0.680866
nativecountry Mexico -9.182e-01 1.303e+00 -0.705 0.481103
nativecountry Nicaragua -1.987e-01 1.507e+00 -0.132 0.895132
nativecountry Outlying-US(Guam-USVI-etc) -1.373e+01 8.502e+02 -0.016 0.987115
nativecountry Peru -9.660e-01 1.678e+00 -0.576 0.564797
nativecountry Philippines 4.393e-02 1.281e+00 0.034 0.972640
nativecountry Poland 2.410e-01 1.383e+00 0.174 0.861624
nativecountry Portugal 7.276e-01 1.477e+00 0.493 0.622327
nativecountry Puerto-Rico -5.769e-01 1.357e+00 -0.425 0.670837
nativecountry Scotland -1.188e+00 1.719e+00 -0.691 0.489616
nativecountry South -8.183e-01 1.341e+00 -0.610 0.541809
nativecountry Taiwan -2.590e-01 1.350e+00 -0.192 0.847878
nativecountry Thailand -1.693e+00 1.737e+00 -0.975 0.329678
nativecountry Trinadad&Tobago -1.346e+00 1.721e+00 -0.782 0.434105
nativecountry United-States -8.594e-02 1.269e+00 -0.068 0.946020
nativecountry Vietnam -1.008e+00 1.523e+00 -0.662 0.507799
nativecountry Yugoslavia 1.402e+00 1.648e+00 0.851 0.394874
---
Signif. codes: 0 ‘***’ 0.001 ‘**’ 0.01 ‘*’ 0.05 ‘.’ 0.1 ‘ ’ 1
(Dispersion parameter for binomial family taken to be 1)
Null deviance: 21175 on 19186 degrees of freedom
Residual deviance: 12104 on 19090 degrees of freedom
AIC: 12298
Number of Fisher Scoring iterations: 15
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment