Prediction of Income based on Census data

Kowshik Kumar Bandameedipalli

2024-11-05

Project Overview

Hypothesis

We are going to check the associativity between Income variable and other factors of the Census Income dataset and draw conclusions whether to accept or to reject the following hypothesis:

Data

The Dataset contains the following information about an individual:

● age: the age of an individual and the value entries are of datatype: Integer greater than 0.

● workclass: a general term to represent the employment status of an individual and the value entries are as follows: Private, Self-emp-not-inc, Self-emp-inc, Federal-gov, Local-gov, State-gov, Without-pay, Never-worked.

● fnlwgt: final weight. In other words, this is the number of people the census believes the entry represents and the value entries are of following datatype: Integer greater than 0.

● education: the highest level of education achieved by an individual and the value entries are as follows: Bachelors, Some-college, 11th, HS-grad, Prof-school, Assoc-acdm, Assoc-voc, 9th, 7th-8th, 12th, Masters, 1st-4th, 10th, Doctorate, 5th-6th, Preschool.

● education-num: the highest level of education achieved in numerical form and the value entries are of following datatype: Integer greater than 0.

● marital-status: marital status of an individual. Married-civ-spouse corresponds to a civilian spouse while Married-AF-spouse is a spouse in the Armed Forces and the value entries are follows: Married-civ-spouse, Divorced, Never-married, Separated, Widowed, Married-spouse-absent, Married-AF-spouse.

● occupation: the general type of occupation of an individual and the value entries are as follows: Tech-support, Craft-repair, Other-service, Sales, Exec-managerial, Prof-specialty, Handlers-cleaners, Machine-op-inspct, Adm-clerical, Farming-fishing, Transport-moving, Priv-house-serv, Protective-serv, Armed-Forces.

● relationship: represents what this individual is relative to others. For example, an individual could be a Husband. Each entry only has one relationship attribute and is somewhat redundant with marital status. We might not make use of this attribute at all and the value entries are as follows: Wife, Own-child, Husband, Not-in-family, Other-relative, Unmarried.

● race: Descriptions of an individual’s race and the value entries are as follows: White, Asian-Pac-Islander, Amer-Indian-Eskimo, Other, Black.

● sex: the biological sex of the individual and the value entries are either: Male, Female.

● capital-gain: capital gains for an individual and the value entries are of datatype Integer greater than or equal to 0.

● capital-loss: capital loss for an individual and the value entries are of datatype: Integer greater than or equal to 0.

● hours-per-week: the hours an individual has reported to work per week and the value entries are of datatype: continuous.

● native-country: country of origin for an individual and the value entries are as follows: United-States, Cambodia, England, Puerto-Rico, Canada, Germany, Outlying-US(Guam-USVI-etc), India, Japan, Greece, South, China, Cuba, Iran, Honduras, Philippines, Italy, Poland, Jamaica, Vietnam, Mexico, Portugal, Ireland, France, Dominican-Republic, Laos, Ecuador, Taiwan, Haiti, Columbia, Hungary, Guatemala, Nicaragua, Scotland, Thailand, Yugoslavia, El-Salvador, Trinadad&Tobago, Peru, Hong, Holand-Netherlands.

● income: whether an individual makes more than $50,000 annually and the value entries are as follows: <=50k, >50k

