library(ggplot2)
library(tidyverse)
## -- Attaching packages --------------------------------------- tidyverse 1.3.0 --
## v tibble 3.0.3 v dplyr 1.0.2
## v tidyr 1.1.2 v stringr 1.4.0
## v readr 1.3.1 v forcats 0.5.0
## v purrr 0.3.4
## -- Conflicts ------------------------------------------ tidyverse_conflicts() --
## x dplyr::filter() masks stats::filter()
## x dplyr::lag() masks stats::lag()
library(anesr)
library(coefplot)
## Warning: package 'coefplot' was built under R version 4.0.3
data("timeseries_2016")
anes16 <- timeseries_2016
TV <- anes16 %>% select(V161364, V161365, V161366, V161367, V161368, V161369, V161370, V161371, V161372, V161373, V161374, V161375, V161376, V161377, V161378, V161379, V161380, V161381, V161382, V161383, V161384, V161385, V161386, V161387, V161388, V161389, V161390, V161391, V161392, V161393, V161394, V161395, V161396, V161397, V161398, V161399, V161400, V161401, V161402, V161403, V161404, V161405, V161406, V161407, V161408, V161409, V161410, V161411)
Dontknowshit <- anes16 %>% select(V161363f)
Did_You_Vote <- anes16 %>% select(V162034)
TV_Cleaned <- read.csv("C:/Users/Owner/Downloads/TV Cleaned - Sheet1.csv")
Traditional_Political_News_Programs <- TV %>% select(V161364, V161367, V161380, V161384, V161388, V161390, V161396, V161399, V161405)
Entertainment_or_Opinion_Political_News_Programs <- TV %>% select(V161365, V161370, V161371, V161372, V161375, V161379, V161381, V161382, V161386,V161391, V161393, V161400, V161403, V161404, V161409)
Entertainment_Programs_that_are_Expressly_Political <- TV %>% select(V161385, V161389, V161402, V161406,V161411)
Entertainment_Programs_that_are_not_Expressly_Political_but_Focus_on_a_salient_Political_issue <- TV %>% select(V161366, V161368, V161374, V161377, V161387, V161392, V161397, V161401)
Entertainment_Programs_with_little_to_No_Political_Content <- TV %>% select(V161369, V161373, V161376, V161378, V161383, V161394, V161395, V161398, V161407, V161410)
View(anes16)
view(TV)
view(Dontknowshit)
View(Did_You_Vote)
View(TV_Cleaned)
view(Traditional_Political_News_Programs)
view(Entertainment_or_Opinion_Political_News_Programs)
view(Entertainment_Programs_that_are_Expressly_Political)
view(Entertainment_Programs_that_are_not_Expressly_Political_but_Focus_on_a_salient_Political_issue)
view(Entertainment_Programs_with_little_to_No_Political_Content)
clean <- function(x){ifelse (x < 0, NA, x)}
anes_clean <- anes16 %>%
mutate(across (everything(), clean)) %>%
mutate(vote = case_when(
V162034 == 2 ~ 0,
V162034 == 1 ~ 1))
Traditional_Political_News_Programs_Moded <- lm(vote ~ V161364 + V161367 + V161380 + V161384 + V161388 + V161390 + V161396 + V161399 + V161405 , data = anes_clean)
summary(Traditional_Political_News_Programs_Moded)
##
## Call:
## lm(formula = vote ~ V161364 + V161367 + V161380 + V161384 + V161388 +
## V161390 + V161396 + V161399 + V161405, data = anes_clean)
##
## Residuals:
## Min 1Q Median 3Q Max
## -0.99364 0.01337 0.01342 0.01594 0.03208
##
## Coefficients:
## Estimate Std. Error t value Pr(>|t|)
## (Intercept) 0.986583 0.003268 301.883 <2e-16 ***
## V161364 -0.012439 0.007091 -1.754 0.0795 .
## V161367 -0.002355 0.007031 -0.335 0.7376
## V161380 -0.001338 0.006321 -0.212 0.8324
## V161384 0.007274 0.008920 0.816 0.4149
## V161388 -0.001901 0.008307 -0.229 0.8190
## V161390 0.000247 0.006390 0.039 0.9692
## V161396 -0.002527 0.006639 -0.381 0.7035
## V161399 0.009162 0.006599 1.388 0.1652
## V161405 0.001988 0.007596 0.262 0.7935
## ---
## Signif. codes: 0 '***' 0.001 '**' 0.01 '*' 0.05 '.' 0.1 ' ' 1
##
## Residual standard error: 0.1191 on 2425 degrees of freedom
## (1835 observations deleted due to missingness)
## Multiple R-squared: 0.002155, Adjusted R-squared: -0.001549
## F-statistic: 0.5818 on 9 and 2425 DF, p-value: 0.8131
coefplot::coefplot(Traditional_Political_News_Programs_Moded)
clean <- function(x){ifelse (x < 0, NA, x)}
anes_clean <- anes16 %>%
mutate(across (everything(), clean)) %>%
mutate(vote = case_when(
V162034 == 2 ~ 0,
V162034 == 1 ~ 1))
Entertainment_or_Opinion_Political_News_Programs_Moded <- lm(vote ~ V161365 + V161370 + V161371 + V161372 + V161375 + V161379 + V161381 + V161382 + V161386 + V161391 + V161393 + V161400 + V161403 + V161404 + V161409 , data = anes_clean)
summary(Entertainment_or_Opinion_Political_News_Programs_Moded)
##
## Call:
## lm(formula = vote ~ V161365 + V161370 + V161371 + V161372 + V161375 +
## V161379 + V161381 + V161382 + V161386 + V161391 + V161393 +
## V161400 + V161403 + V161404 + V161409, data = anes_clean)
##
## Residuals:
## Min 1Q Median 3Q Max
## -0.99369 0.00854 0.01552 0.01718 0.04461
##
## Coefficients:
## Estimate Std. Error t value Pr(>|t|)
## (Intercept) 0.9844826 0.0034057 289.068 <2e-16 ***
## V161365 0.0127831 0.0147687 0.866 0.387
## V161370 0.0054379 0.0098830 0.550 0.582
## V161371 -0.0125862 0.0078813 -1.597 0.110
## V161372 -0.0057542 0.0100814 -0.571 0.568
## V161375 -0.0057823 0.0165750 -0.349 0.727
## V161379 0.0090828 0.0063908 1.421 0.155
## V161381 0.0041697 0.0074241 0.562 0.574
## V161382 -0.0040115 0.0066486 -0.603 0.546
## V161386 -0.0069851 0.0111631 -0.626 0.532
## V161391 -0.0018431 0.0107007 -0.172 0.863
## V161393 0.0090539 0.0104436 0.867 0.386
## V161400 -0.0067384 0.0061025 -1.104 0.270
## V161403 0.0083804 0.0116256 0.721 0.471
## V161404 -0.0007724 0.0133486 -0.058 0.954
## V161409 0.0091393 0.0089746 1.018 0.309
## ---
## Signif. codes: 0 '***' 0.001 '**' 0.01 '*' 0.05 '.' 0.1 ' ' 1
##
## Residual standard error: 0.1191 on 2419 degrees of freedom
## (1835 observations deleted due to missingness)
## Multiple R-squared: 0.004775, Adjusted R-squared: -0.001396
## F-statistic: 0.7738 on 15 and 2419 DF, p-value: 0.7082
coefplot::coefplot(Entertainment_or_Opinion_Political_News_Programs_Moded)
### Regression for Entertainment_Programs_that_are_Expressly_Political ###
clean <- function(x){ifelse (x < 0, NA, x)}
anes_clean <- anes16 %>%
mutate(across (everything(), clean)) %>%
mutate(vote = case_when(
V162034 == 2 ~ 0,
V162034 == 1 ~ 1))
Entertainment_Programs_that_are_Expressly_Political_Moded <- lm(vote ~ V161385 + V161389 + V161402 + V161406 + V161411 , data = anes_clean)
summary(Entertainment_Programs_that_are_Expressly_Political_Moded)
##
## Call:
## lm(formula = vote ~ V161385 + V161389 + V161402 + V161406 + V161411,
## data = anes_clean)
##
## Residuals:
## Min 1Q Median 3Q Max
## -0.99986 0.01329 0.01329 0.01329 0.06162
##
## Coefficients:
## Estimate Std. Error t value Pr(>|t|)
## (Intercept) 0.986710 0.002832 348.365 <2e-16 ***
## V161385 -0.005068 0.008554 -0.592 0.554
## V161389 -0.008679 0.007210 -1.204 0.229
## V161402 -0.002713 0.007849 -0.346 0.730
## V161406 0.013153 0.008509 1.546 0.122
## V161411 -0.034586 0.027535 -1.256 0.209
## ---
## Signif. codes: 0 '***' 0.001 '**' 0.01 '*' 0.05 '.' 0.1 ' ' 1
##
## Residual standard error: 0.119 on 2429 degrees of freedom
## (1835 observations deleted due to missingness)
## Multiple R-squared: 0.002584, Adjusted R-squared: 0.0005305
## F-statistic: 1.258 on 5 and 2429 DF, p-value: 0.2792
coefplot::coefplot(Entertainment_Programs_that_are_Expressly_Political_Moded)
clean <- function(x){ifelse (x < 0, NA, x)}
anes_clean <- anes16 %>%
mutate(across (everything(), clean)) %>%
mutate(vote = case_when(
V162034 == 2 ~ 0,
V162034 == 1 ~ 1))
Entertainment_Programs_that_are_not_Expressly_Political_but_Focus_on_a_salient_Political_issue_Moded <- lm(vote ~ V161366 + V161368 + V161374 + V161377 + V161387 + V161392 + V161397 + V161401, data = anes_clean)
summary(Entertainment_Programs_that_are_not_Expressly_Political_but_Focus_on_a_salient_Political_issue_Moded)
##
## Call:
## lm(formula = vote ~ V161366 + V161368 + V161374 + V161377 + V161387 +
## V161392 + V161397 + V161401, data = anes_clean)
##
## Residuals:
## Min 1Q Median 3Q Max
## -0.99446 0.01280 0.01386 0.01386 0.03445
##
## Coefficients:
## Estimate Std. Error t value Pr(>|t|)
## (Intercept) 0.9861353 0.0030713 321.086 <2e-16 ***
## V161366 0.0018543 0.0077608 0.239 0.811
## V161368 0.0035524 0.0066885 0.531 0.595
## V161374 -0.0005336 0.0068255 -0.078 0.938
## V161377 -0.0126453 0.0096551 -1.310 0.190
## V161387 -0.0073094 0.0074620 -0.980 0.327
## V161392 0.0029080 0.0133304 0.218 0.827
## V161397 0.0047738 0.0075976 0.628 0.530
## V161401 -0.0019518 0.0093668 -0.208 0.835
## ---
## Signif. codes: 0 '***' 0.001 '**' 0.01 '*' 0.05 '.' 0.1 ' ' 1
##
## Residual standard error: 0.1192 on 2426 degrees of freedom
## (1835 observations deleted due to missingness)
## Multiple R-squared: 0.001344, Adjusted R-squared: -0.001949
## F-statistic: 0.4082 on 8 and 2426 DF, p-value: 0.9165
coefplot::coefplot(Entertainment_Programs_that_are_not_Expressly_Political_but_Focus_on_a_salient_Political_issue_Moded)
clean <- function(x){ifelse (x < 0, NA, x)}
anes_clean <- anes16 %>%
mutate(across (everything(), clean)) %>%
mutate(vote = case_when(
V162034 == 2 ~ 0,
V162034 == 1 ~ 1))
Entertainment_Programs_with_little_to_No_Political_Content_moded <- lm(vote ~ V161369 + V161373 + V161376 + V161378 + V161383 + V161394 + V161395 + V161398 + V161407 + V161410, data = anes_clean)
summary(Entertainment_Programs_with_little_to_No_Political_Content_moded)
##
## Call:
## lm(formula = vote ~ V161369 + V161373 + V161376 + V161378 + V161383 +
## V161394 + V161395 + V161398 + V161407 + V161410, data = anes_clean)
##
## Residuals:
## Min 1Q Median 3Q Max
## -0.99609 0.00850 0.01377 0.01630 0.07174
##
## Coefficients:
## Estimate Std. Error t value Pr(>|t|)
## (Intercept) 0.9837021 0.0036483 269.633 < 2e-16 ***
## V161369 -0.0072088 0.0092191 -0.782 0.434326
## V161373 0.0038131 0.0066968 0.569 0.569138
## V161376 0.0025625 0.0051517 0.497 0.618948
## V161378 -0.0043359 0.0105797 -0.410 0.681967
## V161383 -0.0040557 0.0070671 -0.574 0.566098
## V161394 -0.0037746 0.0065956 -0.572 0.567172
## V161395 0.0090040 0.0064880 1.388 0.165327
## V161398 -0.0438926 0.0130457 -3.365 0.000779 ***
## V161407 0.0077932 0.0056309 1.384 0.166485
## V161410 0.0008238 0.0065487 0.126 0.899903
## ---
## Signif. codes: 0 '***' 0.001 '**' 0.01 '*' 0.05 '.' 0.1 ' ' 1
##
## Residual standard error: 0.1189 on 2424 degrees of freedom
## (1835 observations deleted due to missingness)
## Multiple R-squared: 0.007062, Adjusted R-squared: 0.002966
## F-statistic: 1.724 on 10 and 2424 DF, p-value: 0.06991
coefplot::coefplot(Entertainment_Programs_with_little_to_No_Political_Content_moded)
clean <- function(x){ifelse (x < 0, NA, x)}
anes_clean <- anes16 %>%
mutate(across (everything(), clean)) %>%
mutate(vote = case_when(
V162034 == 2 ~ 0,
V162034 == 1 ~ 1))
All_Variables_Moded <- lm(vote ~ V161364 + V161367 + V161380 + V161384 + V161388 + V161390 + V161396 + V161399 + V161405 + V161365 + V161370 + V161371 + V161372 + V161375 + V161379 + V161381 + V161382 + V161386 + V161391 + V161393 + V161400 + V161403 + V161404 + V161409 + V161385 + V161389 + V161402 + V161406 + V161411 + V161366 + V161368 + V161374 + V161377 + V161387 + V161392 + V161397 + V161401 + V161369 + V161373 + V161376 + V161378 + V161383 + V161394 + V161395 + V161398 + V161407 + V161410, data = anes_clean)
summary(All_Variables_Moded)
##
## Call:
## lm(formula = vote ~ V161364 + V161367 + V161380 + V161384 + V161388 +
## V161390 + V161396 + V161399 + V161405 + V161365 + V161370 +
## V161371 + V161372 + V161375 + V161379 + V161381 + V161382 +
## V161386 + V161391 + V161393 + V161400 + V161403 + V161404 +
## V161409 + V161385 + V161389 + V161402 + V161406 + V161411 +
## V161366 + V161368 + V161374 + V161377 + V161387 + V161392 +
## V161397 + V161401 + V161369 + V161373 + V161376 + V161378 +
## V161383 + V161394 + V161395 + V161398 + V161407 + V161410,
## data = anes_clean)
##
## Residuals:
## Min 1Q Median 3Q Max
## -0.99739 0.00417 0.01429 0.02168 0.08244
##
## Coefficients:
## Estimate Std. Error t value Pr(>|t|)
## (Intercept) 9.837e-01 4.496e-03 218.795 < 2e-16 ***
## V161364 -1.306e-02 7.324e-03 -1.783 0.07465 .
## V161367 -1.497e-04 7.440e-03 -0.020 0.98395
## V161380 1.163e-04 6.473e-03 0.018 0.98566
## V161384 5.296e-03 9.070e-03 0.584 0.55934
## V161388 -4.116e-03 8.724e-03 -0.472 0.63707
## V161390 -2.156e-03 6.687e-03 -0.322 0.74715
## V161396 -5.631e-05 6.994e-03 -0.008 0.99358
## V161399 7.049e-03 6.797e-03 1.037 0.29980
## V161405 1.911e-03 7.753e-03 0.247 0.80530
## V161365 1.194e-02 1.487e-02 0.803 0.42205
## V161370 5.206e-03 9.974e-03 0.522 0.60174
## V161371 -1.042e-02 8.599e-03 -1.212 0.22567
## V161372 -6.338e-03 1.016e-02 -0.624 0.53294
## V161375 3.455e-03 1.693e-02 0.204 0.83831
## V161379 7.393e-03 6.882e-03 1.074 0.28285
## V161381 5.088e-03 7.595e-03 0.670 0.50302
## V161382 -3.997e-03 7.189e-03 -0.556 0.57826
## V161386 -7.472e-03 1.146e-02 -0.652 0.51460
## V161391 -9.164e-04 1.076e-02 -0.085 0.93217
## V161393 1.091e-02 1.058e-02 1.031 0.30245
## V161400 -5.555e-03 6.530e-03 -0.851 0.39499
## V161403 8.345e-03 1.214e-02 0.687 0.49200
## V161404 -2.016e-03 1.352e-02 -0.149 0.88146
## V161409 1.021e-02 9.088e-03 1.124 0.26128
## V161385 -6.816e-03 8.879e-03 -0.768 0.44276
## V161389 -7.413e-03 7.558e-03 -0.981 0.32675
## V161402 -1.697e-04 9.027e-03 -0.019 0.98500
## V161406 1.786e-02 9.268e-03 1.927 0.05404 .
## V161411 -3.949e-02 2.815e-02 -1.403 0.16070
## V161366 5.510e-04 8.160e-03 0.068 0.94617
## V161368 2.758e-03 6.876e-03 0.401 0.68842
## V161374 -3.151e-03 6.975e-03 -0.452 0.65147
## V161377 -1.235e-02 9.996e-03 -1.235 0.21678
## V161387 -6.990e-03 7.788e-03 -0.898 0.36947
## V161392 1.072e-02 1.387e-02 0.773 0.43956
## V161397 3.113e-03 7.882e-03 0.395 0.69286
## V161401 -2.619e-03 9.492e-03 -0.276 0.78266
## V161369 -9.738e-03 9.973e-03 -0.976 0.32896
## V161373 4.600e-03 6.866e-03 0.670 0.50294
## V161376 1.853e-03 5.266e-03 0.352 0.72496
## V161378 -2.878e-03 1.085e-02 -0.265 0.79084
## V161383 -2.192e-03 7.339e-03 -0.299 0.76523
## V161394 -1.641e-03 6.819e-03 -0.241 0.80980
## V161395 7.957e-03 6.703e-03 1.187 0.23531
## V161398 -3.979e-02 1.350e-02 -2.947 0.00324 **
## V161407 1.064e-02 5.864e-03 1.815 0.06971 .
## V161410 1.786e-03 7.059e-03 0.253 0.80026
## ---
## Signif. codes: 0 '***' 0.001 '**' 0.01 '*' 0.05 '.' 0.1 ' ' 1
##
## Residual standard error: 0.1192 on 2387 degrees of freedom
## (1835 observations deleted due to missingness)
## Multiple R-squared: 0.0175, Adjusted R-squared: -0.001846
## F-statistic: 0.9046 on 47 and 2387 DF, p-value: 0.6578
coefplot::coefplot (All_Variables_Moded)
clean <- function(x){ifelse (x < 0, NA, x)}
anes_clean <- anes16 %>%
mutate(across (everything(), clean)) %>%
mutate(vote = case_when(
V162034 == 2 ~ 0,
V162034 == 1 ~ 1))
All_News_Variables_Moded <- lm(vote ~ V161364 + V161367 + V161380 + V161384 + V161388 + V161390 + V161396 + V161399 + V161405 + V161365 + V161370 + V161371 + V161372 + V161375 + V161379 + V161381 + V161382 + V161386 + V161391 + V161393 + V161400 + V161403 + V161404 + V161409 , data = anes_clean)
summary(All_News_Variables_Moded)
##
## Call:
## lm(formula = vote ~ V161364 + V161367 + V161380 + V161384 + V161388 +
## V161390 + V161396 + V161399 + V161405 + V161365 + V161370 +
## V161371 + V161372 + V161375 + V161379 + V161381 + V161382 +
## V161386 + V161391 + V161393 + V161400 + V161403 + V161404 +
## V161409, data = anes_clean)
##
## Residuals:
## Min 1Q Median 3Q Max
## -0.99794 0.00776 0.01492 0.01858 0.05064
##
## Coefficients:
## Estimate Std. Error t value Pr(>|t|)
## (Intercept) 0.9850753 0.0036601 269.138 <2e-16 ***
## V161364 -0.0113200 0.0072041 -1.571 0.116
## V161367 -0.0013263 0.0073184 -0.181 0.856
## V161380 -0.0012069 0.0063777 -0.189 0.850
## V161384 0.0065488 0.0090426 0.724 0.469
## V161388 -0.0048599 0.0086830 -0.560 0.576
## V161390 -0.0017818 0.0066364 -0.268 0.788
## V161396 0.0002429 0.0069281 0.035 0.972
## V161399 0.0081591 0.0067333 1.212 0.226
## V161405 0.0010693 0.0077032 0.139 0.890
## V161365 0.0125633 0.0148116 0.848 0.396
## V161370 0.0043527 0.0099159 0.439 0.661
## V161371 -0.0117902 0.0079714 -1.479 0.139
## V161372 -0.0050377 0.0101146 -0.498 0.618
## V161375 -0.0057581 0.0166785 -0.345 0.730
## V161379 0.0092897 0.0067619 1.374 0.170
## V161381 0.0050499 0.0075297 0.671 0.502
## V161382 -0.0034332 0.0071227 -0.482 0.630
## V161386 -0.0069849 0.0114380 -0.611 0.541
## V161391 -0.0016429 0.0107312 -0.153 0.878
## V161393 0.0092172 0.0105069 0.877 0.380
## V161400 -0.0056829 0.0064161 -0.886 0.376
## V161403 0.0084083 0.0118151 0.712 0.477
## V161404 -0.0012704 0.0134388 -0.095 0.925
## V161409 0.0096589 0.0090177 1.071 0.284
## ---
## Signif. codes: 0 '***' 0.001 '**' 0.01 '*' 0.05 '.' 0.1 ' ' 1
##
## Residual standard error: 0.1193 on 2410 degrees of freedom
## (1835 observations deleted due to missingness)
## Multiple R-squared: 0.006469, Adjusted R-squared: -0.003425
## F-statistic: 0.6538 on 24 and 2410 DF, p-value: 0.8982
coefplot::coefplot (All_News_Variables_Moded)
clean <- function(x){ifelse (x < 0, NA, x)}
anes_clean <- anes16 %>%
mutate(across (everything(), clean)) %>%
mutate(vote = case_when(
V162034 == 2 ~ 0,
V162034 == 1 ~ 1))
All_Entertainment_Variables_Moded <- lm(vote ~ V161385 + V161389 + V161402 + V161406 + V161411 + V161366 + V161368 + V161374 + V161377 + V161387 + V161392 + V161397 + V161401 + V161369 + V161373 + V161376 + V161378 + V161383 + V161394 + V161395 + V161398 + V161407 + V161410 , data = anes_clean)
summary(All_Entertainment_Variables_Moded)
##
## Call:
## lm(formula = vote ~ V161385 + V161389 + V161402 + V161406 + V161411 +
## V161366 + V161368 + V161374 + V161377 + V161387 + V161392 +
## V161397 + V161401 + V161369 + V161373 + V161376 + V161378 +
## V161383 + V161394 + V161395 + V161398 + V161407 + V161410,
## data = anes_clean)
##
## Residuals:
## Min 1Q Median 3Q Max
## -0.99444 0.00715 0.01437 0.01888 0.07498
##
## Coefficients:
## Estimate Std. Error t value Pr(>|t|)
## (Intercept) 0.9856348 0.0039748 247.969 <2e-16 ***
## V161385 -0.0056527 0.0087766 -0.644 0.5196
## V161389 -0.0071094 0.0074729 -0.951 0.3415
## V161402 -0.0007838 0.0088199 -0.089 0.9292
## V161406 0.0157292 0.0091337 1.722 0.0852 .
## V161411 -0.0337958 0.0277437 -1.218 0.2233
## V161366 0.0013229 0.0080724 0.164 0.8698
## V161368 0.0025716 0.0067847 0.379 0.7047
## V161374 -0.0024921 0.0068864 -0.362 0.7175
## V161377 -0.0139670 0.0098920 -1.412 0.1581
## V161387 -0.0072958 0.0076092 -0.959 0.3377
## V161392 0.0112850 0.0137750 0.819 0.4127
## V161397 0.0023762 0.0078032 0.305 0.7608
## V161401 -0.0022469 0.0094181 -0.239 0.8115
## V161369 -0.0102135 0.0097630 -1.046 0.2956
## V161373 0.0035528 0.0067833 0.524 0.6005
## V161376 0.0025931 0.0051787 0.501 0.6166
## V161378 -0.0040341 0.0107380 -0.376 0.7072
## V161383 -0.0048105 0.0071766 -0.670 0.5027
## V161394 -0.0035018 0.0066456 -0.527 0.5983
## V161395 0.0081213 0.0065921 1.232 0.2181
## V161398 -0.0433364 0.0132611 -3.268 0.0011 **
## V161407 0.0093973 0.0058114 1.617 0.1060
## V161410 0.0008726 0.0066005 0.132 0.8948
## ---
## Signif. codes: 0 '***' 0.001 '**' 0.01 '*' 0.05 '.' 0.1 ' ' 1
##
## Residual standard error: 0.1189 on 2411 degrees of freedom
## (1835 observations deleted due to missingness)
## Multiple R-squared: 0.01127, Adjusted R-squared: 0.001842
## F-statistic: 1.195 on 23 and 2411 DF, p-value: 0.2371
coefplot::coefplot(All_Entertainment_Variables_Moded)
clean <- function(x){ifelse (x < 0, NA, x)}
anes_clean <- anes16 %>%
mutate(across (everything(), clean)) %>%
mutate(vote = case_when(
V162034 == 2 ~ 0,
V162034 == 1 ~ 1))
Political_Entertainment_Variables_Moded <- lm(vote ~ V161385 + V161389 + V161402 + V161406 + V161411 + V161366 + V161368 + V161374 + V161377 + V161387 + V161392 + V161397 + V161401, data = anes_clean)
summary(Political_Entertainment_Variables_Moded)
##
## Call:
## lm(formula = vote ~ V161385 + V161389 + V161402 + V161406 + V161411 +
## V161366 + V161368 + V161374 + V161377 + V161387 + V161392 +
## V161397 + V161401, data = anes_clean)
##
## Residuals:
## Min 1Q Median 3Q Max
## -0.99491 0.01234 0.01234 0.01861 0.06562
##
## Coefficients:
## Estimate Std. Error t value Pr(>|t|)
## (Intercept) 0.9876602 0.0032895 300.249 <2e-16 ***
## V161385 -0.0067656 0.0086799 -0.779 0.436
## V161389 -0.0098116 0.0073645 -1.332 0.183
## V161402 -0.0005574 0.0088080 -0.063 0.950
## V161406 0.0124736 0.0086497 1.442 0.149
## V161411 -0.0348623 0.0276413 -1.261 0.207
## V161366 0.0029841 0.0080002 0.373 0.709
## V161368 0.0030166 0.0067365 0.448 0.654
## V161374 -0.0010405 0.0068722 -0.151 0.880
## V161377 -0.0130121 0.0098036 -1.327 0.185
## V161387 -0.0082451 0.0074957 -1.100 0.271
## V161392 0.0078130 0.0136681 0.572 0.568
## V161397 0.0035749 0.0077804 0.459 0.646
## V161401 -0.0022326 0.0094073 -0.237 0.812
## ---
## Signif. codes: 0 '***' 0.001 '**' 0.01 '*' 0.05 '.' 0.1 ' ' 1
##
## Residual standard error: 0.1191 on 2421 degrees of freedom
## (1835 observations deleted due to missingness)
## Multiple R-squared: 0.004141, Adjusted R-squared: -0.001206
## F-statistic: 0.7744 on 13 and 2421 DF, p-value: 0.6883
coefplot::coefplot(Political_Entertainment_Variables_Moded)
clean <- function(x){ifelse (x < 0, NA, x)}
anes_clean <- anes16 %>%
mutate(across (everything(), clean)) %>%
mutate(vote = case_when(
V162034 == 2 ~ 0,
V162034 == 1 ~ 1))
All_Political_Variables_Moded <- lm(vote ~ V161364 + V161367 + V161380 + V161384 + V161388 + V161390 + V161396 + V161399 + V161405 + V161365 + V161370 + V161371 + V161372 + V161375 + V161379 + V161381 + V161382 + V161386 + V161391 + V161393 + V161400 + V161403 + V161404 + V161409 + V161385 + V161389 + V161402 + V161406 + V161411 + V161366 + V161368 + V161374 + V161377 + V161387 + V161392 + V161397 + V161401, data = anes_clean)
summary(All_Political_Variables_Moded)
##
## Call:
## lm(formula = vote ~ V161364 + V161367 + V161380 + V161384 + V161388 +
## V161390 + V161396 + V161399 + V161405 + V161365 + V161370 +
## V161371 + V161372 + V161375 + V161379 + V161381 + V161382 +
## V161386 + V161391 + V161393 + V161400 + V161403 + V161404 +
## V161409 + V161385 + V161389 + V161402 + V161406 + V161411 +
## V161366 + V161368 + V161374 + V161377 + V161387 + V161392 +
## V161397 + V161401, data = anes_clean)
##
## Residuals:
## Min 1Q Median 3Q Max
## -1.00130 0.00620 0.01322 0.02143 0.06495
##
## Coefficients:
## Estimate Std. Error t value Pr(>|t|)
## (Intercept) 9.868e-01 4.112e-03 239.956 <2e-16 ***
## V161364 -1.246e-02 7.264e-03 -1.715 0.0865 .
## V161367 -1.042e-03 7.416e-03 -0.140 0.8883
## V161380 -2.955e-04 6.459e-03 -0.046 0.9635
## V161384 6.517e-03 9.064e-03 0.719 0.4722
## V161388 -3.962e-03 8.725e-03 -0.454 0.6498
## V161390 -1.189e-03 6.669e-03 -0.178 0.8585
## V161396 3.198e-05 6.952e-03 0.005 0.9963
## V161399 7.279e-03 6.766e-03 1.076 0.2821
## V161405 1.608e-03 7.742e-03 0.208 0.8355
## V161365 1.127e-02 1.485e-02 0.759 0.4480
## V161370 4.176e-03 9.953e-03 0.420 0.6748
## V161371 -1.269e-02 8.067e-03 -1.573 0.1158
## V161372 -6.107e-03 1.016e-02 -0.601 0.5478
## V161375 -8.834e-05 1.686e-02 -0.005 0.9958
## V161379 8.382e-03 6.790e-03 1.234 0.2172
## V161381 4.277e-03 7.566e-03 0.565 0.5719
## V161382 -3.584e-03 7.163e-03 -0.500 0.6169
## V161386 -6.940e-03 1.146e-02 -0.605 0.5450
## V161391 -1.564e-03 1.076e-02 -0.145 0.8844
## V161393 1.078e-02 1.056e-02 1.020 0.3077
## V161400 -6.520e-03 6.467e-03 -1.008 0.3135
## V161403 8.212e-03 1.201e-02 0.684 0.4942
## V161404 -9.986e-04 1.350e-02 -0.074 0.9410
## V161409 1.089e-02 9.078e-03 1.200 0.2304
## V161385 -7.520e-03 8.796e-03 -0.855 0.3927
## V161389 -9.684e-03 7.446e-03 -1.301 0.1935
## V161402 3.490e-05 9.007e-03 0.004 0.9969
## V161406 1.589e-02 8.895e-03 1.786 0.0742 .
## V161411 -3.983e-02 2.803e-02 -1.421 0.1555
## V161366 2.207e-03 8.098e-03 0.273 0.7852
## V161368 3.508e-03 6.841e-03 0.513 0.6081
## V161374 -1.786e-03 6.962e-03 -0.257 0.7976
## V161377 -1.097e-02 9.909e-03 -1.107 0.2685
## V161387 -7.082e-03 7.722e-03 -0.917 0.3592
## V161392 7.968e-03 1.376e-02 0.579 0.5627
## V161397 4.381e-03 7.858e-03 0.558 0.5772
## V161401 -2.256e-03 9.476e-03 -0.238 0.8119
## ---
## Signif. codes: 0 '***' 0.001 '**' 0.01 '*' 0.05 '.' 0.1 ' ' 1
##
## Residual standard error: 0.1193 on 2397 degrees of freedom
## (1835 observations deleted due to missingness)
## Multiple R-squared: 0.01101, Adjusted R-squared: -0.004258
## F-statistic: 0.7211 on 37 and 2397 DF, p-value: 0.8939
coefplot::coefplot(All_Political_Variables_Moded)
clean <- function(x){ifelse (x < 0, NA, x)}
anes_clean <- anes16 %>%
mutate(across (everything(), clean)) %>%
mutate(vote = case_when(
V162034 == 2 ~ 0,
V162034 == 1 ~ 1))
Four_Most_Signifigant_Shows_Moded <- lm(vote ~ V161364 + V161406 + V161398 + V161407, data = anes_clean)
summary(Four_Most_Signifigant_Shows_Moded)
##
## Call:
## lm(formula = vote ~ V161364 + V161406 + V161398 + V161407, data = anes_clean)
##
## Residuals:
## Min 1Q Median 3Q Max
## -0.99963 0.00980 0.01447 0.01447 0.06731
##
## Coefficients:
## Estimate Std. Error t value Pr(>|t|)
## (Intercept) 0.985534 0.003156 312.290 < 2e-16 ***
## V161364 -0.009425 0.005727 -1.646 0.099965 .
## V161406 0.014095 0.008313 1.695 0.090113 .
## V161398 -0.043422 0.012683 -3.424 0.000628 ***
## V161407 0.009456 0.005397 1.752 0.079921 .
## ---
## Signif. codes: 0 '***' 0.001 '**' 0.01 '*' 0.05 '.' 0.1 ' ' 1
##
## Residual standard error: 0.1187 on 2430 degrees of freedom
## (1835 observations deleted due to missingness)
## Multiple R-squared: 0.007613, Adjusted R-squared: 0.005979
## F-statistic: 4.66 on 4 and 2430 DF, p-value: 0.0009516
coefplot::coefplot(Four_Most_Signifigant_Shows_Moded)