anes2020<-read_dta("C:\\Users\\USER\\Desktop\\anes2020.dta")
anes2020 <- filter(anes2020, V201507x >= 35 & V201507x < 40)
anes2020$V201507x[anes2020$V201507x  <0] <- NA
anes2020$V201600[anes2020$V201600 <0] <- NA
anes2020$V201231x[anes2020$V201231x <0] <- NA
anes2020$V202468x[anes2020$V202468x <0] <- NA
anes2020$V202144[anes2020$V202144 <0] <- NA
anes2020 %>%
ggplot(mapping = aes(V202144))+
geom_histogram()+
ggtitle(label ="Donald Trump Feelings Distribution")+
xlab(label = "Feelings")
## Don't know how to automatically pick scale for object of type haven_labelled/vctrs_vctr/double. Defaulting to continuous.
## `stat_bin()` using `bins = 30`. Pick better value with `binwidth`.
## Warning: Removed 79 rows containing non-finite values (stat_bin).

The shape of the histogram is heaping because the two large parts of the histogram are at 0 and 100 meaning that people who disliked D. Trump were very likely to give him a 0, whereas people who liked him were more likely to give him a 100.

anes2020 %>%
ggplot(mapping = aes(V202144,
stat=..density..))+geom_density()+ggtitle(label ="Donald Trump Feelings Distribution")+xlab(label = "Feelings")
## Don't know how to automatically pick scale for object of type haven_labelled/vctrs_vctr/double. Defaulting to continuous.
## Warning: Removed 79 rows containing non-finite values (stat_density).

The density curve shows that the data is not symetrical. It is bimodal, with two peaks and 0 and 100.
qqnorm(anes2020$V202144 )

According to the line in the QQ plot the data is non-normally distributed. This can be seen in the non-linear layout on the graph.
mean(as.numeric(anes2020$V202144),na.rm=TRUE)
## [1] 35.03776
summary(anes2020$V202144)
##    Min. 1st Qu.  Median    Mean 3rd Qu.    Max.    NA's 
##    0.00    0.00   15.00   35.04   70.00  100.00      79
The median in the data is 15 and is heavily influenced by the large number of 0 responses. On the other hand the mean is 35.04, which is the average of the data. The is median is a more accurate calculation for this data because of its non-normal distribution.
anes2020 %>%
tabyl(V202144)
##  V202144   n     percent valid_percent
##        0 283 0.381916329   0.427492447
##        1   4 0.005398111   0.006042296
##        5   6 0.008097166   0.009063444
##       10   6 0.008097166   0.009063444
##       15  48 0.064777328   0.072507553
##       20   4 0.005398111   0.006042296
##       30  21 0.028340081   0.031722054
##       33   1 0.001349528   0.001510574
##       35   3 0.004048583   0.004531722
##       40  34 0.045883941   0.051359517
##       45   4 0.005398111   0.006042296
##       50  26 0.035087719   0.039274924
##       51   1 0.001349528   0.001510574
##       55   2 0.002699055   0.003021148
##       59   1 0.001349528   0.001510574
##       60  28 0.037786775   0.042296073
##       65   2 0.002699055   0.003021148
##       66   1 0.001349528   0.001510574
##       70  36 0.048582996   0.054380665
##       72   1 0.001349528   0.001510574
##       75   5 0.006747638   0.007552870
##       80   2 0.002699055   0.003021148
##       82   1 0.001349528   0.001510574
##       85  48 0.064777328   0.072507553
##       90   7 0.009446694   0.010574018
##       95   3 0.004048583   0.004531722
##       96   1 0.001349528   0.001510574
##       98   1 0.001349528   0.001510574
##       99   1 0.001349528   0.001510574
##      100  81 0.109311741   0.122356495
##       NA  79 0.106612686            NA
The modal value in the relative frequency table for data set V202144 is 0 with a total number of respondents of n=283 (38.19%).
anes2020 %>%
tabyl(V202468x)
##  V202468x  n    percent valid_percent
##         1 68 0.09176788    0.09315068
##         2 16 0.02159244    0.02191781
##         3 16 0.02159244    0.02191781
##         4 20 0.02699055    0.02739726
##         5 17 0.02294197    0.02328767
##         6 33 0.04453441    0.04520548
##         7 19 0.02564103    0.02602740
##         8 16 0.02159244    0.02191781
##         9 17 0.02294197    0.02328767
##        10 41 0.05533063    0.05616438
##        11 38 0.05128205    0.05205479
##        12 15 0.02024291    0.02054795
##        13 27 0.03643725    0.03698630
##        14 18 0.02429150    0.02465753
##        15 43 0.05802969    0.05890411
##        16 39 0.05263158    0.05342466
##        17 61 0.08232119    0.08356164
##        18 47 0.06342780    0.06438356
##        19 42 0.05668016    0.05753425
##        20 35 0.04723347    0.04794521
##        21 56 0.07557355    0.07671233
##        22 46 0.06207827    0.06301370
##        NA 11 0.01484480            NA
cumulative.table(anes2020$V202144)
##        0        1        5       10       15       20       30       33 
## 38.19163 38.73144 39.54116 40.35088 46.82861 47.36842 50.20243 50.33738 
##       35       40       45       50       51       55       59       60 
## 50.74224 55.33063 55.87045 59.37922 59.51417 59.78408 59.91903 63.69771 
##       65       66       70       72       75       80       82       85 
## 63.96761 64.10256 68.96086 69.09582 69.77058 70.04049 70.17544 76.65317 
##       90       95       96       98       99      100 
## 77.59784 78.00270 78.13765 78.27260 78.40756 89.33873
Only goes to 89.34 because it does not include missing data from variable labeled as NA (10.66%).The median is 30.
library(ggplot2)
library(dplyr)
ggplot(anes2020) + geom_point(mapping = aes(x=V202468x, y=V202144)) 
## Don't know how to automatically pick scale for object of type haven_labelled/vctrs_vctr/double. Defaulting to continuous.
## Don't know how to automatically pick scale for object of type haven_labelled/vctrs_vctr/double. Defaulting to continuous.
## Warning: Removed 86 rows containing missing values (geom_point).