##       age         workclass             fnlwgt         education        
##  Min.   :17.00   Length:32561       Min.   :  12285   Length:32561      
##  1st Qu.:28.00   Class :character   1st Qu.: 117827   Class :character  
##  Median :37.00   Mode  :character   Median : 178356   Mode  :character  
##  Mean   :38.58                      Mean   : 189778                     
##  3rd Qu.:48.00                      3rd Qu.: 237051                     
##  Max.   :90.00                      Max.   :1484705                     
##  education.num   marital.status      occupation        relationship      
##  Min.   : 1.00   Length:32561       Length:32561       Length:32561      
##  1st Qu.: 9.00   Class :character   Class :character   Class :character  
##  Median :10.00   Mode  :character   Mode  :character   Mode  :character  
##  Mean   :10.08                                                           
##  3rd Qu.:12.00                                                           
##  Max.   :16.00                                                           
##      race               sex             capital.gain    capital.loss   
##  Length:32561       Length:32561       Min.   :    0   Min.   :   0.0  
##  Class :character   Class :character   1st Qu.:    0   1st Qu.:   0.0  
##  Mode  :character   Mode  :character   Median :    0   Median :   0.0  
##                                        Mean   : 1078   Mean   :  87.3  
##                                        3rd Qu.:    0   3rd Qu.:   0.0  
##                                        Max.   :99999   Max.   :4356.0  
##  hours.per.week  native.country        income         
##  Min.   : 1.00   Length:32561       Length:32561      
##  1st Qu.:40.00   Class :character   Class :character  
##  Median :40.00   Mode  :character   Mode  :character  
##  Mean   :40.44                                        
##  3rd Qu.:45.00                                        
##  Max.   :99.00

Data(Cleanup Steps)

Data(pitfalls encountered)

Analytical Scope (Mosaic Plots)

There is a statistical relationship between Gender and Income (\(\chi^2\) = 1517.8 and p = 2.2e-16). We reject the null hypothesis as the chi-square is 1517.8 and p-val=32.2e-16 which is much lesser than the level of signifiance i.e 0.05 makes the relationship between gender and Income statistically significant.

Analytical Scope (Histograms)

We can observe that majority of the people earn less than 50k per annum but few people earn more than 50k per annum in their work. Also, we do not have sufficient data of ages after 50 years.

We can notice that the female count is much higher in count compared to the male in all the age categories.

Analytical Scope (Relationships b/w Income and other factors)

Analytical Scope(Logistic Regression)

