Analysis on votes gained by Trump and Hilary
Let’s do a Backward elimination process to find the relationship of demographic metrics on Votes gained by Trump and Hilary. Backward elimination is the process of removing the metrics which are less statisically significant to a particular target metric. The idea here is that the metrics having less p-value(significance) has high co-relation to the target metrics. Once this is done, we will look at those metrics which are having less P-value(high significance)
First, we will do it for Trump,
Target metric : Votes gained by Trump metrics Used : Since there are lot of demographic metrics in the data set, we will use some possible metrics by doing conscious judgment.
- Persons under 5 years, percent, 2014
- Persons under 18 years, percent, 2014
- Persons 65 years and over, percent, 2014
- Female persons, percent, 2014
- White alone, percent, 2014
- Black or African American alone, percent, 2014
- American Indian and Alaska Native alone, percent, 2014
- Asian alone, percent, 2014
- Native Hawaiian and Other Pacific Islander alone, percent, 2014
- Two or More Races, percent, 2014
- Hispanic or Latino, percent, 2014
- White alone, not Hispanic or Latino, percent, 2014
- Households, 2009-2013
- Per capita money income in past 12 months (2013 dollars), 2009-2013
- Retail sales per capita, 2007
trump_data <- complete_data %>% filter(`trump votes`> 0 ) %>% select("sanders fraction votes","sanders votes","clinton fraction votes","clinton votes","trump fraction votes","trump votes","cruz fraction votes","cruz votes", "Persons under 5 years, percent, 2014","Persons under 18 years, percent, 2014","Persons 65 years and over, percent, 2014","Female persons, percent, 2014","White alone, percent, 2014","Black or African American alone, percent, 2014","American Indian and Alaska Native alone, percent, 2014","Asian alone, percent, 2014","Native Hawaiian and Other Pacific Islander alone, percent, 2014","Two or More Races, percent, 2014","Hispanic or Latino, percent, 2014","White alone, not Hispanic or Latino, percent, 2014","Households, 2009-2013" , "Per capita money income in past 12 months (2013 dollars), 2009-2013" , "Retail sales per capita, 2007")
print("Trump analysis..")
## [1] "Trump analysis.."
full_model <- lm(`trump votes` ~ `Persons under 18 years, percent, 2014`+`Persons 65 years and over, percent, 2014`+`Female persons, percent, 2014`+`White alone, percent, 2014`+`Black or African American alone, percent, 2014`+`American Indian and Alaska Native alone, percent, 2014`+`Asian alone, percent, 2014`+`Native Hawaiian and Other Pacific Islander alone, percent, 2014`+`Two or More Races, percent, 2014`+ `Hispanic or Latino, percent, 2014` + `White alone, not Hispanic or Latino, percent, 2014` + `Households, 2009-2013` + `Per capita money income in past 12 months (2013 dollars), 2009-2013` + `Retail sales per capita, 2007` , data= trump_data)
summary(full_model)
##
## Call:
## lm(formula = `trump votes` ~ `Persons under 18 years, percent, 2014` +
## `Persons 65 years and over, percent, 2014` + `Female persons, percent, 2014` +
## `White alone, percent, 2014` + `Black or African American alone, percent, 2014` +
## `American Indian and Alaska Native alone, percent, 2014` +
## `Asian alone, percent, 2014` + `Native Hawaiian and Other Pacific Islander alone, percent, 2014` +
## `Two or More Races, percent, 2014` + `Hispanic or Latino, percent, 2014` +
## `White alone, not Hispanic or Latino, percent, 2014` + `Households, 2009-2013` +
## `Per capita money income in past 12 months (2013 dollars), 2009-2013` +
## `Retail sales per capita, 2007`, data = trump_data)
##
## Residuals:
## Min 1Q Median 3Q Max
## -65821 -1580 -446 637 70362
##
## Coefficients:
## Estimate
## (Intercept) -5.682e+04
## `Persons under 18 years, percent, 2014` -9.272e+00
## `Persons 65 years and over, percent, 2014` -3.741e+01
## `Female persons, percent, 2014` 6.134e+01
## `White alone, percent, 2014` 1.071e+03
## `Black or African American alone, percent, 2014` 5.048e+02
## `American Indian and Alaska Native alone, percent, 2014` 4.964e+02
## `Asian alone, percent, 2014` 3.362e+02
## `Native Hawaiian and Other Pacific Islander alone, percent, 2014` -1.291e+02
## `Two or More Races, percent, 2014` 8.235e+02
## `Hispanic or Latino, percent, 2014` -5.522e+02
## `White alone, not Hispanic or Latino, percent, 2014` -5.584e+02
## `Households, 2009-2013` 7.594e-02
## `Per capita money income in past 12 months (2013 dollars), 2009-2013` 1.923e-01
## `Retail sales per capita, 2007` 1.044e-01
## Std. Error
## (Intercept) 1.353e+05
## `Persons under 18 years, percent, 2014` 4.537e+01
## `Persons 65 years and over, percent, 2014` 3.358e+01
## `Female persons, percent, 2014` 5.133e+01
## `White alone, percent, 2014` 1.359e+03
## `Black or African American alone, percent, 2014` 1.353e+03
## `American Indian and Alaska Native alone, percent, 2014` 1.353e+03
## `Asian alone, percent, 2014` 1.354e+03
## `Native Hawaiian and Other Pacific Islander alone, percent, 2014` 1.395e+03
## `Two or More Races, percent, 2014` 1.355e+03
## `Hispanic or Latino, percent, 2014` 1.463e+02
## `White alone, not Hispanic or Latino, percent, 2014` 1.536e+02
## `Households, 2009-2013` 1.050e-03
## `Per capita money income in past 12 months (2013 dollars), 2009-2013` 2.324e-02
## `Retail sales per capita, 2007` 1.959e-02
## t value
## (Intercept) -0.420
## `Persons under 18 years, percent, 2014` -0.204
## `Persons 65 years and over, percent, 2014` -1.114
## `Female persons, percent, 2014` 1.195
## `White alone, percent, 2014` 0.788
## `Black or African American alone, percent, 2014` 0.373
## `American Indian and Alaska Native alone, percent, 2014` 0.367
## `Asian alone, percent, 2014` 0.248
## `Native Hawaiian and Other Pacific Islander alone, percent, 2014` -0.093
## `Two or More Races, percent, 2014` 0.608
## `Hispanic or Latino, percent, 2014` -3.774
## `White alone, not Hispanic or Latino, percent, 2014` -3.636
## `Households, 2009-2013` 72.315
## `Per capita money income in past 12 months (2013 dollars), 2009-2013` 8.274
## `Retail sales per capita, 2007` 5.329
## Pr(>|t|)
## (Intercept) 0.674625
## `Persons under 18 years, percent, 2014` 0.838097
## `Persons 65 years and over, percent, 2014` 0.265377
## `Female persons, percent, 2014` 0.232147
## `White alone, percent, 2014` 0.430603
## `Black or African American alone, percent, 2014` 0.709101
## `American Indian and Alaska Native alone, percent, 2014` 0.713708
## `Asian alone, percent, 2014` 0.803979
## `Native Hawaiian and Other Pacific Islander alone, percent, 2014` 0.926265
## `Two or More Races, percent, 2014` 0.543274
## `Hispanic or Latino, percent, 2014` 0.000164
## `White alone, not Hispanic or Latino, percent, 2014` 0.000282
## `Households, 2009-2013` < 2e-16
## `Per capita money income in past 12 months (2013 dollars), 2009-2013` < 2e-16
## `Retail sales per capita, 2007` 1.07e-07
##
## (Intercept)
## `Persons under 18 years, percent, 2014`
## `Persons 65 years and over, percent, 2014`
## `Female persons, percent, 2014`
## `White alone, percent, 2014`
## `Black or African American alone, percent, 2014`
## `American Indian and Alaska Native alone, percent, 2014`
## `Asian alone, percent, 2014`
## `Native Hawaiian and Other Pacific Islander alone, percent, 2014`
## `Two or More Races, percent, 2014`
## `Hispanic or Latino, percent, 2014` ***
## `White alone, not Hispanic or Latino, percent, 2014` ***
## `Households, 2009-2013` ***
## `Per capita money income in past 12 months (2013 dollars), 2009-2013` ***
## `Retail sales per capita, 2007` ***
## ---
## Signif. codes: 0 '***' 0.001 '**' 0.01 '*' 0.05 '.' 0.1 ' ' 1
##
## Residual standard error: 4992 on 2694 degrees of freedom
## Multiple R-squared: 0.7506, Adjusted R-squared: 0.7493
## F-statistic: 579.2 on 14 and 2694 DF, p-value: < 2.2e-16
step(full_model ,data= trump_data , direction = "backward" ,test = "F")
## Start: AIC=46152.09
## `trump votes` ~ `Persons under 18 years, percent, 2014` + `Persons 65 years and over, percent, 2014` +
## `Female persons, percent, 2014` + `White alone, percent, 2014` +
## `Black or African American alone, percent, 2014` + `American Indian and Alaska Native alone, percent, 2014` +
## `Asian alone, percent, 2014` + `Native Hawaiian and Other Pacific Islander alone, percent, 2014` +
## `Two or More Races, percent, 2014` + `Hispanic or Latino, percent, 2014` +
## `White alone, not Hispanic or Latino, percent, 2014` + `Households, 2009-2013` +
## `Per capita money income in past 12 months (2013 dollars), 2009-2013` +
## `Retail sales per capita, 2007`
##
## Df
## - `Native Hawaiian and Other Pacific Islander alone, percent, 2014` 1
## - `Persons under 18 years, percent, 2014` 1
## - `Asian alone, percent, 2014` 1
## - `American Indian and Alaska Native alone, percent, 2014` 1
## - `Black or African American alone, percent, 2014` 1
## - `Two or More Races, percent, 2014` 1
## - `White alone, percent, 2014` 1
## - `Persons 65 years and over, percent, 2014` 1
## - `Female persons, percent, 2014` 1
## <none>
## - `White alone, not Hispanic or Latino, percent, 2014` 1
## - `Hispanic or Latino, percent, 2014` 1
## - `Retail sales per capita, 2007` 1
## - `Per capita money income in past 12 months (2013 dollars), 2009-2013` 1
## - `Households, 2009-2013` 1
## Sum of Sq
## - `Native Hawaiian and Other Pacific Islander alone, percent, 2014` 2.1344e+05
## - `Persons under 18 years, percent, 2014` 1.0405e+06
## - `Asian alone, percent, 2014` 1.5353e+06
## - `American Indian and Alaska Native alone, percent, 2014` 3.3546e+06
## - `Black or African American alone, percent, 2014` 3.4686e+06
## - `Two or More Races, percent, 2014` 9.2092e+06
## - `White alone, percent, 2014` 1.5483e+07
## - `Persons 65 years and over, percent, 2014` 3.0922e+07
## - `Female persons, percent, 2014` 3.5589e+07
## <none>
## - `White alone, not Hispanic or Latino, percent, 2014` 3.2942e+08
## - `Hispanic or Latino, percent, 2014` 3.5496e+08
## - `Retail sales per capita, 2007` 7.0755e+08
## - `Per capita money income in past 12 months (2013 dollars), 2009-2013` 1.7057e+09
## - `Households, 2009-2013` 1.3030e+11
## RSS
## - `Native Hawaiian and Other Pacific Islander alone, percent, 2014` 6.7126e+10
## - `Persons under 18 years, percent, 2014` 6.7127e+10
## - `Asian alone, percent, 2014` 6.7128e+10
## - `American Indian and Alaska Native alone, percent, 2014` 6.7129e+10
## - `Black or African American alone, percent, 2014` 6.7129e+10
## - `Two or More Races, percent, 2014` 6.7135e+10
## - `White alone, percent, 2014` 6.7142e+10
## - `Persons 65 years and over, percent, 2014` 6.7157e+10
## - `Female persons, percent, 2014` 6.7162e+10
## <none> 6.7126e+10
## - `White alone, not Hispanic or Latino, percent, 2014` 6.7455e+10
## - `Hispanic or Latino, percent, 2014` 6.7481e+10
## - `Retail sales per capita, 2007` 6.7834e+10
## - `Per capita money income in past 12 months (2013 dollars), 2009-2013` 6.8832e+10
## - `Households, 2009-2013` 1.9743e+11
## AIC
## - `Native Hawaiian and Other Pacific Islander alone, percent, 2014` 46150
## - `Persons under 18 years, percent, 2014` 46150
## - `Asian alone, percent, 2014` 46150
## - `American Indian and Alaska Native alone, percent, 2014` 46150
## - `Black or African American alone, percent, 2014` 46150
## - `Two or More Races, percent, 2014` 46150
## - `White alone, percent, 2014` 46151
## - `Persons 65 years and over, percent, 2014` 46151
## - `Female persons, percent, 2014` 46152
## <none> 46152
## - `White alone, not Hispanic or Latino, percent, 2014` 46163
## - `Hispanic or Latino, percent, 2014` 46164
## - `Retail sales per capita, 2007` 46178
## - `Per capita money income in past 12 months (2013 dollars), 2009-2013` 46218
## - `Households, 2009-2013` 49073
## F value
## - `Native Hawaiian and Other Pacific Islander alone, percent, 2014` 0.0086
## - `Persons under 18 years, percent, 2014` 0.0418
## - `Asian alone, percent, 2014` 0.0616
## - `American Indian and Alaska Native alone, percent, 2014` 0.1346
## - `Black or African American alone, percent, 2014` 0.1392
## - `Two or More Races, percent, 2014` 0.3696
## - `White alone, percent, 2014` 0.6214
## - `Persons 65 years and over, percent, 2014` 1.2410
## - `Female persons, percent, 2014` 1.4283
## <none>
## - `White alone, not Hispanic or Latino, percent, 2014` 13.2207
## - `Hispanic or Latino, percent, 2014` 14.2459
## - `Retail sales per capita, 2007` 28.3966
## - `Per capita money income in past 12 months (2013 dollars), 2009-2013` 68.4561
## - `Households, 2009-2013` 5229.4221
## Pr(>F)
## - `Native Hawaiian and Other Pacific Islander alone, percent, 2014` 0.9262653
## - `Persons under 18 years, percent, 2014` 0.8380972
## - `Asian alone, percent, 2014` 0.8039785
## - `American Indian and Alaska Native alone, percent, 2014` 0.7137075
## - `Black or African American alone, percent, 2014` 0.7091012
## - `Two or More Races, percent, 2014` 0.5432743
## - `White alone, percent, 2014` 0.4306025
## - `Persons 65 years and over, percent, 2014` 0.2653769
## - `Female persons, percent, 2014` 0.2321470
## <none>
## - `White alone, not Hispanic or Latino, percent, 2014` 0.0002821
## - `Hispanic or Latino, percent, 2014` 0.0001639
## - `Retail sales per capita, 2007` 1.07e-07
## - `Per capita money income in past 12 months (2013 dollars), 2009-2013` < 2.2e-16
## - `Households, 2009-2013` < 2.2e-16
##
## - `Native Hawaiian and Other Pacific Islander alone, percent, 2014`
## - `Persons under 18 years, percent, 2014`
## - `Asian alone, percent, 2014`
## - `American Indian and Alaska Native alone, percent, 2014`
## - `Black or African American alone, percent, 2014`
## - `Two or More Races, percent, 2014`
## - `White alone, percent, 2014`
## - `Persons 65 years and over, percent, 2014`
## - `Female persons, percent, 2014`
## <none>
## - `White alone, not Hispanic or Latino, percent, 2014` ***
## - `Hispanic or Latino, percent, 2014` ***
## - `Retail sales per capita, 2007` ***
## - `Per capita money income in past 12 months (2013 dollars), 2009-2013` ***
## - `Households, 2009-2013` ***
## ---
## Signif. codes: 0 '***' 0.001 '**' 0.01 '*' 0.05 '.' 0.1 ' ' 1
##
## Step: AIC=46150.1
## `trump votes` ~ `Persons under 18 years, percent, 2014` + `Persons 65 years and over, percent, 2014` +
## `Female persons, percent, 2014` + `White alone, percent, 2014` +
## `Black or African American alone, percent, 2014` + `American Indian and Alaska Native alone, percent, 2014` +
## `Asian alone, percent, 2014` + `Two or More Races, percent, 2014` +
## `Hispanic or Latino, percent, 2014` + `White alone, not Hispanic or Latino, percent, 2014` +
## `Households, 2009-2013` + `Per capita money income in past 12 months (2013 dollars), 2009-2013` +
## `Retail sales per capita, 2007`
##
## Df
## - `Persons under 18 years, percent, 2014` 1
## - `Persons 65 years and over, percent, 2014` 1
## - `Female persons, percent, 2014` 1
## - `Asian alone, percent, 2014` 1
## <none>
## - `Black or African American alone, percent, 2014` 1
## - `American Indian and Alaska Native alone, percent, 2014` 1
## - `Two or More Races, percent, 2014` 1
## - `White alone, percent, 2014` 1
## - `White alone, not Hispanic or Latino, percent, 2014` 1
## - `Hispanic or Latino, percent, 2014` 1
## - `Retail sales per capita, 2007` 1
## - `Per capita money income in past 12 months (2013 dollars), 2009-2013` 1
## - `Households, 2009-2013` 1
## Sum of Sq
## - `Persons under 18 years, percent, 2014` 1.0754e+06
## - `Persons 65 years and over, percent, 2014` 3.0980e+07
## - `Female persons, percent, 2014` 3.5718e+07
## - `Asian alone, percent, 2014` 4.1625e+07
## <none>
## - `Black or African American alone, percent, 2014` 8.9653e+07
## - `American Indian and Alaska Native alone, percent, 2014` 9.0093e+07
## - `Two or More Races, percent, 2014` 1.3861e+08
## - `White alone, percent, 2014` 2.8500e+08
## - `White alone, not Hispanic or Latino, percent, 2014` 3.2944e+08
## - `Hispanic or Latino, percent, 2014` 3.5502e+08
## - `Retail sales per capita, 2007` 7.0763e+08
## - `Per capita money income in past 12 months (2013 dollars), 2009-2013` 1.7100e+09
## - `Households, 2009-2013` 1.3040e+11
## RSS
## - `Persons under 18 years, percent, 2014` 6.7127e+10
## - `Persons 65 years and over, percent, 2014` 6.7157e+10
## - `Female persons, percent, 2014` 6.7162e+10
## - `Asian alone, percent, 2014` 6.7168e+10
## <none> 6.7126e+10
## - `Black or African American alone, percent, 2014` 6.7216e+10
## - `American Indian and Alaska Native alone, percent, 2014` 6.7216e+10
## - `Two or More Races, percent, 2014` 6.7265e+10
## - `White alone, percent, 2014` 6.7411e+10
## - `White alone, not Hispanic or Latino, percent, 2014` 6.7456e+10
## - `Hispanic or Latino, percent, 2014` 6.7481e+10
## - `Retail sales per capita, 2007` 6.7834e+10
## - `Per capita money income in past 12 months (2013 dollars), 2009-2013` 6.8836e+10
## - `Households, 2009-2013` 1.9753e+11
## AIC
## - `Persons under 18 years, percent, 2014` 46148
## - `Persons 65 years and over, percent, 2014` 46149
## - `Female persons, percent, 2014` 46150
## - `Asian alone, percent, 2014` 46150
## <none> 46150
## - `Black or African American alone, percent, 2014` 46152
## - `American Indian and Alaska Native alone, percent, 2014` 46152
## - `Two or More Races, percent, 2014` 46154
## - `White alone, percent, 2014` 46160
## - `White alone, not Hispanic or Latino, percent, 2014` 46161
## - `Hispanic or Latino, percent, 2014` 46162
## - `Retail sales per capita, 2007` 46177
## - `Per capita money income in past 12 months (2013 dollars), 2009-2013` 46216
## - `Households, 2009-2013` 49072
## F value
## - `Persons under 18 years, percent, 2014` 0.0432
## - `Persons 65 years and over, percent, 2014` 1.2438
## - `Female persons, percent, 2014` 1.4340
## - `Asian alone, percent, 2014` 1.6712
## <none>
## - `Black or African American alone, percent, 2014` 3.5994
## - `American Indian and Alaska Native alone, percent, 2014` 3.6171
## - `Two or More Races, percent, 2014` 5.5648
## - `White alone, percent, 2014` 11.4424
## - `White alone, not Hispanic or Latino, percent, 2014` 13.2265
## - `Hispanic or Latino, percent, 2014` 14.2535
## - `Retail sales per capita, 2007` 28.4102
## - `Per capita money income in past 12 months (2013 dollars), 2009-2013` 68.6529
## - `Households, 2009-2013` 5235.3434
## Pr(>F)
## - `Persons under 18 years, percent, 2014` 0.8354108
## - `Persons 65 years and over, percent, 2014` 0.2648416
## - `Female persons, percent, 2014` 0.2312138
## - `Asian alone, percent, 2014` 0.1962120
## <none>
## - `Black or African American alone, percent, 2014` 0.0579071
## - `American Indian and Alaska Native alone, percent, 2014` 0.0572954
## - `Two or More Races, percent, 2014` 0.0183956
## - `White alone, percent, 2014` 0.0007281
## - `White alone, not Hispanic or Latino, percent, 2014` 0.0002812
## - `Hispanic or Latino, percent, 2014` 0.0001632
## - `Retail sales per capita, 2007` 1.063e-07
## - `Per capita money income in past 12 months (2013 dollars), 2009-2013` < 2.2e-16
## - `Households, 2009-2013` < 2.2e-16
##
## - `Persons under 18 years, percent, 2014`
## - `Persons 65 years and over, percent, 2014`
## - `Female persons, percent, 2014`
## - `Asian alone, percent, 2014`
## <none>
## - `Black or African American alone, percent, 2014` .
## - `American Indian and Alaska Native alone, percent, 2014` .
## - `Two or More Races, percent, 2014` *
## - `White alone, percent, 2014` ***
## - `White alone, not Hispanic or Latino, percent, 2014` ***
## - `Hispanic or Latino, percent, 2014` ***
## - `Retail sales per capita, 2007` ***
## - `Per capita money income in past 12 months (2013 dollars), 2009-2013` ***
## - `Households, 2009-2013` ***
## ---
## Signif. codes: 0 '***' 0.001 '**' 0.01 '*' 0.05 '.' 0.1 ' ' 1
##
## Step: AIC=46148.14
## `trump votes` ~ `Persons 65 years and over, percent, 2014` +
## `Female persons, percent, 2014` + `White alone, percent, 2014` +
## `Black or African American alone, percent, 2014` + `American Indian and Alaska Native alone, percent, 2014` +
## `Asian alone, percent, 2014` + `Two or More Races, percent, 2014` +
## `Hispanic or Latino, percent, 2014` + `White alone, not Hispanic or Latino, percent, 2014` +
## `Households, 2009-2013` + `Per capita money income in past 12 months (2013 dollars), 2009-2013` +
## `Retail sales per capita, 2007`
##
## Df
## - `Female persons, percent, 2014` 1
## - `Persons 65 years and over, percent, 2014` 1
## - `Asian alone, percent, 2014` 1
## <none>
## - `American Indian and Alaska Native alone, percent, 2014` 1
## - `Black or African American alone, percent, 2014` 1
## - `Two or More Races, percent, 2014` 1
## - `White alone, percent, 2014` 1
## - `White alone, not Hispanic or Latino, percent, 2014` 1
## - `Hispanic or Latino, percent, 2014` 1
## - `Retail sales per capita, 2007` 1
## - `Per capita money income in past 12 months (2013 dollars), 2009-2013` 1
## - `Households, 2009-2013` 1
## Sum of Sq
## - `Female persons, percent, 2014` 3.7903e+07
## - `Persons 65 years and over, percent, 2014` 4.2856e+07
## - `Asian alone, percent, 2014` 4.5993e+07
## <none>
## - `American Indian and Alaska Native alone, percent, 2014` 9.5863e+07
## - `Black or African American alone, percent, 2014` 9.6385e+07
## - `Two or More Races, percent, 2014` 1.4802e+08
## - `White alone, percent, 2014` 2.9863e+08
## - `White alone, not Hispanic or Latino, percent, 2014` 3.2921e+08
## - `Hispanic or Latino, percent, 2014` 3.5556e+08
## - `Retail sales per capita, 2007` 7.2012e+08
## - `Per capita money income in past 12 months (2013 dollars), 2009-2013` 1.7118e+09
## - `Households, 2009-2013` 1.3107e+11
## RSS
## - `Female persons, percent, 2014` 6.7165e+10
## - `Persons 65 years and over, percent, 2014` 6.7170e+10
## - `Asian alone, percent, 2014` 6.7173e+10
## <none> 6.7127e+10
## - `American Indian and Alaska Native alone, percent, 2014` 6.7223e+10
## - `Black or African American alone, percent, 2014` 6.7224e+10
## - `Two or More Races, percent, 2014` 6.7275e+10
## - `White alone, percent, 2014` 6.7426e+10
## - `White alone, not Hispanic or Latino, percent, 2014` 6.7457e+10
## - `Hispanic or Latino, percent, 2014` 6.7483e+10
## - `Retail sales per capita, 2007` 6.7847e+10
## - `Per capita money income in past 12 months (2013 dollars), 2009-2013` 6.8839e+10
## - `Households, 2009-2013` 1.9819e+11
## AIC
## - `Female persons, percent, 2014` 46148
## - `Persons 65 years and over, percent, 2014` 46148
## - `Asian alone, percent, 2014` 46148
## <none> 46148
## - `American Indian and Alaska Native alone, percent, 2014` 46150
## - `Black or African American alone, percent, 2014` 46150
## - `Two or More Races, percent, 2014` 46152
## - `White alone, percent, 2014` 46158
## - `White alone, not Hispanic or Latino, percent, 2014` 46159
## - `Hispanic or Latino, percent, 2014` 46160
## - `Retail sales per capita, 2007` 46175
## - `Per capita money income in past 12 months (2013 dollars), 2009-2013` 46214
## - `Households, 2009-2013` 49079
## F value
## - `Female persons, percent, 2014` 1.5223
## - `Persons 65 years and over, percent, 2014` 1.7212
## - `Asian alone, percent, 2014` 1.8472
## <none>
## - `American Indian and Alaska Native alone, percent, 2014` 3.8501
## - `Black or African American alone, percent, 2014` 3.8711
## - `Two or More Races, percent, 2014` 5.9450
## - `White alone, percent, 2014` 11.9939
## - `White alone, not Hispanic or Latino, percent, 2014` 13.2218
## - `Hispanic or Latino, percent, 2014` 14.2801
## - `Retail sales per capita, 2007` 28.9219
## - `Per capita money income in past 12 months (2013 dollars), 2009-2013` 68.7516
## - `Households, 2009-2013` 5263.8982
## Pr(>F)
## - `Female persons, percent, 2014` 0.2173808
## - `Persons 65 years and over, percent, 2014` 0.1896517
## - `Asian alone, percent, 2014` 0.1742260
## <none>
## - `American Indian and Alaska Native alone, percent, 2014` 0.0498464
## - `Black or African American alone, percent, 2014` 0.0492279
## - `Two or More Races, percent, 2014` 0.0148232
## - `White alone, percent, 2014` 0.0005421
## - `White alone, not Hispanic or Latino, percent, 2014` 0.0002819
## - `Hispanic or Latino, percent, 2014` 0.0001609
## - `Retail sales per capita, 2007` 8.182e-08
## - `Per capita money income in past 12 months (2013 dollars), 2009-2013` < 2.2e-16
## - `Households, 2009-2013` < 2.2e-16
##
## - `Female persons, percent, 2014`
## - `Persons 65 years and over, percent, 2014`
## - `Asian alone, percent, 2014`
## <none>
## - `American Indian and Alaska Native alone, percent, 2014` *
## - `Black or African American alone, percent, 2014` *
## - `Two or More Races, percent, 2014` *
## - `White alone, percent, 2014` ***
## - `White alone, not Hispanic or Latino, percent, 2014` ***
## - `Hispanic or Latino, percent, 2014` ***
## - `Retail sales per capita, 2007` ***
## - `Per capita money income in past 12 months (2013 dollars), 2009-2013` ***
## - `Households, 2009-2013` ***
## ---
## Signif. codes: 0 '***' 0.001 '**' 0.01 '*' 0.05 '.' 0.1 ' ' 1
##
## Step: AIC=46147.67
## `trump votes` ~ `Persons 65 years and over, percent, 2014` +
## `White alone, percent, 2014` + `Black or African American alone, percent, 2014` +
## `American Indian and Alaska Native alone, percent, 2014` +
## `Asian alone, percent, 2014` + `Two or More Races, percent, 2014` +
## `Hispanic or Latino, percent, 2014` + `White alone, not Hispanic or Latino, percent, 2014` +
## `Households, 2009-2013` + `Per capita money income in past 12 months (2013 dollars), 2009-2013` +
## `Retail sales per capita, 2007`
##
## Df
## - `Persons 65 years and over, percent, 2014` 1
## - `Asian alone, percent, 2014` 1
## <none>
## - `American Indian and Alaska Native alone, percent, 2014` 1
## - `Black or African American alone, percent, 2014` 1
## - `Two or More Races, percent, 2014` 1
## - `White alone, percent, 2014` 1
## - `White alone, not Hispanic or Latino, percent, 2014` 1
## - `Hispanic or Latino, percent, 2014` 1
## - `Retail sales per capita, 2007` 1
## - `Per capita money income in past 12 months (2013 dollars), 2009-2013` 1
## - `Households, 2009-2013` 1
## Sum of Sq
## - `Persons 65 years and over, percent, 2014` 3.4398e+07
## - `Asian alone, percent, 2014` 4.5628e+07
## <none>
## - `American Indian and Alaska Native alone, percent, 2014` 9.6192e+07
## - `Black or African American alone, percent, 2014` 9.6775e+07
## - `Two or More Races, percent, 2014` 1.4852e+08
## - `White alone, percent, 2014` 3.0215e+08
## - `White alone, not Hispanic or Latino, percent, 2014` 3.3814e+08
## - `Hispanic or Latino, percent, 2014` 3.6656e+08
## - `Retail sales per capita, 2007` 8.1231e+08
## - `Per capita money income in past 12 months (2013 dollars), 2009-2013` 1.8054e+09
## - `Households, 2009-2013` 1.3268e+11
## RSS
## - `Persons 65 years and over, percent, 2014` 6.7200e+10
## - `Asian alone, percent, 2014` 6.7211e+10
## <none> 6.7165e+10
## - `American Indian and Alaska Native alone, percent, 2014` 6.7261e+10
## - `Black or African American alone, percent, 2014` 6.7262e+10
## - `Two or More Races, percent, 2014` 6.7314e+10
## - `White alone, percent, 2014` 6.7467e+10
## - `White alone, not Hispanic or Latino, percent, 2014` 6.7503e+10
## - `Hispanic or Latino, percent, 2014` 6.7532e+10
## - `Retail sales per capita, 2007` 6.7978e+10
## - `Per capita money income in past 12 months (2013 dollars), 2009-2013` 6.8971e+10
## - `Households, 2009-2013` 1.9984e+11
## AIC
## - `Persons 65 years and over, percent, 2014` 46147
## - `Asian alone, percent, 2014` 46148
## <none> 46148
## - `American Indian and Alaska Native alone, percent, 2014` 46150
## - `Black or African American alone, percent, 2014` 46150
## - `Two or More Races, percent, 2014` 46152
## - `White alone, percent, 2014` 46158
## - `White alone, not Hispanic or Latino, percent, 2014` 46159
## - `Hispanic or Latino, percent, 2014` 46160
## - `Retail sales per capita, 2007` 46178
## - `Per capita money income in past 12 months (2013 dollars), 2009-2013` 46218
## - `Households, 2009-2013` 49100
## F value
## - `Persons 65 years and over, percent, 2014` 1.3812
## - `Asian alone, percent, 2014` 1.8322
## <none>
## - `American Indian and Alaska Native alone, percent, 2014` 3.8626
## - `Black or African American alone, percent, 2014` 3.8860
## - `Two or More Races, percent, 2014` 5.9636
## - `White alone, percent, 2014` 12.1329
## - `White alone, not Hispanic or Latino, percent, 2014` 13.5781
## - `Hispanic or Latino, percent, 2014` 14.7192
## - `Retail sales per capita, 2007` 32.6180
## - `Per capita money income in past 12 months (2013 dollars), 2009-2013` 72.4963
## - `Households, 2009-2013` 5327.7099
## Pr(>F)
## - `Persons 65 years and over, percent, 2014` 0.2399922
## - `Asian alone, percent, 2014` 0.1759858
## <none>
## - `American Indian and Alaska Native alone, percent, 2014` 0.0494774
## - `Black or African American alone, percent, 2014` 0.0487928
## - `Two or More Races, percent, 2014` 0.0146680
## - `White alone, percent, 2014` 0.0005033
## - `White alone, not Hispanic or Latino, percent, 2014` 0.0002333
## - `Hispanic or Latino, percent, 2014` 0.0001276
## - `Retail sales per capita, 2007` 1.244e-08
## - `Per capita money income in past 12 months (2013 dollars), 2009-2013` < 2.2e-16
## - `Households, 2009-2013` < 2.2e-16
##
## - `Persons 65 years and over, percent, 2014`
## - `Asian alone, percent, 2014`
## <none>
## - `American Indian and Alaska Native alone, percent, 2014` *
## - `Black or African American alone, percent, 2014` *
## - `Two or More Races, percent, 2014` *
## - `White alone, percent, 2014` ***
## - `White alone, not Hispanic or Latino, percent, 2014` ***
## - `Hispanic or Latino, percent, 2014` ***
## - `Retail sales per capita, 2007` ***
## - `Per capita money income in past 12 months (2013 dollars), 2009-2013` ***
## - `Households, 2009-2013` ***
## ---
## Signif. codes: 0 '***' 0.001 '**' 0.01 '*' 0.05 '.' 0.1 ' ' 1
##
## Step: AIC=46147.06
## `trump votes` ~ `White alone, percent, 2014` + `Black or African American alone, percent, 2014` +
## `American Indian and Alaska Native alone, percent, 2014` +
## `Asian alone, percent, 2014` + `Two or More Races, percent, 2014` +
## `Hispanic or Latino, percent, 2014` + `White alone, not Hispanic or Latino, percent, 2014` +
## `Households, 2009-2013` + `Per capita money income in past 12 months (2013 dollars), 2009-2013` +
## `Retail sales per capita, 2007`
##
## Df
## <none>
## - `Asian alone, percent, 2014` 1
## - `American Indian and Alaska Native alone, percent, 2014` 1
## - `Black or African American alone, percent, 2014` 1
## - `Two or More Races, percent, 2014` 1
## - `White alone, percent, 2014` 1
## - `White alone, not Hispanic or Latino, percent, 2014` 1
## - `Hispanic or Latino, percent, 2014` 1
## - `Retail sales per capita, 2007` 1
## - `Per capita money income in past 12 months (2013 dollars), 2009-2013` 1
## - `Households, 2009-2013` 1
## Sum of Sq
## <none>
## - `Asian alone, percent, 2014` 5.1833e+07
## - `American Indian and Alaska Native alone, percent, 2014` 1.0263e+08
## - `Black or African American alone, percent, 2014` 1.0295e+08
## - `Two or More Races, percent, 2014` 1.5391e+08
## - `White alone, percent, 2014` 3.1164e+08
## - `White alone, not Hispanic or Latino, percent, 2014` 3.3874e+08
## - `Hispanic or Latino, percent, 2014` 3.6493e+08
## - `Retail sales per capita, 2007` 8.6681e+08
## - `Per capita money income in past 12 months (2013 dollars), 2009-2013` 1.7865e+09
## - `Households, 2009-2013` 1.3303e+11
## RSS
## <none> 6.7200e+10
## - `Asian alone, percent, 2014` 6.7251e+10
## - `American Indian and Alaska Native alone, percent, 2014` 6.7302e+10
## - `Black or African American alone, percent, 2014` 6.7303e+10
## - `Two or More Races, percent, 2014` 6.7354e+10
## - `White alone, percent, 2014` 6.7511e+10
## - `White alone, not Hispanic or Latino, percent, 2014` 6.7538e+10
## - `Hispanic or Latino, percent, 2014` 6.7565e+10
## - `Retail sales per capita, 2007` 6.8066e+10
## - `Per capita money income in past 12 months (2013 dollars), 2009-2013` 6.8986e+10
## - `Households, 2009-2013` 2.0023e+11
## AIC
## <none> 46147
## - `Asian alone, percent, 2014` 46147
## - `American Indian and Alaska Native alone, percent, 2014` 46149
## - `Black or African American alone, percent, 2014` 46149
## - `Two or More Races, percent, 2014` 46151
## - `White alone, percent, 2014` 46158
## - `White alone, not Hispanic or Latino, percent, 2014` 46159
## - `Hispanic or Latino, percent, 2014` 46160
## - `Retail sales per capita, 2007` 46180
## - `Per capita money income in past 12 months (2013 dollars), 2009-2013` 46216
## - `Households, 2009-2013` 49103
## F value
## <none>
## - `Asian alone, percent, 2014` 2.0810
## - `American Indian and Alaska Native alone, percent, 2014` 4.1203
## - `Black or African American alone, percent, 2014` 4.1332
## - `Two or More Races, percent, 2014` 6.1792
## - `White alone, percent, 2014` 12.5119
## - `White alone, not Hispanic or Latino, percent, 2014` 13.6002
## - `Hispanic or Latino, percent, 2014` 14.6517
## - `Retail sales per capita, 2007` 34.8016
## - `Per capita money income in past 12 months (2013 dollars), 2009-2013` 71.7245
## - `Households, 2009-2013` 5340.9454
## Pr(>F)
## <none>
## - `Asian alone, percent, 2014` 0.1492547
## - `American Indian and Alaska Native alone, percent, 2014` 0.0424690
## - `Black or African American alone, percent, 2014` 0.0421483
## - `Two or More Races, percent, 2014` 0.0129865
## - `White alone, percent, 2014` 0.0004112
## - `White alone, not Hispanic or Latino, percent, 2014` 0.0002306
## - `Hispanic or Latino, percent, 2014` 0.0001323
## - `Retail sales per capita, 2007` 4.106e-09
## - `Per capita money income in past 12 months (2013 dollars), 2009-2013` < 2.2e-16
## - `Households, 2009-2013` < 2.2e-16
##
## <none>
## - `Asian alone, percent, 2014`
## - `American Indian and Alaska Native alone, percent, 2014` *
## - `Black or African American alone, percent, 2014` *
## - `Two or More Races, percent, 2014` *
## - `White alone, percent, 2014` ***
## - `White alone, not Hispanic or Latino, percent, 2014` ***
## - `Hispanic or Latino, percent, 2014` ***
## - `Retail sales per capita, 2007` ***
## - `Per capita money income in past 12 months (2013 dollars), 2009-2013` ***
## - `Households, 2009-2013` ***
## ---
## Signif. codes: 0 '***' 0.001 '**' 0.01 '*' 0.05 '.' 0.1 ' ' 1
##
## Call:
## lm(formula = `trump votes` ~ `White alone, percent, 2014` + `Black or African American alone, percent, 2014` +
## `American Indian and Alaska Native alone, percent, 2014` +
## `Asian alone, percent, 2014` + `Two or More Races, percent, 2014` +
## `Hispanic or Latino, percent, 2014` + `White alone, not Hispanic or Latino, percent, 2014` +
## `Households, 2009-2013` + `Per capita money income in past 12 months (2013 dollars), 2009-2013` +
## `Retail sales per capita, 2007`, data = trump_data)
##
## Coefficients:
## (Intercept)
## -6.988e+04
## `White alone, percent, 2014`
## 1.229e+03
## `Black or African American alone, percent, 2014`
## 6.592e+02
## `American Indian and Alaska Native alone, percent, 2014`
## 6.498e+02
## `Asian alone, percent, 2014`
## 4.991e+02
## `Two or More Races, percent, 2014`
## 9.766e+02
## `Hispanic or Latino, percent, 2014`
## -5.593e+02
## `White alone, not Hispanic or Latino, percent, 2014`
## -5.658e+02
## `Households, 2009-2013`
## 7.613e-02
## `Per capita money income in past 12 months (2013 dollars), 2009-2013`
## 1.948e-01
## `Retail sales per capita, 2007`
## 1.121e-01
Inference from backward elimination process[Trump]
We see from the above results, the votes gain for Trump has some high co-relation to below metrics.
White alone, percent, 2014 12.5119 0.0004112 ***
White alone, not Hispanic or Latino, percent, 2014 13.6002 0.0002306 ***
Hispanic or Latino, percent, 2014 14.6517 0.0001323 ***
Retail sales per capita, 2007 34.8016 4.106e-09 ***
Per capita money income in past 12 months (2013 dollars), 2009-2013 71.7245 < 2.2e-16 ***
Households, 2009-2013 5340.9454 < 2.2e-16 ***
clinton_data <- complete_data %>% filter(`clinton votes`> 0 ) %>% select("sanders fraction votes","sanders votes","clinton fraction votes","clinton votes","trump fraction votes","trump votes","cruz fraction votes","cruz votes", "Persons under 5 years, percent, 2014","Persons under 18 years, percent, 2014","Persons 65 years and over, percent, 2014","Female persons, percent, 2014","White alone, percent, 2014","Black or African American alone, percent, 2014","American Indian and Alaska Native alone, percent, 2014","Asian alone, percent, 2014","Native Hawaiian and Other Pacific Islander alone, percent, 2014","Two or More Races, percent, 2014","Hispanic or Latino, percent, 2014","White alone, not Hispanic or Latino, percent, 2014","Households, 2009-2013" , "Per capita money income in past 12 months (2013 dollars), 2009-2013" , "Retail sales per capita, 2007")
print("Clinton analysis..")
## [1] "Clinton analysis.."
full_model <- lm(`clinton votes` ~ `Persons under 18 years, percent, 2014`+`Persons 65 years and over, percent, 2014`+`Female persons, percent, 2014`+`White alone, percent, 2014`+`Black or African American alone, percent, 2014`+`American Indian and Alaska Native alone, percent, 2014`+`Asian alone, percent, 2014`+`Native Hawaiian and Other Pacific Islander alone, percent, 2014`+`Two or More Races, percent, 2014`+ `Hispanic or Latino, percent, 2014` + `White alone, not Hispanic or Latino, percent, 2014` + `Households, 2009-2013` + `Per capita money income in past 12 months (2013 dollars), 2009-2013` + `Retail sales per capita, 2007` , data= trump_data)
summary(full_model)
##
## Call:
## lm(formula = `clinton votes` ~ `Persons under 18 years, percent, 2014` +
## `Persons 65 years and over, percent, 2014` + `Female persons, percent, 2014` +
## `White alone, percent, 2014` + `Black or African American alone, percent, 2014` +
## `American Indian and Alaska Native alone, percent, 2014` +
## `Asian alone, percent, 2014` + `Native Hawaiian and Other Pacific Islander alone, percent, 2014` +
## `Two or More Races, percent, 2014` + `Hispanic or Latino, percent, 2014` +
## `White alone, not Hispanic or Latino, percent, 2014` + `Households, 2009-2013` +
## `Per capita money income in past 12 months (2013 dollars), 2009-2013` +
## `Retail sales per capita, 2007`, data = trump_data)
##
## Residuals:
## Min 1Q Median 3Q Max
## -122141 -1131 226 1223 116968
##
## Coefficients:
## Estimate
## (Intercept) -1.835e+05
## `Persons under 18 years, percent, 2014` -1.965e+02
## `Persons 65 years and over, percent, 2014` 2.608e+01
## `Female persons, percent, 2014` 1.574e+02
## `White alone, percent, 2014` 9.920e+02
## `Black or African American alone, percent, 2014` 1.846e+03
## `American Indian and Alaska Native alone, percent, 2014` 1.818e+03
## `Asian alone, percent, 2014` 1.910e+03
## `Native Hawaiian and Other Pacific Islander alone, percent, 2014` -2.834e+02
## `Two or More Races, percent, 2014` 1.371e+03
## `Hispanic or Latino, percent, 2014` 7.517e+02
## `White alone, not Hispanic or Latino, percent, 2014` 7.685e+02
## `Households, 2009-2013` 1.555e-01
## `Per capita money income in past 12 months (2013 dollars), 2009-2013` 1.281e-01
## `Retail sales per capita, 2007` -8.968e-02
## Std. Error
## (Intercept) 1.828e+05
## `Persons under 18 years, percent, 2014` 6.130e+01
## `Persons 65 years and over, percent, 2014` 4.537e+01
## `Female persons, percent, 2014` 6.935e+01
## `White alone, percent, 2014` 1.836e+03
## `Black or African American alone, percent, 2014` 1.828e+03
## `American Indian and Alaska Native alone, percent, 2014` 1.828e+03
## `Asian alone, percent, 2014` 1.830e+03
## `Native Hawaiian and Other Pacific Islander alone, percent, 2014` 1.885e+03
## `Two or More Races, percent, 2014` 1.830e+03
## `Hispanic or Latino, percent, 2014` 1.977e+02
## `White alone, not Hispanic or Latino, percent, 2014` 2.075e+02
## `Households, 2009-2013` 1.419e-03
## `Per capita money income in past 12 months (2013 dollars), 2009-2013` 3.140e-02
## `Retail sales per capita, 2007` 2.646e-02
## t value
## (Intercept) -1.004
## `Persons under 18 years, percent, 2014` -3.206
## `Persons 65 years and over, percent, 2014` 0.575
## `Female persons, percent, 2014` 2.270
## `White alone, percent, 2014` 0.540
## `Black or African American alone, percent, 2014` 1.010
## `American Indian and Alaska Native alone, percent, 2014` 0.995
## `Asian alone, percent, 2014` 1.044
## `Native Hawaiian and Other Pacific Islander alone, percent, 2014` -0.150
## `Two or More Races, percent, 2014` 0.749
## `Hispanic or Latino, percent, 2014` 3.803
## `White alone, not Hispanic or Latino, percent, 2014` 3.704
## `Households, 2009-2013` 109.572
## `Per capita money income in past 12 months (2013 dollars), 2009-2013` 4.079
## `Retail sales per capita, 2007` -3.389
## Pr(>|t|)
## (Intercept) 0.315623
## `Persons under 18 years, percent, 2014` 0.001363
## `Persons 65 years and over, percent, 2014` 0.565423
## `Female persons, percent, 2014` 0.023271
## `White alone, percent, 2014` 0.589038
## `Black or African American alone, percent, 2014` 0.312537
## `American Indian and Alaska Native alone, percent, 2014` 0.319869
## `Asian alone, percent, 2014` 0.296606
## `Native Hawaiian and Other Pacific Islander alone, percent, 2014` 0.880499
## `Two or More Races, percent, 2014` 0.453887
## `Hispanic or Latino, percent, 2014` 0.000146
## `White alone, not Hispanic or Latino, percent, 2014` 0.000217
## `Households, 2009-2013` < 2e-16
## `Per capita money income in past 12 months (2013 dollars), 2009-2013` 4.65e-05
## `Retail sales per capita, 2007` 0.000712
##
## (Intercept)
## `Persons under 18 years, percent, 2014` **
## `Persons 65 years and over, percent, 2014`
## `Female persons, percent, 2014` *
## `White alone, percent, 2014`
## `Black or African American alone, percent, 2014`
## `American Indian and Alaska Native alone, percent, 2014`
## `Asian alone, percent, 2014`
## `Native Hawaiian and Other Pacific Islander alone, percent, 2014`
## `Two or More Races, percent, 2014`
## `Hispanic or Latino, percent, 2014` ***
## `White alone, not Hispanic or Latino, percent, 2014` ***
## `Households, 2009-2013` ***
## `Per capita money income in past 12 months (2013 dollars), 2009-2013` ***
## `Retail sales per capita, 2007` ***
## ---
## Signif. codes: 0 '***' 0.001 '**' 0.01 '*' 0.05 '.' 0.1 ' ' 1
##
## Residual standard error: 6744 on 2694 degrees of freedom
## Multiple R-squared: 0.8751, Adjusted R-squared: 0.8745
## F-statistic: 1348 on 14 and 2694 DF, p-value: < 2.2e-16
step(full_model ,data= clinton_data , direction = "backward" ,test = "F")
## Start: AIC=47782.23
## `clinton votes` ~ `Persons under 18 years, percent, 2014` + `Persons 65 years and over, percent, 2014` +
## `Female persons, percent, 2014` + `White alone, percent, 2014` +
## `Black or African American alone, percent, 2014` + `American Indian and Alaska Native alone, percent, 2014` +
## `Asian alone, percent, 2014` + `Native Hawaiian and Other Pacific Islander alone, percent, 2014` +
## `Two or More Races, percent, 2014` + `Hispanic or Latino, percent, 2014` +
## `White alone, not Hispanic or Latino, percent, 2014` + `Households, 2009-2013` +
## `Per capita money income in past 12 months (2013 dollars), 2009-2013` +
## `Retail sales per capita, 2007`
##
## Df
## - `Native Hawaiian and Other Pacific Islander alone, percent, 2014` 1
## - `White alone, percent, 2014` 1
## - `Persons 65 years and over, percent, 2014` 1
## - `Two or More Races, percent, 2014` 1
## - `American Indian and Alaska Native alone, percent, 2014` 1
## - `Black or African American alone, percent, 2014` 1
## - `Asian alone, percent, 2014` 1
## <none>
## - `Female persons, percent, 2014` 1
## - `Persons under 18 years, percent, 2014` 1
## - `Retail sales per capita, 2007` 1
## - `White alone, not Hispanic or Latino, percent, 2014` 1
## - `Hispanic or Latino, percent, 2014` 1
## - `Per capita money income in past 12 months (2013 dollars), 2009-2013` 1
## - `Households, 2009-2013` 1
## Sum of Sq
## - `Native Hawaiian and Other Pacific Islander alone, percent, 2014` 1.0281e+06
## - `White alone, percent, 2014` 1.3277e+07
## - `Persons 65 years and over, percent, 2014` 1.5031e+07
## - `Two or More Races, percent, 2014` 2.5519e+07
## - `American Indian and Alaska Native alone, percent, 2014` 4.5019e+07
## - `Black or African American alone, percent, 2014` 4.6404e+07
## - `Asian alone, percent, 2014` 4.9566e+07
## <none>
## - `Female persons, percent, 2014` 2.3441e+08
## - `Persons under 18 years, percent, 2014` 4.6742e+08
## - `Retail sales per capita, 2007` 5.2236e+08
## - `White alone, not Hispanic or Latino, percent, 2014` 6.2388e+08
## - `Hispanic or Latino, percent, 2014` 6.5773e+08
## - `Per capita money income in past 12 months (2013 dollars), 2009-2013` 7.5673e+08
## - `Households, 2009-2013` 5.4605e+11
## RSS
## - `Native Hawaiian and Other Pacific Islander alone, percent, 2014` 1.2253e+11
## - `White alone, percent, 2014` 1.2254e+11
## - `Persons 65 years and over, percent, 2014` 1.2254e+11
## - `Two or More Races, percent, 2014` 1.2255e+11
## - `American Indian and Alaska Native alone, percent, 2014` 1.2257e+11
## - `Black or African American alone, percent, 2014` 1.2257e+11
## - `Asian alone, percent, 2014` 1.2258e+11
## <none> 1.2253e+11
## - `Female persons, percent, 2014` 1.2276e+11
## - `Persons under 18 years, percent, 2014` 1.2299e+11
## - `Retail sales per capita, 2007` 1.2305e+11
## - `White alone, not Hispanic or Latino, percent, 2014` 1.2315e+11
## - `Hispanic or Latino, percent, 2014` 1.2318e+11
## - `Per capita money income in past 12 months (2013 dollars), 2009-2013` 1.2328e+11
## - `Households, 2009-2013` 6.6858e+11
## AIC
## - `Native Hawaiian and Other Pacific Islander alone, percent, 2014` 47780
## - `White alone, percent, 2014` 47781
## - `Persons 65 years and over, percent, 2014` 47781
## - `Two or More Races, percent, 2014` 47781
## - `American Indian and Alaska Native alone, percent, 2014` 47781
## - `Black or African American alone, percent, 2014` 47781
## - `Asian alone, percent, 2014` 47781
## <none> 47782
## - `Female persons, percent, 2014` 47785
## - `Persons under 18 years, percent, 2014` 47791
## - `Retail sales per capita, 2007` 47792
## - `White alone, not Hispanic or Latino, percent, 2014` 47794
## - `Hispanic or Latino, percent, 2014` 47795
## - `Per capita money income in past 12 months (2013 dollars), 2009-2013` 47797
## - `Households, 2009-2013` 52377
## F value
## - `Native Hawaiian and Other Pacific Islander alone, percent, 2014` 0.0226
## - `White alone, percent, 2014` 0.2919
## - `Persons 65 years and over, percent, 2014` 0.3305
## - `Two or More Races, percent, 2014` 0.5611
## - `American Indian and Alaska Native alone, percent, 2014` 0.9898
## - `Black or African American alone, percent, 2014` 1.0203
## - `Asian alone, percent, 2014` 1.0898
## <none>
## - `Female persons, percent, 2014` 5.1540
## - `Persons under 18 years, percent, 2014` 10.2773
## - `Retail sales per capita, 2007` 11.4853
## - `White alone, not Hispanic or Latino, percent, 2014` 13.7174
## - `Hispanic or Latino, percent, 2014` 14.4617
## - `Per capita money income in past 12 months (2013 dollars), 2009-2013` 16.6384
## - `Households, 2009-2013` 12006.1001
## Pr(>F)
## - `Native Hawaiian and Other Pacific Islander alone, percent, 2014` 0.8804987
## - `White alone, percent, 2014` 0.5890381
## - `Persons 65 years and over, percent, 2014` 0.5654232
## - `Two or More Races, percent, 2014` 0.4538869
## - `American Indian and Alaska Native alone, percent, 2014` 0.3198689
## - `Black or African American alone, percent, 2014` 0.3125374
## - `Asian alone, percent, 2014` 0.2966056
## <none>
## - `Female persons, percent, 2014` 0.0232711
## - `Persons under 18 years, percent, 2014` 0.0013625
## - `Retail sales per capita, 2007` 0.0007116
## - `White alone, not Hispanic or Latino, percent, 2014` 0.0002167
## - `Hispanic or Latino, percent, 2014` 0.0001462
## - `Per capita money income in past 12 months (2013 dollars), 2009-2013` 4.654e-05
## - `Households, 2009-2013` < 2.2e-16
##
## - `Native Hawaiian and Other Pacific Islander alone, percent, 2014`
## - `White alone, percent, 2014`
## - `Persons 65 years and over, percent, 2014`
## - `Two or More Races, percent, 2014`
## - `American Indian and Alaska Native alone, percent, 2014`
## - `Black or African American alone, percent, 2014`
## - `Asian alone, percent, 2014`
## <none>
## - `Female persons, percent, 2014` *
## - `Persons under 18 years, percent, 2014` **
## - `Retail sales per capita, 2007` ***
## - `White alone, not Hispanic or Latino, percent, 2014` ***
## - `Hispanic or Latino, percent, 2014` ***
## - `Per capita money income in past 12 months (2013 dollars), 2009-2013` ***
## - `Households, 2009-2013` ***
## ---
## Signif. codes: 0 '***' 0.001 '**' 0.01 '*' 0.05 '.' 0.1 ' ' 1
##
## Step: AIC=47780.25
## `clinton votes` ~ `Persons under 18 years, percent, 2014` + `Persons 65 years and over, percent, 2014` +
## `Female persons, percent, 2014` + `White alone, percent, 2014` +
## `Black or African American alone, percent, 2014` + `American Indian and Alaska Native alone, percent, 2014` +
## `Asian alone, percent, 2014` + `Two or More Races, percent, 2014` +
## `Hispanic or Latino, percent, 2014` + `White alone, not Hispanic or Latino, percent, 2014` +
## `Households, 2009-2013` + `Per capita money income in past 12 months (2013 dollars), 2009-2013` +
## `Retail sales per capita, 2007`
##
## Df
## - `Persons 65 years and over, percent, 2014` 1
## <none>
## - `Female persons, percent, 2014` 1
## - `White alone, percent, 2014` 1
## - `Two or More Races, percent, 2014` 1
## - `Persons under 18 years, percent, 2014` 1
## - `Retail sales per capita, 2007` 1
## - `White alone, not Hispanic or Latino, percent, 2014` 1
## - `Hispanic or Latino, percent, 2014` 1
## - `Per capita money income in past 12 months (2013 dollars), 2009-2013` 1
## - `Asian alone, percent, 2014` 1
## - `Black or African American alone, percent, 2014` 1
## - `American Indian and Alaska Native alone, percent, 2014` 1
## - `Households, 2009-2013` 1
## Sum of Sq
## - `Persons 65 years and over, percent, 2014` 1.4949e+07
## <none>
## - `Female persons, percent, 2014` 2.3515e+08
## - `White alone, percent, 2014` 3.1735e+08
## - `Two or More Races, percent, 2014` 4.1577e+08
## - `Persons under 18 years, percent, 2014` 4.6956e+08
## - `Retail sales per capita, 2007` 5.2223e+08
## - `White alone, not Hispanic or Latino, percent, 2014` 6.2381e+08
## - `Hispanic or Latino, percent, 2014` 6.5757e+08
## - `Per capita money income in past 12 months (2013 dollars), 2009-2013` 7.6019e+08
## - `Asian alone, percent, 2014` 9.4274e+08
## - `Black or African American alone, percent, 2014` 1.0206e+09
## - `American Indian and Alaska Native alone, percent, 2014` 1.0259e+09
## - `Households, 2009-2013` 5.4647e+11
## RSS
## - `Persons 65 years and over, percent, 2014` 1.2254e+11
## <none> 1.2253e+11
## - `Female persons, percent, 2014` 1.2276e+11
## - `White alone, percent, 2014` 1.2284e+11
## - `Two or More Races, percent, 2014` 1.2294e+11
## - `Persons under 18 years, percent, 2014` 1.2300e+11
## - `Retail sales per capita, 2007` 1.2305e+11
## - `White alone, not Hispanic or Latino, percent, 2014` 1.2315e+11
## - `Hispanic or Latino, percent, 2014` 1.2318e+11
## - `Per capita money income in past 12 months (2013 dollars), 2009-2013` 1.2329e+11
## - `Asian alone, percent, 2014` 1.2347e+11
## - `Black or African American alone, percent, 2014` 1.2355e+11
## - `American Indian and Alaska Native alone, percent, 2014` 1.2355e+11
## - `Households, 2009-2013` 6.6900e+11
## AIC
## - `Persons 65 years and over, percent, 2014` 47779
## <none> 47780
## - `Female persons, percent, 2014` 47783
## - `White alone, percent, 2014` 47785
## - `Two or More Races, percent, 2014` 47787
## - `Persons under 18 years, percent, 2014` 47789
## - `Retail sales per capita, 2007` 47790
## - `White alone, not Hispanic or Latino, percent, 2014` 47792
## - `Hispanic or Latino, percent, 2014` 47793
## - `Per capita money income in past 12 months (2013 dollars), 2009-2013` 47795
## - `Asian alone, percent, 2014` 47799
## - `Black or African American alone, percent, 2014` 47801
## - `American Indian and Alaska Native alone, percent, 2014` 47801
## - `Households, 2009-2013` 52377
## F value
## - `Persons 65 years and over, percent, 2014` 0.3288
## <none>
## - `Female persons, percent, 2014` 5.1723
## - `White alone, percent, 2014` 6.9803
## - `Two or More Races, percent, 2014` 9.1450
## - `Persons under 18 years, percent, 2014` 10.3281
## - `Retail sales per capita, 2007` 11.4866
## - `White alone, not Hispanic or Latino, percent, 2014` 13.7208
## - `Hispanic or Latino, percent, 2014` 14.4635
## - `Per capita money income in past 12 months (2013 dollars), 2009-2013` 16.7205
## - `Asian alone, percent, 2014` 20.7357
## - `Black or African American alone, percent, 2014` 22.4480
## - `American Indian and Alaska Native alone, percent, 2014` 22.5652
## - `Households, 2009-2013` 12019.6905
## Pr(>F)
## - `Persons 65 years and over, percent, 2014` 0.5664092
## <none>
## - `Female persons, percent, 2014` 0.0230285
## - `White alone, percent, 2014` 0.0082891
## - `Two or More Races, percent, 2014` 0.0025175
## - `Persons under 18 years, percent, 2014` 0.0013257
## - `Retail sales per capita, 2007` 0.0007111
## - `White alone, not Hispanic or Latino, percent, 2014` 0.0002164
## - `Hispanic or Latino, percent, 2014` 0.0001461
## - `Per capita money income in past 12 months (2013 dollars), 2009-2013` 4.458e-05
## - `Asian alone, percent, 2014` 5.506e-06
## - `Black or African American alone, percent, 2014` 2.271e-06
## - `American Indian and Alaska Native alone, percent, 2014` 2.138e-06
## - `Households, 2009-2013` < 2.2e-16
##
## - `Persons 65 years and over, percent, 2014`
## <none>
## - `Female persons, percent, 2014` *
## - `White alone, percent, 2014` **
## - `Two or More Races, percent, 2014` **
## - `Persons under 18 years, percent, 2014` **
## - `Retail sales per capita, 2007` ***
## - `White alone, not Hispanic or Latino, percent, 2014` ***
## - `Hispanic or Latino, percent, 2014` ***
## - `Per capita money income in past 12 months (2013 dollars), 2009-2013` ***
## - `Asian alone, percent, 2014` ***
## - `Black or African American alone, percent, 2014` ***
## - `American Indian and Alaska Native alone, percent, 2014` ***
## - `Households, 2009-2013` ***
## ---
## Signif. codes: 0 '***' 0.001 '**' 0.01 '*' 0.05 '.' 0.1 ' ' 1
##
## Step: AIC=47778.58
## `clinton votes` ~ `Persons under 18 years, percent, 2014` + `Female persons, percent, 2014` +
## `White alone, percent, 2014` + `Black or African American alone, percent, 2014` +
## `American Indian and Alaska Native alone, percent, 2014` +
## `Asian alone, percent, 2014` + `Two or More Races, percent, 2014` +
## `Hispanic or Latino, percent, 2014` + `White alone, not Hispanic or Latino, percent, 2014` +
## `Households, 2009-2013` + `Per capita money income in past 12 months (2013 dollars), 2009-2013` +
## `Retail sales per capita, 2007`
##
## Df
## <none>
## - `White alone, percent, 2014` 1
## - `Female persons, percent, 2014` 1
## - `Two or More Races, percent, 2014` 1
## - `Retail sales per capita, 2007` 1
## - `White alone, not Hispanic or Latino, percent, 2014` 1
## - `Hispanic or Latino, percent, 2014` 1
## - `Per capita money income in past 12 months (2013 dollars), 2009-2013` 1
## - `Asian alone, percent, 2014` 1
## - `Black or African American alone, percent, 2014` 1
## - `American Indian and Alaska Native alone, percent, 2014` 1
## - `Persons under 18 years, percent, 2014` 1
## - `Households, 2009-2013` 1
## Sum of Sq
## <none>
## - `White alone, percent, 2014` 3.0425e+08
## - `Female persons, percent, 2014` 3.2773e+08
## - `Two or More Races, percent, 2014` 4.0155e+08
## - `Retail sales per capita, 2007` 5.6948e+08
## - `White alone, not Hispanic or Latino, percent, 2014` 6.2399e+08
## - `Hispanic or Latino, percent, 2014` 6.5893e+08
## - `Per capita money income in past 12 months (2013 dollars), 2009-2013` 7.6277e+08
## - `Asian alone, percent, 2014` 9.3083e+08
## - `Black or African American alone, percent, 2014` 1.0070e+09
## - `American Indian and Alaska Native alone, percent, 2014` 1.0117e+09
## - `Persons under 18 years, percent, 2014` 1.0611e+09
## - `Households, 2009-2013` 5.4966e+11
## RSS
## <none> 1.2254e+11
## - `White alone, percent, 2014` 1.2285e+11
## - `Female persons, percent, 2014` 1.2287e+11
## - `Two or More Races, percent, 2014` 1.2294e+11
## - `Retail sales per capita, 2007` 1.2311e+11
## - `White alone, not Hispanic or Latino, percent, 2014` 1.2317e+11
## - `Hispanic or Latino, percent, 2014` 1.2320e+11
## - `Per capita money income in past 12 months (2013 dollars), 2009-2013` 1.2330e+11
## - `Asian alone, percent, 2014` 1.2347e+11
## - `Black or African American alone, percent, 2014` 1.2355e+11
## - `American Indian and Alaska Native alone, percent, 2014` 1.2355e+11
## - `Persons under 18 years, percent, 2014` 1.2360e+11
## - `Households, 2009-2013` 6.7220e+11
## AIC
## <none> 47779
## - `White alone, percent, 2014` 47783
## - `Female persons, percent, 2014` 47784
## - `Two or More Races, percent, 2014` 47785
## - `Retail sales per capita, 2007` 47789
## - `White alone, not Hispanic or Latino, percent, 2014` 47790
## - `Hispanic or Latino, percent, 2014` 47791
## - `Per capita money income in past 12 months (2013 dollars), 2009-2013` 47793
## - `Asian alone, percent, 2014` 47797
## - `Black or African American alone, percent, 2014` 47799
## - `American Indian and Alaska Native alone, percent, 2014` 47799
## - `Persons under 18 years, percent, 2014` 47800
## - `Households, 2009-2013` 52388
## F value
## <none>
## - `White alone, percent, 2014` 6.6936
## - `Female persons, percent, 2014` 7.2103
## - `Two or More Races, percent, 2014` 8.8344
## - `Retail sales per capita, 2007` 12.5289
## - `White alone, not Hispanic or Latino, percent, 2014` 13.7282
## - `Hispanic or Latino, percent, 2014` 14.4968
## - `Per capita money income in past 12 months (2013 dollars), 2009-2013` 16.7814
## - `Asian alone, percent, 2014` 20.4789
## - `Black or African American alone, percent, 2014` 22.1556
## - `American Indian and Alaska Native alone, percent, 2014` 22.2582
## - `Persons under 18 years, percent, 2014` 23.3452
## - `Households, 2009-2013` 12092.7989
## Pr(>F)
## <none>
## - `White alone, percent, 2014` 0.0097277
## - `Female persons, percent, 2014` 0.0072931
## - `Two or More Races, percent, 2014` 0.0029822
## - `Retail sales per capita, 2007` 0.0004075
## - `White alone, not Hispanic or Latino, percent, 2014` 0.0002155
## - `Hispanic or Latino, percent, 2014` 0.0001435
## - `Per capita money income in past 12 months (2013 dollars), 2009-2013` 4.318e-05
## - `Asian alone, percent, 2014` 6.290e-06
## - `Black or African American alone, percent, 2014` 2.641e-06
## - `American Indian and Alaska Native alone, percent, 2014` 2.505e-06
## - `Persons under 18 years, percent, 2014` 1.430e-06
## - `Households, 2009-2013` < 2.2e-16
##
## <none>
## - `White alone, percent, 2014` **
## - `Female persons, percent, 2014` **
## - `Two or More Races, percent, 2014` **
## - `Retail sales per capita, 2007` ***
## - `White alone, not Hispanic or Latino, percent, 2014` ***
## - `Hispanic or Latino, percent, 2014` ***
## - `Per capita money income in past 12 months (2013 dollars), 2009-2013` ***
## - `Asian alone, percent, 2014` ***
## - `Black or African American alone, percent, 2014` ***
## - `American Indian and Alaska Native alone, percent, 2014` ***
## - `Persons under 18 years, percent, 2014` ***
## - `Households, 2009-2013` ***
## ---
## Signif. codes: 0 '***' 0.001 '**' 0.01 '*' 0.05 '.' 0.1 ' ' 1
##
## Call:
## lm(formula = `clinton votes` ~ `Persons under 18 years, percent, 2014` +
## `Female persons, percent, 2014` + `White alone, percent, 2014` +
## `Black or African American alone, percent, 2014` + `American Indian and Alaska Native alone, percent, 2014` +
## `Asian alone, percent, 2014` + `Two or More Races, percent, 2014` +
## `Hispanic or Latino, percent, 2014` + `White alone, not Hispanic or Latino, percent, 2014` +
## `Households, 2009-2013` + `Per capita money income in past 12 months (2013 dollars), 2009-2013` +
## `Retail sales per capita, 2007`, data = trump_data)
##
## Coefficients:
## (Intercept)
## -2.060e+05
## `Persons under 18 years, percent, 2014`
## -2.203e+02
## `Female persons, percent, 2014`
## 1.726e+02
## `White alone, percent, 2014`
## 1.220e+03
## `Black or African American alone, percent, 2014`
## 2.073e+03
## `American Indian and Alaska Native alone, percent, 2014`
## 2.048e+03
## `Asian alone, percent, 2014`
## 2.126e+03
## `Two or More Races, percent, 2014`
## 1.588e+03
## `Hispanic or Latino, percent, 2014`
## 7.523e+02
## `White alone, not Hispanic or Latino, percent, 2014`
## 7.685e+02
## `Households, 2009-2013`
## 1.554e-01
## `Per capita money income in past 12 months (2013 dollars), 2009-2013`
## 1.285e-01
## `Retail sales per capita, 2007`
## -9.226e-02