scatter.smooth(anes2020$V202468x,anes2020$V202144)

This shows a nonlinear and negative relationship. This scatter plot is a weak association because of the correlation of -0.09749731.
cor(anes2020$V202468x, anes2020$V202144, use = "complete.obs")
## [1] -0.1058004
tabyl(anes2020$V202144)
##  anes2020$V202144   n     percent valid_percent
##                 0 283 0.381916329   0.427492447
##                 1   4 0.005398111   0.006042296
##                 5   6 0.008097166   0.009063444
##                10   6 0.008097166   0.009063444
##                15  48 0.064777328   0.072507553
##                20   4 0.005398111   0.006042296
##                30  21 0.028340081   0.031722054
##                33   1 0.001349528   0.001510574
##                35   3 0.004048583   0.004531722
##                40  34 0.045883941   0.051359517
##                45   4 0.005398111   0.006042296
##                50  26 0.035087719   0.039274924
##                51   1 0.001349528   0.001510574
##                55   2 0.002699055   0.003021148
##                59   1 0.001349528   0.001510574
##                60  28 0.037786775   0.042296073
##                65   2 0.002699055   0.003021148
##                66   1 0.001349528   0.001510574
##                70  36 0.048582996   0.054380665
##                72   1 0.001349528   0.001510574
##                75   5 0.006747638   0.007552870
##                80   2 0.002699055   0.003021148
##                82   1 0.001349528   0.001510574
##                85  48 0.064777328   0.072507553
##                90   7 0.009446694   0.010574018
##                95   3 0.004048583   0.004531722
##                96   1 0.001349528   0.001510574
##                98   1 0.001349528   0.001510574
##                99   1 0.001349528   0.001510574
##               100  81 0.109311741   0.122356495
##                NA  79 0.106612686            NA
tabyl(anes2020$V202468x)
##  anes2020$V202468x  n    percent valid_percent
##                  1 68 0.09176788    0.09315068
##                  2 16 0.02159244    0.02191781
##                  3 16 0.02159244    0.02191781
##                  4 20 0.02699055    0.02739726
##                  5 17 0.02294197    0.02328767
##                  6 33 0.04453441    0.04520548
##                  7 19 0.02564103    0.02602740
##                  8 16 0.02159244    0.02191781
##                  9 17 0.02294197    0.02328767
##                 10 41 0.05533063    0.05616438
##                 11 38 0.05128205    0.05205479
##                 12 15 0.02024291    0.02054795
##                 13 27 0.03643725    0.03698630
##                 14 18 0.02429150    0.02465753
##                 15 43 0.05802969    0.05890411
##                 16 39 0.05263158    0.05342466
##                 17 61 0.08232119    0.08356164
##                 18 47 0.06342780    0.06438356
##                 19 42 0.05668016    0.05753425
##                 20 35 0.04723347    0.04794521
##                 21 56 0.07557355    0.07671233
##                 22 46 0.06207827    0.06301370
##                 NA 11 0.01484480            NA
Houseinc = lm(V202144~V202468x, data = anes2020)
anes2020 %>%
tabyl(V202144, V202468x,show_missing_levels=F,show_na= FALSE) %>% 
adorn_percentages("col") %>% adorn_pct_formatting(digits=2) %>% 
adorn_ns %>% 
knitr::kable()
V202144 1 10 11 12 13 14 15 16 17 18 19 2 20 21 22 3 4 5 6 7 8 9
0 30.65% (19) 40.00% (14) 40.62% (13) 46.15% (6) 20.00% (4) 38.89% (7) 48.78% (20) 42.11% (16) 33.33% (19) 43.59% (17) 56.41% (22) 26.67% (4) 41.38% (12) 55.77% (29) 51.22% (21) 26.67% (4) 50.00% (10) 28.57% (4) 50.00% (14) 57.89% (11) 46.15% (6) 60.00% (9)
1 0.00% (0) 0.00% (0) 0.00% (0) 0.00% (0) 0.00% (0) 0.00% (0) 2.44% (1) 2.63% (1) 0.00% (0) 0.00% (0) 0.00% (0) 6.67% (1) 0.00% (0) 1.92% (1) 0.00% (0) 0.00% (0) 0.00% (0) 0.00% (0) 0.00% (0) 0.00% (0) 0.00% (0) 0.00% (0)
5 0.00% (0) 0.00% (0) 6.25% (2) 7.69% (1) 0.00% (0) 0.00% (0) 0.00% (0) 0.00% (0) 1.75% (1) 0.00% (0) 2.56% (1) 0.00% (0) 0.00% (0) 0.00% (0) 0.00% (0) 6.67% (1) 0.00% (0) 0.00% (0) 0.00% (0) 0.00% (0) 0.00% (0) 0.00% (0)
10 0.00% (0) 0.00% (0) 0.00% (0) 0.00% (0) 0.00% (0) 0.00% (0) 0.00% (0) 0.00% (0) 1.75% (1) 0.00% (0) 0.00% (0) 13.33% (2) 0.00% (0) 3.85% (2) 0.00% (0) 0.00% (0) 0.00% (0) 0.00% (0) 0.00% (0) 5.26% (1) 0.00% (0) 0.00% (0)
15 3.23% (2) 11.43% (4) 9.38% (3) 15.38% (2) 20.00% (4) 5.56% (1) 0.00% (0) 0.00% (0) 15.79% (9) 7.69% (3) 7.69% (3) 6.67% (1) 10.34% (3) 5.77% (3) 9.76% (4) 6.67% (1) 0.00% (0) 7.14% (1) 10.71% (3) 5.26% (1) 0.00% (0) 0.00% (0)
20 1.61% (1) 0.00% (0) 0.00% (0) 0.00% (0) 0.00% (0) 0.00% (0) 0.00% (0) 0.00% (0) 0.00% (0) 2.56% (1) 0.00% (0) 0.00% (0) 0.00% (0) 1.92% (1) 2.44% (1) 0.00% (0) 0.00% (0) 0.00% (0) 0.00% (0) 0.00% (0) 0.00% (0) 0.00% (0)
30 1.61% (1) 0.00% (0) 6.25% (2) 0.00% (0) 0.00% (0) 11.11% (2) 2.44% (1) 2.63% (1) 3.51% (2) 0.00% (0) 5.13% (2) 6.67% (1) 3.45% (1) 3.85% (2) 2.44% (1) 6.67% (1) 5.00% (1) 0.00% (0) 7.14% (2) 0.00% (0) 0.00% (0) 0.00% (0)
33 0.00% (0) 2.86% (1) 0.00% (0) 0.00% (0) 0.00% (0) 0.00% (0) 0.00% (0) 0.00% (0) 0.00% (0) 0.00% (0) 0.00% (0) 0.00% (0) 0.00% (0) 0.00% (0) 0.00% (0) 0.00% (0) 0.00% (0) 0.00% (0) 0.00% (0) 0.00% (0) 0.00% (0) 0.00% (0)
35 0.00% (0) 0.00% (0) 0.00% (0) 0.00% (0) 5.00% (1) 0.00% (0) 0.00% (0) 0.00% (0) 1.75% (1) 0.00% (0) 0.00% (0) 0.00% (0) 0.00% (0) 0.00% (0) 0.00% (0) 6.67% (1) 0.00% (0) 0.00% (0) 0.00% (0) 0.00% (0) 0.00% (0) 0.00% (0)
40 6.45% (4) 5.71% (2) 6.25% (2) 7.69% (1) 10.00% (2) 0.00% (0) 4.88% (2) 5.26% (2) 5.26% (3) 5.13% (2) 0.00% (0) 0.00% (0) 6.90% (2) 5.77% (3) 7.32% (3) 0.00% (0) 0.00% (0) 0.00% (0) 3.57% (1) 5.26% (1) 15.38% (2) 13.33% (2)
45 4.84% (3) 0.00% (0) 0.00% (0) 0.00% (0) 0.00% (0) 0.00% (0) 0.00% (0) 0.00% (0) 0.00% (0) 2.56% (1) 0.00% (0) 0.00% (0) 0.00% (0) 0.00% (0) 0.00% (0) 0.00% (0) 0.00% (0) 0.00% (0) 0.00% (0) 0.00% (0) 0.00% (0) 0.00% (0)
50 12.90% (8) 2.86% (1) 6.25% (2) 0.00% (0) 5.00% (1) 5.56% (1) 0.00% (0) 5.26% (2) 0.00% (0) 0.00% (0) 0.00% (0) 0.00% (0) 6.90% (2) 0.00% (0) 2.44% (1) 6.67% (1) 10.00% (2) 21.43% (3) 3.57% (1) 5.26% (1) 0.00% (0) 0.00% (0)
51 1.61% (1) 0.00% (0) 0.00% (0) 0.00% (0) 0.00% (0) 0.00% (0) 0.00% (0) 0.00% (0) 0.00% (0) 0.00% (0) 0.00% (0) 0.00% (0) 0.00% (0) 0.00% (0) 0.00% (0) 0.00% (0) 0.00% (0) 0.00% (0) 0.00% (0) 0.00% (0) 0.00% (0) 0.00% (0)
55 0.00% (0) 0.00% (0) 0.00% (0) 0.00% (0) 0.00% (0) 0.00% (0) 0.00% (0) 2.63% (1) 0.00% (0) 2.56% (1) 0.00% (0) 0.00% (0) 0.00% (0) 0.00% (0) 0.00% (0) 0.00% (0) 0.00% (0) 0.00% (0) 0.00% (0) 0.00% (0) 0.00% (0) 0.00% (0)
59 0.00% (0) 0.00% (0) 0.00% (0) 0.00% (0) 0.00% (0) 0.00% (0) 0.00% (0) 0.00% (0) 0.00% (0) 0.00% (0) 0.00% (0) 0.00% (0) 3.45% (1) 0.00% (0) 0.00% (0) 0.00% (0) 0.00% (0) 0.00% (0) 0.00% (0) 0.00% (0) 0.00% (0) 0.00% (0)
60 3.23% (2) 5.71% (2) 6.25% (2) 0.00% (0) 5.00% (1) 0.00% (0) 4.88% (2) 7.89% (3) 3.51% (2) 7.69% (3) 5.13% (2) 0.00% (0) 3.45% (1) 3.85% (2) 7.32% (3) 0.00% (0) 0.00% (0) 7.14% (1) 3.57% (1) 0.00% (0) 0.00% (0) 6.67% (1)
65 0.00% (0) 0.00% (0) 0.00% (0) 0.00% (0) 0.00% (0) 0.00% (0) 0.00% (0) 0.00% (0) 0.00% (0) 2.56% (1) 0.00% (0) 0.00% (0) 0.00% (0) 0.00% (0) 2.44% (1) 0.00% (0) 0.00% (0) 0.00% (0) 0.00% (0) 0.00% (0) 0.00% (0) 0.00% (0)
66 0.00% (0) 0.00% (0) 0.00% (0) 0.00% (0) 0.00% (0) 0.00% (0) 0.00% (0) 0.00% (0) 0.00% (0) 0.00% (0) 0.00% (0) 0.00% (0) 0.00% (0) 0.00% (0) 0.00% (0) 0.00% (0) 0.00% (0) 7.14% (1) 0.00% (0) 0.00% (0) 0.00% (0) 0.00% (0)
70 0.00% (0) 8.57% (3) 6.25% (2) 15.38% (2) 0.00% (0) 5.56% (1) 7.32% (3) 7.89% (3) 3.51% (2) 0.00% (0) 5.13% (2) 6.67% (1) 3.45% (1) 3.85% (2) 7.32% (3) 6.67% (1) 15.00% (3) 7.14% (1) 10.71% (3) 5.26% (1) 7.69% (1) 6.67% (1)
72 0.00% (0) 0.00% (0) 3.12% (1) 0.00% (0) 0.00% (0) 0.00% (0) 0.00% (0) 0.00% (0) 0.00% (0) 0.00% (0) 0.00% (0) 0.00% (0) 0.00% (0) 0.00% (0) 0.00% (0) 0.00% (0) 0.00% (0) 0.00% (0) 0.00% (0) 0.00% (0) 0.00% (0) 0.00% (0)
75 1.61% (1) 0.00% (0) 0.00% (0) 0.00% (0) 0.00% (0) 5.56% (1) 0.00% (0) 0.00% (0) 1.75% (1) 0.00% (0) 0.00% (0) 6.67% (1) 0.00% (0) 0.00% (0) 0.00% (0) 0.00% (0) 0.00% (0) 0.00% (0) 0.00% (0) 0.00% (0) 0.00% (0) 6.67% (1)
80 0.00% (0) 0.00% (0) 0.00% (0) 0.00% (0) 0.00% (0) 5.56% (1) 0.00% (0) 0.00% (0) 0.00% (0) 0.00% (0) 0.00% (0) 0.00% (0) 3.45% (1) 0.00% (0) 0.00% (0) 0.00% (0) 0.00% (0) 0.00% (0) 0.00% (0) 0.00% (0) 0.00% (0) 0.00% (0)
82 0.00% (0) 0.00% (0) 0.00% (0) 0.00% (0) 0.00% (0) 0.00% (0) 0.00% (0) 0.00% (0) 1.75% (1) 0.00% (0) 0.00% (0) 0.00% (0) 0.00% (0) 0.00% (0) 0.00% (0) 0.00% (0) 0.00% (0) 0.00% (0) 0.00% (0) 0.00% (0) 0.00% (0) 0.00% (0)
85 12.90% (8) 2.86% (1) 6.25% (2) 0.00% (0) 10.00% (2) 11.11% (2) 7.32% (3) 2.63% (1) 7.02% (4) 10.26% (4) 12.82% (5) 6.67% (1) 3.45% (1) 5.77% (3) 2.44% (1) 13.33% (2) 0.00% (0) 21.43% (3) 10.71% (3) 5.26% (1) 0.00% (0) 0.00% (0)
90 1.61% (1) 0.00% (0) 0.00% (0) 0.00% (0) 5.00% (1) 0.00% (0) 2.44% (1) 0.00% (0) 1.75% (1) 0.00% (0) 0.00% (0) 6.67% (1) 3.45% (1) 0.00% (0) 0.00% (0) 0.00% (0) 0.00% (0) 0.00% (0) 0.00% (0) 5.26% (1) 0.00% (0) 0.00% (0)
95 0.00% (0) 0.00% (0) 0.00% (0) 0.00% (0) 0.00% (0) 0.00% (0) 4.88% (2) 0.00% (0) 1.75% (1) 0.00% (0) 0.00% (0) 0.00% (0) 0.00% (0) 0.00% (0) 0.00% (0) 0.00% (0) 0.00% (0) 0.00% (0) 0.00% (0) 0.00% (0) 0.00% (0) 0.00% (0)
96 0.00% (0) 0.00% (0) 0.00% (0) 0.00% (0) 0.00% (0) 0.00% (0) 0.00% (0) 2.63% (1) 0.00% (0) 0.00% (0) 0.00% (0) 0.00% (0) 0.00% (0) 0.00% (0) 0.00% (0) 0.00% (0) 0.00% (0) 0.00% (0) 0.00% (0) 0.00% (0) 0.00% (0) 0.00% (0)
98 0.00% (0) 2.86% (1) 0.00% (0) 0.00% (0) 0.00% (0) 0.00% (0) 0.00% (0) 0.00% (0) 0.00% (0) 0.00% (0) 0.00% (0) 0.00% (0) 0.00% (0) 0.00% (0) 0.00% (0) 0.00% (0) 0.00% (0) 0.00% (0) 0.00% (0) 0.00% (0) 0.00% (0) 0.00% (0)
99 0.00% (0) 0.00% (0) 0.00% (0) 0.00% (0) 0.00% (0) 0.00% (0) 0.00% (0) 0.00% (0) 0.00% (0) 0.00% (0) 0.00% (0) 0.00% (0) 0.00% (0) 1.92% (1) 0.00% (0) 0.00% (0) 0.00% (0) 0.00% (0) 0.00% (0) 0.00% (0) 0.00% (0) 0.00% (0)
100 17.74% (11) 17.14% (6) 3.12% (1) 7.69% (1) 20.00% (4) 11.11% (2) 14.63% (6) 18.42% (7) 15.79% (9) 15.38% (6) 5.13% (2) 13.33% (2) 10.34% (3) 5.77% (3) 4.88% (2) 20.00% (3) 20.00% (4) 0.00% (0) 0.00% (0) 5.26% (1) 30.77% (4) 6.67% (1)
There were more single and married women who selected 100 about their feelings towards Trump than men in the same subgroup. Similarly, there were more married women that selected 0 about their feelings towards Trump than married men. With this data there is not a strong association between feeling towards Trump and subgroup membership association.
anes2020$subgroup <-paste(anes2020$V201509 , anes2020$V201600, sep = "")
summary(anes2020$subgroup)
##    Length     Class      Mode 
##       741 character character
anes2020 %>%
tabyl(subgroup)
##  subgroup   n     percent
##       -11 223 0.300944669
##       -12 219 0.295546559
##      -1NA   2 0.002699055
##        11  42 0.056680162
##        12  41 0.055330634
##        21  88 0.118758435
##        22 124 0.167341430
##       2NA   2 0.002699055
anes2020$subgroupcat <-car::Recode(anes2020$subgroup, recode="'-11' ='single man';'-12' ='single women';'11' ='cohabiting man';'12' ='cohabiting woman';'21' ='married man';'22'='married woman'; else=NA", as.factor=T)
anes2020 %>%
  tabyl(subgroupcat)