## 
## Call:
## glm(formula = income ~ ., family = binomial, data = train.data)
## 
## Deviance Residuals: 
##     Min       1Q   Median       3Q      Max  
## -5.0815  -0.5107  -0.2127  -0.0383   3.6490  
## 
## Coefficients: (1 not defined because of singularities)
##                                            Estimate Std. Error z value Pr(>|z|)
## (Intercept)                              -1.990e+00  7.626e-01  -2.609 0.009082
## age                                       2.522e-02  1.892e-03  13.329  < 2e-16
## workclassLocal-gov                       -7.618e-01  1.309e-01  -5.819 5.90e-09
## workclassNever-worked                    -1.197e+01  3.836e+02  -0.031 0.975114
## workclassPrivate                         -5.334e-01  1.091e-01  -4.888 1.02e-06
## workclassSelf-emp-inc                    -3.028e-01  1.454e-01  -2.083 0.037235
## workclassSelf-emp-not-inc                -1.075e+00  1.289e-01  -8.337  < 2e-16
## workclassState-gov                       -8.000e-01  1.436e-01  -5.570 2.54e-08
## workclassUnknown                         -1.100e+00  1.627e-01  -6.760 1.38e-11
## workclassWithout-pay                     -1.354e+01  2.786e+02  -0.049 0.961240
## education.num                             2.687e-01  1.079e-02  24.901  < 2e-16
## marital.statusMarried-AF-spouse           3.168e+00  6.140e-01   5.159 2.48e-07
## marital.statusMarried-civ-spouse          2.059e+00  7.845e-02  26.251  < 2e-16
## marital.statusMarried-spouse-absent      -1.380e-01  2.840e-01  -0.486 0.627077
## marital.statusNever-married              -5.552e-01  9.708e-02  -5.720 1.07e-08
## marital.statusSeparated                  -1.048e-01  1.814e-01  -0.578 0.563324
## marital.statusWidowed                    -1.426e-01  1.780e-01  -0.801 0.423115
## occupationArmed-Forces                   -7.830e-01  1.755e+00  -0.446 0.655516
## occupationCraft-repair                    1.192e-02  9.181e-02   0.130 0.896717
## occupationExec-managerial                 7.500e-01  8.822e-02   8.502  < 2e-16
## occupationFarming-fishing                -1.102e+00  1.670e-01  -6.603 4.04e-11
## occupationHandlers-cleaners              -7.725e-01  1.664e-01  -4.642 3.44e-06
## occupationMachine-op-inspct              -3.510e-01  1.199e-01  -2.929 0.003403
## occupationOther-service                  -8.982e-01  1.387e-01  -6.474 9.54e-11
## occupationPriv-house-serv                -3.895e+00  2.041e+00  -1.908 0.056376
## occupationProf-specialty                  5.657e-01  9.133e-02   6.194 5.85e-10
## occupationProtective-serv                 5.085e-01  1.482e-01   3.432 0.000600
## occupationSales                           2.349e-01  9.510e-02   2.470 0.013509
## occupationTech-support                    5.606e-01  1.299e-01   4.317 1.58e-05
## occupationTransport-moving               -8.893e-02  1.144e-01  -0.777 0.437026
## occupationUnknown                                NA         NA      NA       NA
## raceAsian-Pac-Islander                    5.477e-01  3.001e-01   1.825 0.068013
## raceBlack                                 5.011e-01  2.538e-01   1.974 0.048349
## raceOther                                 3.462e-01  4.003e-01   0.865 0.387035
## raceWhite                                 5.445e-01  2.405e-01   2.264 0.023587
## sexMale                                   2.227e-01  6.165e-02   3.613 0.000303
## capital.gain                              3.250e-04  1.221e-05  26.611  < 2e-16
## capital.loss                              6.729e-04  4.328e-05  15.546  < 2e-16
## hours.per.week                            2.914e-02  1.909e-03  15.264  < 2e-16
## native.countryCanada                     -4.432e-01  7.750e-01  -0.572 0.567419
## native.countryChina                      -1.573e+00  8.000e-01  -1.966 0.049311
## native.countryColumbia                   -2.782e+00  1.097e+00  -2.536 0.011226
## native.countryCuba                       -4.973e-01  8.030e-01  -0.619 0.535762
## native.countryDominican-Republic         -1.866e+00  1.288e+00  -1.449 0.147411
## native.countryEcuador                    -1.514e+00  1.143e+00  -1.324 0.185348
## native.countryEl-Salvador                -1.156e+00  9.005e-01  -1.284 0.199179
## native.countryEngland                    -3.934e-01  8.070e-01  -0.487 0.625974
## native.countryFrance                     -4.064e-01  9.206e-01  -0.441 0.658918
## native.countryGermany                    -8.526e-01  7.824e-01  -1.090 0.275833
## native.countryGreece                     -2.330e+00  1.024e+00  -2.275 0.022877
## native.countryGuatemala                  -6.016e-01  1.057e+00  -0.569 0.569360
## native.countryHaiti                      -1.111e+00  1.041e+00  -1.067 0.285910
## native.countryHoland-Netherlands         -1.256e+01  8.827e+02  -0.014 0.988652
## native.countryHonduras                   -1.613e+00  2.248e+00  -0.717 0.473157
## native.countryHong                       -1.093e+00  1.087e+00  -1.006 0.314404
## native.countryHungary                    -3.752e-01  1.144e+00  -0.328 0.742928
## native.countryIndia                      -1.054e+00  7.659e-01  -1.376 0.168709
## native.countryIran                       -8.158e-01  8.478e-01  -0.962 0.335931
## native.countryIreland                    -7.089e-01  1.016e+00  -0.697 0.485528
## native.countryItaly                      -1.346e-01  8.214e-01  -0.164 0.869816
## native.countryJamaica                    -8.965e-01  8.790e-01  -1.020 0.307793
## native.countryJapan                      -7.223e-01  8.502e-01  -0.850 0.395598
## native.countryLaos                       -1.112e+00  1.100e+00  -1.011 0.311973
## native.countryMexico                     -1.002e+00  7.495e-01  -1.337 0.181246
## native.countryNicaragua                  -1.076e+00  1.065e+00  -1.010 0.312392
## native.countryOutlying-US(Guam-USVI-etc) -1.284e+01  2.450e+02  -0.052 0.958196
## native.countryPeru                       -1.271e+01  1.717e+02  -0.074 0.941010
## native.countryPhilippines                -3.797e-01  7.342e-01  -0.517 0.605107
## native.countryPoland                     -1.152e+00  8.701e-01  -1.324 0.185505
## native.countryPortugal                   -1.109e+00  1.016e+00  -1.092 0.274885
## native.countryPuerto-Rico                -1.632e+00  8.776e-01  -1.860 0.062859
## native.countryScotland                   -8.556e-01  1.176e+00  -0.728 0.466909
## native.countrySouth                      -1.824e+00  8.243e-01  -2.212 0.026940
## native.countryTaiwan                     -5.610e-01  8.479e-01  -0.662 0.508235
## native.countryThailand                   -8.708e-01  1.100e+00  -0.792 0.428488
## native.countryTrinadad&Tobago            -1.303e+01  2.055e+02  -0.063 0.949444
## native.countryUnited-States              -7.121e-01  7.129e-01  -0.999 0.317872
## native.countryUnknown                    -1.015e+00  7.239e-01  -1.403 0.160722
## native.countryVietnam                    -1.696e+00  9.850e-01  -1.722 0.085094
## native.countryYugoslavia                 -9.522e-01  1.054e+00  -0.904 0.366238
##                                             
## (Intercept)                              ** 
## age                                      ***
## workclassLocal-gov                       ***
## workclassNever-worked                       
## workclassPrivate                         ***
## workclassSelf-emp-inc                    *  
## workclassSelf-emp-not-inc                ***
## workclassState-gov                       ***
## workclassUnknown                         ***
## workclassWithout-pay                        
## education.num                            ***
## marital.statusMarried-AF-spouse          ***
## marital.statusMarried-civ-spouse         ***
## marital.statusMarried-spouse-absent         
## marital.statusNever-married              ***
## marital.statusSeparated                     
## marital.statusWidowed                       
## occupationArmed-Forces                      
## occupationCraft-repair                      
## occupationExec-managerial                ***
## occupationFarming-fishing                ***
## occupationHandlers-cleaners              ***
## occupationMachine-op-inspct              ** 
## occupationOther-service                  ***
## occupationPriv-house-serv                .  
## occupationProf-specialty                 ***
## occupationProtective-serv                ***
## occupationSales                          *  
## occupationTech-support                   ***
## occupationTransport-moving                  
## occupationUnknown                           
## raceAsian-Pac-Islander                   .  
## raceBlack                                *  
## raceOther                                   
## raceWhite                                *  
## sexMale                                  ***
## capital.gain                             ***
## capital.loss                             ***
## hours.per.week                           ***
## native.countryCanada                        
## native.countryChina                      *  
## native.countryColumbia                   *  
## native.countryCuba                          
## native.countryDominican-Republic            
## native.countryEcuador                       
## native.countryEl-Salvador                   
## native.countryEngland                       
## native.countryFrance                        
## native.countryGermany                       
## native.countryGreece                     *  
## native.countryGuatemala                     
## native.countryHaiti                         
## native.countryHoland-Netherlands            
## native.countryHonduras                      
## native.countryHong                          
## native.countryHungary                       
## native.countryIndia                         
## native.countryIran                          
## native.countryIreland                       
## native.countryItaly                         
## native.countryJamaica                       
## native.countryJapan                         
## native.countryLaos                          
## native.countryMexico                        
## native.countryNicaragua                     
## native.countryOutlying-US(Guam-USVI-etc)    
## native.countryPeru                          
## native.countryPhilippines                   
## native.countryPoland                        
## native.countryPortugal                      
## native.countryPuerto-Rico                .  
## native.countryScotland                      
## native.countrySouth                      *  
## native.countryTaiwan                        
## native.countryThailand                      
## native.countryTrinadad&Tobago               
## native.countryUnited-States                 
## native.countryUnknown                       
## native.countryVietnam                    .  
## native.countryYugoslavia                    
## ---
## Signif. codes:  0 '***' 0.001 '**' 0.01 '*' 0.05 '.' 0.1 ' ' 1
## 
## (Dispersion parameter for binomial family taken to be 1)
## 
##     Null deviance: 25262  on 22791  degrees of freedom
## Residual deviance: 14897  on 22713  degrees of freedom
## AIC: 15055
## 
## Number of Fisher Scoring iterations: 13

Analytical Scope(Odds Ratios from Logistic Regression)

##                                                    OR         2.5 %
## (Intercept)                              1.367406e-01  2.853895e-02
## age                                      1.025545e+00  1.021752e+00
## workclassLocal-gov                       4.668307e-01  3.611614e-01
## workclassNever-worked                    6.344126e-06            NA
## workclassPrivate                         5.866221e-01  4.738521e-01
## workclassSelf-emp-inc                    7.387369e-01  5.557221e-01
## workclassSelf-emp-not-inc                3.414259e-01  2.651751e-01
## workclassState-gov                       4.493353e-01  3.389494e-01
## workclassUnknown                         3.329884e-01  2.417195e-01
## workclassWithout-pay                     1.317214e-06            NA
## education.num                            1.308278e+00  1.281015e+00
## marital.statusMarried-AF-spouse          2.374888e+01  6.840113e+00
## marital.statusMarried-civ-spouse         7.841557e+00  6.734630e+00
## marital.statusMarried-spouse-absent      8.711213e-01  4.836839e-01
## marital.statusNever-married              5.739313e-01  4.745103e-01
## marital.statusSeparated                  9.004825e-01  6.242970e-01
## marital.statusWidowed                    8.671250e-01  6.063770e-01
## occupationArmed-Forces                   4.570181e-01  1.160958e-02
## occupationCraft-repair                   1.011989e+00  8.457428e-01
## occupationExec-managerial                2.117098e+00  1.782083e+00
## occupationFarming-fishing                3.320953e-01  2.381227e-01
## occupationHandlers-cleaners              4.618502e-01  3.309290e-01
## occupationMachine-op-inspct              7.039683e-01  5.558316e-01
## occupationOther-service                  4.073155e-01  3.090038e-01
## occupationPriv-house-serv                2.034675e-02  3.681913e-04
## occupationProf-specialty                 1.760729e+00  1.472976e+00
## occupationProtective-serv                1.662759e+00  1.242338e+00
## occupationSales                          1.264779e+00  1.050094e+00
## occupationTech-support                   1.751807e+00  1.357146e+00
## occupationTransport-moving               9.149067e-01  7.307158e-01
## occupationUnknown                                  NA            NA
## raceAsian-Pac-Islander                   1.729284e+00  9.682475e-01
## raceBlack                                1.650585e+00  1.017336e+00
## raceOther                                1.413734e+00  6.348468e-01
## raceWhite                                1.723673e+00  1.092341e+00
## sexMale                                  1.249463e+00  1.107393e+00
## capital.gain                             1.000325e+00  1.000301e+00
## capital.loss                             1.000673e+00  1.000588e+00
## hours.per.week                           1.029566e+00  1.025731e+00
## native.countryCanada                     6.420016e-01  1.447857e-01
## native.countryChina                      2.074629e-01  4.426529e-02
## native.countryColumbia                   6.189392e-02  5.986529e-03
## native.countryCuba                       6.081989e-01  1.290570e-01
## native.countryDominican-Republic         1.546794e-01  6.483276e-03
## native.countryEcuador                    2.200609e-01  1.985244e-02
## native.countryEl-Salvador                3.147131e-01  5.368457e-02
## native.countryEngland                    6.747904e-01  1.424913e-01
## native.countryFrance                     6.660633e-01  1.123244e-01
## native.countryGermany                    4.263183e-01  9.454178e-02
## native.countryGreece                     9.729443e-02  1.222538e-02
## native.countryGuatemala                  5.479543e-01  5.949593e-02
## native.countryHaiti                      3.291161e-01  3.890042e-02
## native.countryHoland-Netherlands         3.525530e-06            NA
## native.countryHonduras                   1.993603e-01  2.776203e-03
## native.countryHong                       3.351117e-01  3.758284e-02
## native.countryHungary                    6.871330e-01  6.218197e-02
## native.countryIndia                      3.484999e-01  8.006143e-02
## native.countryIran                       4.422732e-01  8.597802e-02
## native.countryIreland                    4.921918e-01  6.502372e-02
## native.countryItaly                      8.740421e-01  1.789071e-01
## native.countryJamaica                    4.080095e-01  7.273915e-02
## native.countryJapan                      4.856515e-01  9.371229e-02
## native.countryLaos                       3.288241e-01  3.173637e-02
## native.countryMexico                     3.671494e-01  8.719096e-02
## native.countryNicaragua                  3.409710e-01  3.488241e-02
## native.countryOutlying-US(Guam-USVI-etc) 2.650902e-06 1.762732e-133
## native.countryPeru                       3.026268e-06  4.825607e-97
## native.countryPhilippines                6.840964e-01  1.675847e-01
## native.countryPoland                     3.159931e-01  5.776183e-02
## native.countryPortugal                   3.298215e-01  4.056406e-02
## native.countryPuerto-Rico                1.954418e-01  3.467145e-02
## native.countryScotland                   4.250488e-01  3.609659e-02
## native.countrySouth                      1.614493e-01  3.256424e-02
## native.countryTaiwan                     5.706443e-01  1.109506e-01
## native.countryThailand                   4.186335e-01  4.597848e-02
## native.countryTrinadad&Tobago            2.196406e-06 7.004910e-115
## native.countryUnited-States              4.906257e-01  1.257936e-01
## native.countryUnknown                    3.622792e-01  9.077970e-02
## native.countryVietnam                    1.833935e-01  2.427707e-02
## native.countryYugoslavia                 3.858983e-01  4.870608e-02
##                                                 97.5 %
## (Intercept)                               5.893217e-01
## age                                       1.029360e+00
## workclassLocal-gov                        6.033814e-01
## workclassNever-worked                     7.962242e+13
## workclassPrivate                          7.268596e-01
## workclassSelf-emp-inc                     9.825676e-01
## workclassSelf-emp-not-inc                 4.395556e-01
## workclassState-gov                        5.952095e-01
## workclassUnknown                          4.574429e-01
## workclassWithout-pay                      2.325929e+04
## education.num                             1.336369e+00
## marital.statusMarried-AF-spouse           7.859075e+01
## marital.statusMarried-civ-spouse          9.160173e+00
## marital.statusMarried-spouse-absent       1.479990e+00
## marital.statusNever-married               6.943312e-01
## marital.statusSeparated                   1.272744e+00
## marital.statusWidowed                     1.219468e+00
## occupationArmed-Forces                    9.551905e+00
## occupationCraft-repair                    1.212170e+00
## occupationExec-managerial                 2.518529e+00
## occupationFarming-fishing                 4.584196e-01
## occupationHandlers-cleaners               6.359025e-01
## occupationMachine-op-inspct               8.893158e-01
## occupationOther-service                   5.325241e-01
## occupationPriv-house-serv                 3.639838e-01
## occupationProf-specialty                  2.107185e+00
## occupationProtective-serv                 2.221157e+00
## occupationSales                           1.524580e+00
## occupationTech-support                    2.258239e+00
## occupationTransport-moving                1.144444e+00
## occupationUnknown                                   NA
## raceAsian-Pac-Islander                    3.146761e+00
## raceBlack                                 2.758622e+00
## raceOther                                 3.066079e+00
## raceWhite                                 2.811759e+00
## sexMale                                   1.410146e+00
## capital.gain                              1.000349e+00
## capital.loss                              1.000758e+00
## hours.per.week                            1.033436e+00
## native.countryCanada                      3.135245e+00
## native.countryChina                       1.056712e+00
## native.countryColumbia                    4.970414e-01
## native.countryCuba                        3.113431e+00
## native.countryDominican-Republic          1.515233e+00
## native.countryEcuador                     1.950078e+00
## native.countryEl-Salvador                 1.895709e+00
## native.countryEngland                     3.487006e+00
## native.countryFrance                      4.262255e+00
## native.countryGermany                     2.106841e+00
## native.countryGreece                      7.185053e-01
## native.countryGuatemala                   4.124087e+00
## native.countryHaiti                       2.463399e+00
## native.countryHoland-Netherlands          3.247391e+72
## native.countryHonduras                    6.562503e+00
## native.countryHong                        2.794348e+00
## native.countryHungary                     6.228152e+00
## native.countryIndia                       1.675760e+00
## native.countryIran                        2.462427e+00
## native.countryIreland                     3.624906e+00
## native.countryItaly                       4.628013e+00
## native.countryJamaica                     2.369165e+00
## native.countryJapan                       2.708583e+00
## native.countryLaos                        2.667862e+00
## native.countryMexico                      1.714038e+00
## native.countryNicaragua                   2.586828e+00
## native.countryOutlying-US(Guam-USVI-etc) 2.496241e-135
## native.countryPeru                        1.115578e-93
## native.countryPhilippines                 3.111523e+00
## native.countryPoland                      1.812451e+00
## native.countryPortugal                    2.340398e+00
## native.countryPuerto-Rico                 1.124610e+00
## native.countryScotland                    4.013712e+00
## native.countrySouth                       8.547176e-01
## native.countryTaiwan                      3.176536e+00
## native.countryThailand                    3.595393e+00
## native.countryTrinadad&Tobago            2.864347e-111
## native.countryUnited-States               2.152964e+00
## native.countryUnknown                     1.619625e+00
## native.countryVietnam                     1.235619e+00
## native.countryYugoslavia                  3.150734e+00