##       subgroupcat   n     percent valid_percent
##    cohabiting man  42 0.056680162    0.05698779
##  cohabiting woman  41 0.055330634    0.05563094
##       married man  88 0.118758435    0.11940299
##     married woman 124 0.167341430    0.16824966
##        single man 223 0.300944669    0.30257802
##      single women 219 0.295546559    0.29715061
##              <NA>   4 0.005398111            NA
anes2020 %>%
ggplot(mapping =aes(y=V202144,x=subgroupcat))+ geom_boxplot()+ ggtitle(label="Distribution of feeling Thermometer")+xlab(label="Union status")
## Don't know how to automatically pick scale for object of type haven_labelled/vctrs_vctr/double. Defaulting to continuous.
## Warning: Removed 79 rows containing non-finite values (stat_boxplot).

Married men have the lowest median bar in the box plot graph, meaning they have the lowest feelings on average about Trump. Cohabiting men have the highest median about the feelings towards Trump. Single women have the largest IQR for feelings towards Trump. None of the rated listed unions have any outliers, however the NA category has 1. All of the box plots whiskers reach 100, which is the highest feelings towards Trump.
scatter.smooth(anes2020$V202468x, anes2020$V202144)

This shows a nonlinear and negative relationship, from the equation below there is a weak association of -(0.1058004).
cor(anes2020$V202468x, anes2020$V202144, use = "complete.obs")
## [1] -0.1058004
lmfeel = lm(V202468x ~ V202144, data = anes2020)
summary(lmfeel)
## 
## Call:
## lm(formula = V202468x ~ V202144, data = anes2020)
## 
## Residuals:
##     Min      1Q  Median      3Q     Max 
## -12.482  -6.038   1.518   5.519  10.381 
## 
## Coefficients:
##              Estimate Std. Error t value Pr(>|t|)    
## (Intercept) 13.481465   0.354189  38.063  < 2e-16 ***
## V202144     -0.018629   0.006852  -2.719  0.00672 ** 
## ---
## Signif. codes:  0 '***' 0.001 '**' 0.01 '*' 0.05 '.' 0.1 ' ' 1
## 
## Residual standard error: 6.707 on 653 degrees of freedom
##   (86 observations deleted due to missingness)
## Multiple R-squared:  0.01119,    Adjusted R-squared:  0.009679 
## F-statistic: 7.392 on 1 and 653 DF,  p-value: 0.006725
The intercept means that x will be at zero when the mean value of y value is 13.481465. The slope for every value decreased in x you will see a decline of -0.018629 off the feeling score. This is a significant decline. The r squared 1% of the variability is explained by the relationship between union status and feelings towards Trump.***
anes2020 %>%
lm(formula = V202468x ~ V202144, data = .)
## 
## Call:
## lm(formula = V202468x ~ V202144, data = .)
## 
## Coefficients:
## (Intercept)      V202144  
##    13.48147     -0.01863
fitted_models = anes2020 %>%
do(model = lm(V202468x~V202144, data = .))
fitted_models$model
## [[1]]
## 
## Call:
## lm(formula = V202468x ~ V202144, data = .)
## 
## Coefficients:
## (Intercept)      V202144  
##    13.48147     -0.01863
Since the scatter plot does not have linear models I am unable determine the strength or direction of the data.
anes2020 %>%
group_by(subgroup) %>%
ggplot(mapping = aes(x=V202468x,y=V202144,group=subgroupcat, col=factor(subgroupcat)))+geom_point()+geom_smooth()
## Don't know how to automatically pick scale for object of type haven_labelled/vctrs_vctr/double. Defaulting to continuous.
## Don't know how to automatically pick scale for object of type haven_labelled/vctrs_vctr/double. Defaulting to continuous.
## `geom_smooth()` using method = 'loess' and formula 'y ~ x'
## Warning: Removed 86 rows containing non-finite values (stat_smooth).
## Warning in simpleLoess(y, x, w, span, degree = degree, parametric =
## parametric, : span too small. fewer data values than degrees of freedom.
## Warning in simpleLoess(y, x, w, span, degree = degree, parametric =
## parametric, : at 5.92
## Warning in simpleLoess(y, x, w, span, degree = degree, parametric =
## parametric, : radius 0.0064
## Warning in simpleLoess(y, x, w, span, degree = degree, parametric =
## parametric, : all data on boundary of neighborhood. make span bigger
## Warning in simpleLoess(y, x, w, span, degree = degree, parametric =
## parametric, : pseudoinverse used at 5.92
## Warning in simpleLoess(y, x, w, span, degree = degree, parametric =
## parametric, : neighborhood radius 0.08
## Warning in simpleLoess(y, x, w, span, degree = degree, parametric =
## parametric, : reciprocal condition number 1
## Warning in simpleLoess(y, x, w, span, degree = degree, parametric =
## parametric, : at 22.08
## Warning in simpleLoess(y, x, w, span, degree = degree, parametric =
## parametric, : radius 0.0064
## Warning in simpleLoess(y, x, w, span, degree = degree, parametric =
## parametric, : all data on boundary of neighborhood. make span bigger
## Warning in simpleLoess(y, x, w, span, degree = degree, parametric =
## parametric, : There are other near singularities as well. 0.0064
## Warning in simpleLoess(y, x, w, span, degree = degree, parametric =
## parametric, : zero-width neighborhood. make span bigger