Analytical Scope(Multinomial regression)

## Call:
## multinom(formula = income ~ ., data = train.data)
## 
## Coefficients:
##                                                 Values    Std. Err.
## (Intercept)                              -1.990476e+00 3.741062e-02
## age                                       2.522585e-02 1.805548e-03
## workclassLocal-gov                       -7.617887e-01 6.728674e-02
## workclassNever-worked                    -6.421000e+00 7.363868e-09
## workclassPrivate                         -5.333739e-01 3.751599e-02
## workclassSelf-emp-inc                    -3.028081e-01 4.267138e-02
## workclassSelf-emp-not-inc                -1.074634e+00 6.363730e-02
## workclassState-gov                       -7.999778e-01 5.761283e-02
## workclassUnknown                          2.660664e+00 5.210813e-02
## workclassWithout-pay                     -1.181635e+01 7.598040e-09
## education.num                             2.687148e-01 1.048927e-02
## marital.statusMarried-AF-spouse           3.167562e+00 3.479094e-04
## marital.statusMarried-civ-spouse          2.059470e+00 4.357508e-02
## marital.statusMarried-spouse-absent      -1.380063e-01 9.866204e-04
## marital.statusNever-married              -5.551954e-01 4.914600e-02
## marital.statusSeparated                  -1.049461e-01 5.169879e-03
## marital.statusWidowed                    -1.426210e-01 3.732953e-03
## occupationArmed-Forces                   -7.830792e-01 4.742869e-05
## occupationCraft-repair                    1.191417e-02 5.375753e-02
## occupationExec-managerial                 7.500436e-01 5.203115e-02
## occupationFarming-fishing                -1.102319e+00 1.186218e-02
## occupationHandlers-cleaners              -7.725222e-01 4.502546e-03
## occupationMachine-op-inspct              -3.510209e-01 6.087704e-02
## occupationOther-service                  -8.982939e-01 1.617389e-02
## occupationPriv-house-serv                -3.896168e+00 5.439959e-05
## occupationProf-specialty                  5.657288e-01 6.028698e-02
## occupationProtective-serv                 5.084555e-01 2.176999e-02
## occupationSales                           2.348879e-01 5.756905e-02
## occupationTech-support                    5.606398e-01 2.235963e-02
## occupationTransport-moving               -8.894320e-02 7.457912e-02
## occupationUnknown                        -3.760336e+00 5.210813e-02
## raceAsian-Pac-Islander                    5.477177e-01 3.595428e-02
## raceBlack                                 5.010875e-01 4.147754e-02
## raceOther                                 3.462153e-01 1.885757e-03
## raceWhite                                 5.444188e-01 4.111959e-02
## sexMale                                   2.227212e-01 5.848648e-02
## capital.gain                              3.249619e-04 1.215115e-05
## capital.loss                              6.728625e-04 4.317885e-05
## hours.per.week                            2.913827e-02 1.870142e-03
## native.countryCanada                     -4.423738e-01 3.889464e-03
## native.countryChina                      -1.572122e+00 3.197899e-03
## native.countryColumbia                   -2.781719e+00 3.927319e-04
## native.countryCuba                       -4.964297e-01 2.568421e-03
## native.countryDominican-Republic         -1.865777e+00 2.785644e-04
## native.countryEcuador                    -1.513036e+00 3.438398e-04
## native.countryEl-Salvador                -1.155280e+00 9.987341e-04
## native.countryEngland                    -3.925799e-01 2.238580e-03
## native.countryFrance                     -4.056664e-01 9.710779e-04
## native.countryGermany                    -8.517582e-01 2.921975e-03
## native.countryGreece                     -2.329389e+00 6.312120e-04
## native.countryGuatemala                  -6.012669e-01 5.241249e-04
## native.countryHaiti                      -1.109896e+00 5.677965e-04
## native.countryHoland-Netherlands         -9.796950e+00 5.615090e-09
## native.countryHonduras                   -1.615334e+00 8.183764e-05
## native.countryHong                       -1.092480e+00 7.092566e-04
## native.countryHungary                    -3.743229e-01 4.430977e-04
## native.countryIndia                      -1.053409e+00 4.569756e-03
## native.countryIran                       -8.149847e-01 1.425976e-03
## native.countryIreland                    -7.080493e-01 5.786095e-04
## native.countryItaly                      -1.338101e-01 2.171259e-03
## native.countryJamaica                    -8.956051e-01 1.124143e-03
## native.countryJapan                      -7.215826e-01 1.698888e-03
## native.countryLaos                       -1.111432e+00 7.638878e-04
## native.countryMexico                     -1.001256e+00 6.777171e-03
## native.countryNicaragua                  -1.075292e+00 5.709797e-04
## native.countryOutlying-US(Guam-USVI-etc) -1.332311e+01 1.058227e-09
## native.countryPeru                       -1.413142e+01 7.050063e-10
## native.countryPhilippines                -3.789230e-01 9.298607e-03
## native.countryPoland                     -1.151202e+00 1.313456e-03
## native.countryPortugal                   -1.108167e+00 6.191172e-04
## native.countryPuerto-Rico                -1.631699e+00 1.131000e-03
## native.countryScotland                   -8.546934e-01 3.517610e-04
## native.countrySouth                      -1.822858e+00 2.737159e-03
## native.countryTaiwan                     -5.601379e-01 2.237899e-03
## native.countryThailand                   -8.699278e-01 7.699713e-04
## native.countryTrinadad&Tobago            -1.395656e+01 1.433109e-09
## native.countryUnited-States              -7.112772e-01 5.225595e-02
## native.countryUnknown                    -1.014583e+00 1.729463e-02
## native.countryVietnam                    -1.695456e+00 1.071346e-03
## native.countryYugoslavia                 -9.513535e-01 5.182433e-04
## 
## Residual Deviance: 14897.15 
## AIC: 15055.15

Analytical Scope(Accuracy and Misclassification rates)

The following are the Logistic regression performance measures:

## [1] 85.86345
## [1] 14.13655

The following are the multinomial Logistic regression performance measures:

fit_mulnom_accuracy
## [1] 85.86345
fit_mulnom_misclassification
## [1] 14.13655

Conclusion

Future Scope