## Warning in simpleLoess(y, x, w, span, degree = degree, parametric =
## parametric, : zero-width neighborhood. make span bigger
## Warning: Computation failed in `stat_smooth()`:
## NA/NaN/Inf in foreign function call (arg 5)
## Warning: Removed 86 rows containing missing values (geom_point).

tabyl(anes2020$V201507x)
##  anes2020$V201507x   n   percent
##                 35 151 0.2037787
##                 36 141 0.1902834
##                 37 148 0.1997301
##                 38 152 0.2051282
##                 39 149 0.2010796
I think that the data was restricted from 35 to 40 to show the impact it will have on graphic modeling. The outputs were not able to capture linear models. This is something that we, as demographers, will experience in the future while working with data. By limiting the age groups we were not able to see a true representation about feelings towards Trump, because incomes and feeling are fairly similar, due to age.
When data is limited to a specific age group running models to capture linear effects will not work, however when running compete samples lineal models will help describe the relationship between variables and shows the line of best fit of the data.
anes2020 %>%
  tabyl(subgroupcat, V201231x, V202144)
## $`0`
##       subgroupcat  1  2  3 4 5 6 7
##    cohabiting man  6  2  7 2 0 0 0
##  cohabiting woman  9  2  4 1 0 0 0
##       married man 22  5 11 3 0 0 0
##     married woman 25 14  8 3 0 0 0
##        single man 27 10 27 9 4 2 2
##      single women 38 12 17 6 1 1 0
##              <NA>  0  0  0 3 0 0 0
## 
## $`1`
##       subgroupcat 1 2 3 4 5 6 7
##    cohabiting man 0 0 0 0 0 0 0
##  cohabiting woman 0 0 0 0 0 0 0
##       married man 0 0 0 0 0 0 0
##     married woman 0 1 0 0 0 0 0
##        single man 0 0 1 1 1 0 0
##      single women 0 0 0 0 0 0 0
## 
## $`10`
##       subgroupcat 1 2 3 4 5 6 7
##    cohabiting man 0 0 0 0 0 0 0
##  cohabiting woman 0 0 0 0 0 0 0
##       married man 0 0 0 0 0 0 0
##     married woman 1 1 0 0 0 1 0
##        single man 1 0 0 0 0 0 0
##      single women 0 1 1 0 0 0 0
## 
## $`100`
##       subgroupcat 1 2 3 4 5 6  7
##    cohabiting man 0 0 0 0 1 0  1
##  cohabiting woman 0 0 0 1 0 0  2
##       married man 0 0 0 1 1 1  1
##     married woman 1 0 1 5 3 1  3
##        single man 0 0 0 3 4 3 16
##      single women 0 1 1 2 4 4 20
## 
## $`15`
##       subgroupcat 1 2 3 4 5 6 7
##    cohabiting man 1 0 0 0 0 0 0
##  cohabiting woman 0 0 0 0 1 0 0
##       married man 1 1 1 0 0 0 1
##     married woman 4 3 0 2 2 3 0
##        single man 6 3 1 1 2 0 0
##      single women 2 3 5 3 1 0 1
## 
## $`20`
##       subgroupcat 1 2 3 4 5 6 7
##    cohabiting man 0 1 0 0 0 0 0
##  cohabiting woman 0 0 0 0 0 0 0
##       married man 0 0 0 0 1 0 0
##     married woman 0 0 0 1 0 0 0
##        single man 0 0 0 0 0 1 0
##      single women 0 0 0 0 0 0 0
## 
## $`30`
##       subgroupcat 1 2 3 4 5 6 7
##    cohabiting man 0 0 0 0 1 1 0
##  cohabiting woman 1 0 0 1 0 1 0
##       married man 0 0 1 2 0 1 0
##     married woman 0 0 0 1 0 0 0
##        single man 0 0 0 2 1 0 1
##      single women 1 2 0 1 2 1 0
## 
## $`33`
##       subgroupcat 1 2 3 4 5 6 7
##    cohabiting man 0 0 0 0 1 0 0
##  cohabiting woman 0 0 0 0 0 0 0
##       married man 0 0 0 0 0 0 0
##     married woman 0 0 0 0 0 0 0
##        single man 0 0 0 0 0 0 0
##      single women 0 0 0 0 0 0 0
## 
## $`35`
##       subgroupcat 1 2 3 4 5 6 7
##    cohabiting man 0 0 0 0 0 0 0
##  cohabiting woman 0 0 1 0 0 0 0
##       married man 0 1 0 0 0 0 0
##     married woman 0 0 0 0 0 0 0
##        single man 0 0 0 0 0 0 0
##      single women 0 1 0 0 0 0 0
## 
## $`40`
##       subgroupcat 1 2 3 4 5 6 7
##    cohabiting man 0 0 0 0 0 0 1
##  cohabiting woman 0 2 0 0 0 0 0
##       married man 0 0 0 2 0 2 0
##     married woman 1 2 0 1 1 0 1
##        single man 0 1 1 5 3 1 1
##      single women 0 4 1 1 1 2 0
## 
## $`45`
##       subgroupcat 1 2 3 4 5 6 7
##    cohabiting man 0 0 0 1 0 0 0
##  cohabiting woman 0 0 0 0 0 0 0
##       married man 0 1 0 1 0 1 0
##     married woman 0 0 0 0 0 0 0
##        single man 0 0 0 0 0 0 0
##      single women 0 0 0 0 0 0 0
## 
## $`5`
##       subgroupcat 1 2 3 4 5 6 7
##    cohabiting man 0 0 0 0 0 0 0
##  cohabiting woman 0 0 0 0 0 0 0
##       married man 0 0 0 1 0 1 0
##     married woman 0 0 0 0 0 0 0
##        single man 1 0 0 2 0 0 0
##      single women 0 0 0 1 0 0 0
## 
## $`50`
##       subgroupcat 1 2 3 4 5 6 7
##    cohabiting man 0 0 0 2 0 0 0
##  cohabiting woman 0 0 0 1 0 1 0
##       married man 0 0 1 2 1 0 1
##     married woman 0 0 0 2 0 0 0
##        single man 0 0 0 1 1 2 0
##      single women 1 2 0 4 3 0 0
##              <NA> 0 0 0 1 0 0 0
## 
## $`51`
##       subgroupcat 1 2 3 4 5 6 7
##    cohabiting man 0 0 0 0 0 0 0
##  cohabiting woman 0 0 0 0 0 0 0
##       married man 0 0 0 0 0 1 0
##     married woman 0 0 0 0 0 0 0
##        single man 0 0 0 0 0 0 0
##      single women 0 0 0 0 0 0 0
## 
## $`55`
##       subgroupcat 1 2 3 4 5 6 7
##    cohabiting man 0 0 0 0 0 0 0
##  cohabiting woman 0 0 0 0 0 0 0
##       married man 0 0 1 0 0 0 0
##     married woman 0 0 0 0 0 0 0
##        single man 0 0 0 0 1 0 0
##      single women 0 0 0 0 0 0 0
## 
## $`59`
##       subgroupcat 1 2 3 4 5 6 7
##    cohabiting man 0 0 0 0 0 0 0
##  cohabiting woman 0 0 0 0 0 0 0
##       married man 0 0 0 0 0 0 0
##     married woman 0 0 0 0 0 0 0
##        single man 0 0 0 0 0 1 0
##      single women 0 0 0 0 0 0 0
## 
## $`60`
##       subgroupcat 1 2 3 4 5 6 7
##    cohabiting man 0 0 0 0 3 0 0
##  cohabiting woman 0 1 0 0 0 1 0
##       married man 0 0 0 0 0 1 0
##     married woman 0 0 1 0 1 0 0
##        single man 0 0 0 3 4 5 2
##      single women 1 0 1 1 3 0 0
## 
## $`65`
##       subgroupcat 1 2 3 4 5 6 7
##    cohabiting man 0 0 0 0 0 0 0
##  cohabiting woman 0 0 0 0 0 0 0
##       married man 0 0 0 0 0 0 0
##     married woman 0 0 0 0 0 0 0
##        single man 0 0 0 0 1 0 0
##      single women 0 0 0 0 0 0 1
## 
## $`66`
##       subgroupcat 1 2 3 4 5 6 7
##    cohabiting man 0 0 0 0 0 0 0
##  cohabiting woman 0 0 0 0 0 0 0
##       married man 0 0 0 0 0 0 0
##     married woman 0 0 0 0 0 0 0
##        single man 0 0 0 1 0 0 0
##      single women 0 0 0 0 0 0 0
## 
## $`70`
##       subgroupcat 1 2 3 4 5 6 7
##    cohabiting man 1 0 0 0 1 0 0
##  cohabiting woman 0 0 0 0 0 0 2
##       married man 0 0 0 2 0 0 1
##     married woman 1 1 2 1 0 0 1
##        single man 0 0 0 1 4 5 3
##      single women 0 1 0 1 1 5 2
## 
## $`72`
##       subgroupcat 1 2 3 4 5 6 7
##    cohabiting man 0 0 0 0 0 0 0
##  cohabiting woman 0 0 0 0 0 0 0
##       married man 0 0 0 0 0 0 0
##     married woman 0 0 0 0 0 0 0
##        single man 0 0 0 0 1 0 0
##      single women 0 0 0 0 0 0 0
## 
## $`75`
##       subgroupcat 1 2 3 4 5 6 7
##    cohabiting man 0 0 0 0 0 0 0
##  cohabiting woman 0 0 0 0 0 0 0
##       married man 0 0 0 1 0 1 0
##     married woman 0 0 0 0 0 0 1
##        single man 0 0 0 0 1 0 0
##      single women 0 0 0 0 0 0 1
## 
## $`80`
##       subgroupcat 1 2 3 4 5 6 7
##    cohabiting man 0 0 0 0 0 0 0
##  cohabiting woman 0 0 0 0 0 0 0
##       married man 0 0 0 0 0 0 0
##     married woman 0 0 0 0 0 0 0
##        single man 0 0 0 0 0 1 0
##      single women 0 0 0 0 0 1 0
## 
## $`82`
##       subgroupcat 1 2 3 4 5 6 7
##    cohabiting man 0 0 0 0 0 0 0
##  cohabiting woman 0 0 0 0 0 0 0
##       married man 0 0 0 0 0 0 0
##     married woman 0 0 0 0 0 0 0
##        single man 0 0 0 0 0 0 1
##      single women 0 0 0 0 0 0 0
## 
## $`85`
##       subgroupcat 1 2 3 4 5 6  7
##    cohabiting man 0 0 0 1 1 0  1
##  cohabiting woman 0 0 0 1 1 0  1
##       married man 0 0 0 2 1 0  1
##     married woman 0 0 0 3 0 1  3
##        single man 0 0 0 0 1 3  7
##      single women 0 0 0 0 3 1 16
## 
## $`90`
##       subgroupcat 1 2 3 4 5 6 7
##    cohabiting man 0 0 0 0 0 0 0
##  cohabiting woman 0 0 0 0 0 1 0
##       married man 0 0 0 0 0 0 0
##     married woman 0 0 0 0 0 1 0
##        single man 0 0 0 0 0 2 1
##      single women 0 0 0 0 1 1 0
## 
## $`95`
##       subgroupcat 1 2 3 4 5 6 7
##    cohabiting man 0 0 0 0 0 0 0
##  cohabiting woman 0 0 0 0 0 0 0
##       married man 0 0 0 0 0 0 0
##     married woman 0 0 0 0 0 0 0
##        single man 0 0 0 0 1 0 0
##      single women 0 0 0 0 1 0 1
## 
## $`96`
##       subgroupcat 1 2 3 4 5 6 7
##    cohabiting man 0 0 0 0 0 0 0
##  cohabiting woman 0 0 0 0 0 0 0
##       married man 0 0 0 0 0 0 0
##     married woman 0 0 0 0 0 0 0
##        single man 0 0 0 0 0 0 1
##      single women 0 0 0 0 0 0 0
## 
## $`98`
##       subgroupcat 1 2 3 4 5 6 7
##    cohabiting man 0 0 0 0 0 0 1
##  cohabiting woman 0 0 0 0 0 0 0
##       married man 0 0 0 0 0 0 0
##     married woman 0 0 0 0 0 0 0
##        single man 0 0 0 0 0 0 0
##      single women 0 0 0 0 0 0 0
## 
## $`99`
##       subgroupcat 1 2 3 4 5 6 7
##    cohabiting man 0 0 0 0 0 0 0
##  cohabiting woman 0 0 0 0 0 0 0
##       married man 0 0 0 0 0 0 0
##     married woman 0 0 0 0 0 0 0
##        single man 0 0 0 0 0 0 0
##      single women 0 0 0 0 0 0 1
## 
## $NA_
##       subgroupcat 1 2 3 4 5 6 7
##    cohabiting man 1 1 0 0 1 0 2
##  cohabiting woman 0 1 3 1 0 0 0
##       married man 1 1 2 1 0 0 2
##     married woman 1 5 4 2 1 1 1
##        single man 0 0 7 2 4 2 9
##      single women 3 6 2 3 2 3 4
According to the able above 129 women who identify as either strong democrat, not very strong democrat or independent democrat selected 0 for their feelings towards Trump, whereas, only 2 women who identify as independent republican, not very strong republican or strong republican selected 0 about their feelings towards Trump. This is opposite from the people who selected 100 for their feeling towards Trump, which included 36 women who identify as independent republican, not very strong republican or strong republican. Only 4 women for those who identify as either strong democrat, not very strong democrat or independent democrat selected. This shows that their is a strong association between women and their identified political party and feelings towards Trump. Those who lean democratic will be very likely to rate Trump poorly, versus those who lean republican.