Analysis Sections divided by model outcomes: 1. Election Predictions 2. Perceived Election Legitimacy 3. Emotions 4. Media Engagement 5. Election Legitimacy and Media Engagement
d$age <- as.numeric(d$age)
nrow(d) #N = 1236
# exclude participants out of proper age range
d <- d[d$age < 115,] # 0 participants excluded
d <- d[d$age > 17,] # 1 participant excluded
nrow(d) #N = 1235
psych::describe(d$age)
#M = 49.71, SD = 15.21, Range = 18 - 89
table(d$gender, exclude = F) # F = 1, M = 2, Other = 3
prop.table(table(d$gender, exclude = F)) #, exclude = F))
# 1 2 3 NA
# 538(43.6%) 579(46.9%) 2(0.1%) 116(9.4%)
prop.table(table(d$race))
# 1 2 3 4 5 6 7
# 8.8% 12.6% 7.4% 1.1% 0.5% 68.5% 1.1%
prop.table(table(d$race,exclude = F))
# 1 = Asian, Asian-American
# 2 = Black, African-American
# 3 = Hispanic, Latino-American
# 4 = native American
# 5 = Native Pacific Islander
# 6 = White, Caucasian-American
# 7 = other
# 1 2 3 4 5 6 7 NA
# 8.0% 11.4% 6.7% 0.1% 0.5% 62.1% 0.1% 9.3%
psych::describe(d$education)
# M = 14.49, SD = 2.58
table(d$party_factor)
# Democrat Republican Independent
# 503 429 178##
## Descriptive statistics by group
## group: Democrat
## vars n mean sd median trimmed mad min max range skew kurtosis se
## X1 1 494 7.42 2.04 8 7.8 1.48 1 9 8 -1.36 0.93 0.09
## ------------------------------------------------------------
## group: Republican
## vars n mean sd median trimmed mad min max range skew kurtosis se
## X1 1 416 3.63 2.64 3 3.33 2.97 1 9 8 0.72 -0.76 0.13
## ------------------------------------------------------------
## group: Independent
## vars n mean sd median trimmed mad min max range skew kurtosis se
## X1 1 174 5.38 2.3 5 5.44 1.48 1 9 8 -0.09 -0.8 0.17
# Model predicting election prediction by partisanship
electOutcome.m <- lm(electPredictTB ~ pDem_Rep + pInd_Not, data = d[!is.na(d$party_factor),])
summary(electOutcome.m)##
## Call:
## lm(formula = electPredictTB ~ pDem_Rep + pInd_Not, data = d[!is.na(d$party_factor),
## ])
##
## Residuals:
## Min 1Q Median 3Q Max
## -6.4211 -1.6322 0.5789 1.5789 5.3678
##
## Coefficients:
## Estimate Std. Error t value Pr(>|t|)
## (Intercept) 5.47802 0.07802 70.215 <2e-16 ***
## pDem_Rep -3.78884 0.15494 -24.454 <2e-16 ***
## pInd_Not 0.14732 0.19276 0.764 0.445
## ---
## Signif. codes: 0 '***' 0.001 '**' 0.01 '*' 0.05 '.' 0.1 ' ' 1
##
## Residual standard error: 2.328 on 1081 degrees of freedom
## (141 observations deleted due to missingness)
## Multiple R-squared: 0.3572, Adjusted R-squared: 0.356
## F-statistic: 300.3 on 2 and 1081 DF, p-value: < 2.2e-16
# Simple model predicting election prediction
electOutcome.m2 <- lm(electPredictTB ~ 1, data = d[!is.na(d$party_factor),])
summary(electOutcome.m2)##
## Call:
## lm(formula = electPredictTB ~ 1, data = d[!is.na(d$party_factor),
## ])
##
## Residuals:
## Min 1Q Median 3Q Max
## -4.6393 -2.6393 0.3607 2.3607 3.3607
##
## Coefficients:
## Estimate Std. Error t value Pr(>|t|)
## (Intercept) 5.63930 0.08812 64 <2e-16 ***
## ---
## Signif. codes: 0 '***' 0.001 '**' 0.01 '*' 0.05 '.' 0.1 ' ' 1
##
## Residual standard error: 2.901 on 1083 degrees of freedom
## (141 observations deleted due to missingness)
# 2-df effect of partisanship: Comparing expanded and simple model
anova(electOutcome.m2, electOutcome.m)## Analysis of Variance Table
##
## Model 1: electPredictTB ~ 1
## Model 2: electPredictTB ~ pDem_Rep + pInd_Not
## Res.Df RSS Df Sum of Sq F Pr(>F)
## 1 1083 9116.0
## 2 1081 5860.1 2 3255.9 300.3 < 2.2e-16 ***
## ---
## Signif. codes: 0 '***' 0.001 '**' 0.01 '*' 0.05 '.' 0.1 ' ' 1
##
## Call:
## lm(formula = electPredictTB.plot ~ pRepD + pRepI, data = d)
##
## Residuals:
## Min 1Q Median 3Q Max
## -6.4211 -1.6322 0.5789 1.5789 5.3678
##
## Coefficients:
## Estimate Std. Error t value Pr(>|t|)
## (Intercept) -1.3678 0.1142 -11.982 < 2e-16 ***
## pRepD 3.7888 0.1549 24.454 < 2e-16 ***
## pRepI 1.7471 0.2102 8.311 2.81e-16 ***
## ---
## Signif. codes: 0 '***' 0.001 '**' 0.01 '*' 0.05 '.' 0.1 ' ' 1
##
## Residual standard error: 2.328 on 1081 degrees of freedom
## (152 observations deleted due to missingness)
## Multiple R-squared: 0.3572, Adjusted R-squared: 0.356
## F-statistic: 300.3 on 2 and 1081 DF, p-value: < 2.2e-16
##
## Call:
## lm(formula = electPredictTB.plot ~ pDemR + pDemI, data = d)
##
## Residuals:
## Min 1Q Median 3Q Max
## -6.4211 -1.6322 0.5789 1.5789 5.3678
##
## Coefficients:
## Estimate Std. Error t value Pr(>|t|)
## (Intercept) 2.4211 0.1048 23.111 <2e-16 ***
## pDemR -3.7888 0.1549 -24.454 <2e-16 ***
## pDemI -2.0417 0.2053 -9.947 <2e-16 ***
## ---
## Signif. codes: 0 '***' 0.001 '**' 0.01 '*' 0.05 '.' 0.1 ' ' 1
##
## Residual standard error: 2.328 on 1081 degrees of freedom
## (152 observations deleted due to missingness)
## Multiple R-squared: 0.3572, Adjusted R-squared: 0.356
## F-statistic: 300.3 on 2 and 1081 DF, p-value: < 2.2e-16
##
## Call:
## lm(formula = electPredictTB.plot ~ pIndD + pIndR, data = d)
##
## Residuals:
## Min 1Q Median 3Q Max
## -6.4211 -1.6322 0.5789 1.5789 5.3678
##
## Coefficients:
## Estimate Std. Error t value Pr(>|t|)
## (Intercept) 0.3793 0.1765 2.149 0.0319 *
## pIndD 2.0417 0.2053 9.947 < 2e-16 ***
## pIndR -1.7471 0.2102 -8.311 2.81e-16 ***
## ---
## Signif. codes: 0 '***' 0.001 '**' 0.01 '*' 0.05 '.' 0.1 ' ' 1
##
## Residual standard error: 2.328 on 1081 degrees of freedom
## (152 observations deleted due to missingness)
## Multiple R-squared: 0.3572, Adjusted R-squared: 0.356
## F-statistic: 300.3 on 2 and 1081 DF, p-value: < 2.2e-16
elect.time.m <- lm(electPredictTB.plot ~ (pDem_Rep + pInd_Not) * tDur_Post, data = d)
summary(elect.time.m)##
## Call:
## lm(formula = electPredictTB.plot ~ (pDem_Rep + pInd_Not) * tDur_Post,
## data = d)
##
## Residuals:
## Min 1Q Median 3Q Max
## -6.5798 -1.7282 0.4202 1.4202 5.3684
##
## Coefficients:
## Estimate Std. Error t value Pr(>|t|)
## (Intercept) 0.4350 0.0791 5.500 4.75e-08 ***
## pDem_Rep -3.7380 0.1570 -23.811 < 2e-16 ***
## pInd_Not 0.2004 0.1955 1.025 0.30543
## tDur_Post 0.4230 0.1582 2.674 0.00761 **
## pDem_Rep:tDur_Post -0.4182 0.3140 -1.332 0.18313
## pInd_Not:tDur_Post -0.6446 0.3910 -1.649 0.09947 .
## ---
## Signif. codes: 0 '***' 0.001 '**' 0.01 '*' 0.05 '.' 0.1 ' ' 1
##
## Residual standard error: 2.321 on 1078 degrees of freedom
## (152 observations deleted due to missingness)
## Multiple R-squared: 0.3628, Adjusted R-squared: 0.3598
## F-statistic: 122.7 on 5 and 1078 DF, p-value: < 2.2e-16
Main DV for this section: Own Vote Confidence - National Vote Confidence (difference score used to account for repeated measure)
##
## Descriptive statistics by group
## group: Democrat
## vars n mean sd median trimmed mad min max range skew kurtosis se
## X1 1 557 4.17 0.98 4.5 4.32 0.74 1 5 4 -1.15 0.67 0.04
## ------------------------------------------------------------
## group: Republican
## vars n mean sd median trimmed mad min max range skew kurtosis se
## X1 1 463 2.89 1.21 3 2.87 1.48 1 5 4 0.07 -0.94 0.06
## ------------------------------------------------------------
## group: Independent
## vars n mean sd median trimmed mad min max range skew kurtosis se
## X1 1 187 2.97 1.37 3 2.96 1.48 1 5 4 -0.06 -1.22 0.1
##
## Descriptive statistics by group
## : Democrat
## : Pre-election
## NULL
## ------------------------------------------------------------
## : Republican
## : Pre-election
## NULL
## ------------------------------------------------------------
## : Independent
## : Pre-election
## NULL
## ------------------------------------------------------------
## : Democrat
## : During-election
## vars n mean sd median trimmed mad min max range skew kurtosis se
## X1 1 250 3.92 1 4 4.04 1.48 1 5 4 -0.77 -0.02 0.06
## ------------------------------------------------------------
## : Republican
## : During-election
## vars n mean sd median trimmed mad min max range skew kurtosis se
## X1 1 237 2.99 1.17 3 2.99 1.48 1 5 4 0.04 -0.93 0.08
## ------------------------------------------------------------
## : Independent
## : During-election
## vars n mean sd median trimmed mad min max range skew kurtosis se
## X1 1 86 2.96 1.28 3 2.95 1.48 1 5 4 -0.15 -1.12 0.14
## ------------------------------------------------------------
## : Democrat
## : Post-election
## vars n mean sd median trimmed mad min max range skew kurtosis se
## X1 1 307 4.37 0.92 5 4.55 0 1 5 4 -1.61 2.07 0.05
## ------------------------------------------------------------
## : Republican
## : Post-election
## vars n mean sd median trimmed mad min max range skew kurtosis se
## X1 1 226 2.79 1.24 3 2.74 1.48 1 5 4 0.12 -0.97 0.08
## ------------------------------------------------------------
## : Independent
## : Post-election
## vars n mean sd median trimmed mad min max range skew kurtosis se
## X1 1 101 2.98 1.45 3 2.97 2.22 1 5 4 -0.01 -1.34 0.14
voteconf <- as.data.frame(cbind(d[d$election_timing != "Pre-election",]$party_factor,
d[d$election_timing != "Pre-election",]$ownvote_conf,
d[d$election_timing != "Pre-election",]$overallvote_conf,
d[d$election_timing != "Pre-election",]$s3,
d[d$election_timing != "Pre-election",]$election_timing))
names(voteconf) <- c("party_factor", "Own","Nationwide", "s3", "election_timing")
voteconf$party_factor <- recode_factor(voteconf$party_factor, `1` = "Democrat", `2` = "Republican", `3` = "Independent")
d2 <- tidyr::gather(voteconf, Vote_Type, Confidence, Own:Nationwide, factor_key=TRUE)
d3 <- d2[!is.na(d2$party_factor),]
d3 <- na.omit(d3)
d4 <- d3[d3$s3 != 29149117, ]
d4$s3 <- as.factor(as.character(d4$s3))# Main ANOVA
main.aov <- ezANOVA(data = d4
, dv = Confidence
, wid = s3
, within = Vote_Type
, between = .(party_factor, election_timing)
, type = 3)## Warning: "election_timing" will be treated as numeric.
## Warning: Data is unbalanced (unequal N per group). Make sure you specified a
## well-considered value for the type argument to ezANOVA().
## $ANOVA
## Effect DFn DFd F p p<.05
## 2 party_factor 2 1201 0.7054629 4.940844e-01
## 3 election_timing 1 1201 1.3146046 2.517910e-01
## 5 Vote_Type 1 1201 7.5379086 6.131563e-03 *
## 4 party_factor:election_timing 2 1201 10.7311888 2.402464e-05 *
## 6 party_factor:Vote_Type 2 1201 2.7109894 6.687779e-02
## 7 election_timing:Vote_Type 1 1201 0.2257459 6.347826e-01
## 8 party_factor:election_timing:Vote_Type 2 1201 8.7081367 1.758991e-04 *
## ges
## 2 1.006339e-03
## 3 9.377021e-04
## 5 8.937546e-04
## 4 1.509213e-02
## 6 6.430344e-04
## 7 2.678946e-05
## 8 2.062596e-03
Yes–There is a 3-way interaction between vote type, partisanship (Dem vs. Rep) and election timing. There is NO interaction of timing with Independents vs. Dems/Reps. In the context of the full model, there is also no main effect of timing.
Parameter of interest: tDur_Post in each model
# Democrats
vote.party.time.D <- lm(voteLegit ~ (pDemR + pDemI) * (tDur_Post), data = d)
summary(vote.party.time.D)##
## Call:
## lm(formula = voteLegit ~ (pDemR + pDemI) * (tDur_Post), data = d)
##
## Residuals:
## Min 1Q Median 3Q Max
## -3.3664 -0.8664 0.0760 0.6336 2.2146
##
## Coefficients:
## Estimate Std. Error t value Pr(>|t|)
## (Intercept) 4.14522 0.04803 86.307 < 2e-16 ***
## pDemR -1.25569 0.07109 -17.662 < 2e-16 ***
## pDemI -1.17795 0.09565 -12.315 < 2e-16 ***
## tDur_Post 0.44245 0.09606 4.606 4.54e-06 ***
## pDemR:tDur_Post -0.65072 0.14219 -4.577 5.22e-06 ***
## pDemI:tDur_Post -0.42650 0.19131 -2.229 0.026 *
## ---
## Signif. codes: 0 '***' 0.001 '**' 0.01 '*' 0.05 '.' 0.1 ' ' 1
##
## Residual standard error: 1.128 on 1201 degrees of freedom
## (29 observations deleted due to missingness)
## Multiple R-squared: 0.2483, Adjusted R-squared: 0.2452
## F-statistic: 79.36 on 5 and 1201 DF, p-value: < 2.2e-16
vote.party.time.D2 <- lm(Own_Nat_conf_diff ~ (pDemR + pDemI) * (tDur_Post), data = d)
summary(vote.party.time.D2) # This model is technically testing whether the difference between Own & National vote confidence is changing over time, not whether confidence is changing in general##
## Call:
## lm(formula = Own_Nat_conf_diff ~ (pDemR + pDemI) * (tDur_Post),
## data = d)
##
## Residuals:
## Min 1Q Median 3Q Max
## -4.0891 -0.7131 -0.0814 0.0929 3.9109
##
## Coefficients:
## Estimate Std. Error t value Pr(>|t|)
## (Intercept) 0.15289 0.03916 3.904 9.99e-05 ***
## pDemR 0.65719 0.05797 11.337 < 2e-16 ***
## pDemI -0.06763 0.07800 -0.867 0.386037
## tDur_Post -0.28623 0.07832 -3.654 0.000269 ***
## pDemR:tDur_Post 0.48023 0.11594 4.142 3.68e-05 ***
## pDemI:tDur_Post 0.29394 0.15599 1.884 0.059762 .
## ---
## Signif. codes: 0 '***' 0.001 '**' 0.01 '*' 0.05 '.' 0.1 ' ' 1
##
## Residual standard error: 0.9194 on 1201 degrees of freedom
## (29 observations deleted due to missingness)
## Multiple R-squared: 0.128, Adjusted R-squared: 0.1244
## F-statistic: 35.27 on 5 and 1201 DF, p-value: < 2.2e-16
# Republicans
vote.party.time.R <- lm(voteLegit ~ (pRepD + pRepI) * (tDur_Post), data = d)
summary(vote.party.time.R)##
## Call:
## lm(formula = voteLegit ~ (pRepD + pRepI) * (tDur_Post), data = d)
##
## Residuals:
## Min 1Q Median 3Q Max
## -3.3664 -0.8664 0.0760 0.6336 2.2146
##
## Coefficients:
## Estimate Std. Error t value Pr(>|t|)
## (Intercept) 2.88953 0.05242 55.126 < 2e-16 ***
## pRepD 1.25569 0.07109 17.662 < 2e-16 ***
## pRepI 0.07774 0.09793 0.794 0.4275
## tDur_Post -0.20827 0.10483 -1.987 0.0472 *
## pRepD:tDur_Post 0.65072 0.14219 4.577 5.22e-06 ***
## pRepI:tDur_Post 0.22422 0.19586 1.145 0.2525
## ---
## Signif. codes: 0 '***' 0.001 '**' 0.01 '*' 0.05 '.' 0.1 ' ' 1
##
## Residual standard error: 1.128 on 1201 degrees of freedom
## (29 observations deleted due to missingness)
## Multiple R-squared: 0.2483, Adjusted R-squared: 0.2452
## F-statistic: 79.36 on 5 and 1201 DF, p-value: < 2.2e-16
# Independents
vote.party.time.I <- lm(voteLegit ~ (pIndD + pIndR) * (tDur_Post), data = d)
summary(vote.party.time.I)##
## Call:
## lm(formula = voteLegit ~ (pIndD + pIndR) * (tDur_Post), data = d)
##
## Residuals:
## Min 1Q Median 3Q Max
## -3.3664 -0.8664 0.0760 0.6336 2.2146
##
## Coefficients:
## Estimate Std. Error t value Pr(>|t|)
## (Intercept) 2.96727 0.08272 35.870 <2e-16 ***
## pIndD 1.17795 0.09565 12.315 <2e-16 ***
## pIndR -0.07774 0.09793 -0.794 0.427
## tDur_Post 0.01595 0.16544 0.096 0.923
## pIndD:tDur_Post 0.42650 0.19131 2.229 0.026 *
## pIndR:tDur_Post -0.22422 0.19586 -1.145 0.253
## ---
## Signif. codes: 0 '***' 0.001 '**' 0.01 '*' 0.05 '.' 0.1 ' ' 1
##
## Residual standard error: 1.128 on 1201 degrees of freedom
## (29 observations deleted due to missingness)
## Multiple R-squared: 0.2483, Adjusted R-squared: 0.2452
## F-statistic: 79.36 on 5 and 1201 DF, p-value: < 2.2e-16
vote.party.time.dur <- lm(Own_Nat_conf_diff ~ (pDem_Rep + pInd_Not) * (tDur), data = d)
summary(vote.party.time.dur)##
## Call:
## lm(formula = Own_Nat_conf_diff ~ (pDem_Rep + pInd_Not) * (tDur),
## data = d)
##
## Residuals:
## Min 1Q Median 3Q Max
## -4.0891 -0.7131 -0.0814 0.0929 3.9109
##
## Coefficients:
## Estimate Std. Error t value Pr(>|t|)
## (Intercept) 0.36490 0.04301 8.483 < 2e-16 ***
## pDem_Rep 0.41708 0.08336 5.004 6.46e-07 ***
## pInd_Not 0.42314 0.10755 3.935 8.81e-05 ***
## tDur -0.02835 0.05908 -0.480 0.631
## pDem_Rep:tDur 0.48023 0.11594 4.142 3.68e-05 ***
## pInd_Not:tDur -0.05383 0.14683 -0.367 0.714
## ---
## Signif. codes: 0 '***' 0.001 '**' 0.01 '*' 0.05 '.' 0.1 ' ' 1
##
## Residual standard error: 0.9194 on 1201 degrees of freedom
## (29 observations deleted due to missingness)
## Multiple R-squared: 0.128, Adjusted R-squared: 0.1244
## F-statistic: 35.27 on 5 and 1201 DF, p-value: < 2.2e-16
vote.party.time.post <- lm(Own_Nat_conf_diff ~ (pDem_Rep + pInd_Not) * (tPost), data = d)
summary(vote.party.time.post)##
## Call:
## lm(formula = Own_Nat_conf_diff ~ (pDem_Rep + pInd_Not) * (tPost),
## data = d)
##
## Residuals:
## Min 1Q Median 3Q Max
## -4.0891 -0.7131 -0.0814 0.0929 3.9109
##
## Coefficients:
## Estimate Std. Error t value Pr(>|t|)
## (Intercept) 0.33655 0.04050 8.310 2.56e-16 ***
## pDem_Rep 0.89731 0.08058 11.135 < 2e-16 ***
## pInd_Not 0.36932 0.09997 3.694 0.00023 ***
## tPost 0.02835 0.05908 0.480 0.63140
## pDem_Rep:tPost -0.48023 0.11594 -4.142 3.68e-05 ***
## pInd_Not:tPost 0.05383 0.14683 0.367 0.71398
## ---
## Signif. codes: 0 '***' 0.001 '**' 0.01 '*' 0.05 '.' 0.1 ' ' 1
##
## Residual standard error: 0.9194 on 1201 degrees of freedom
## (29 observations deleted due to missingness)
## Multiple R-squared: 0.128, Adjusted R-squared: 0.1244
## F-statistic: 35.27 on 5 and 1201 DF, p-value: < 2.2e-16
## vars n mean sd median trimmed mad min max range skew kurtosis se
## X1 1 1209 3.68 1.35 4 3.85 1.48 1 5 4 -0.7 -0.73 0.04
##
## Descriptive statistics by group
## : Democrat
## vars n mean sd median trimmed mad min max range skew kurtosis se
## X1 1 557 4.24 1.01 5 4.4 0 1 5 4 -1.26 0.93 0.04
## ------------------------------------------------------------
## : Republican
## vars n mean sd median trimmed mad min max range skew kurtosis se
## X1 1 463 3.3 1.39 3 3.37 1.48 1 5 4 -0.3 -1.17 0.06
## ------------------------------------------------------------
## : Independent
## vars n mean sd median trimmed mad min max range skew kurtosis se
## X1 1 188 3 1.49 3 3 1.48 1 5 4 -0.06 -1.38 0.11
##
## Descriptive statistics by group
## : Democrat
## : Pre-election
## NULL
## ------------------------------------------------------------
## : Republican
## : Pre-election
## NULL
## ------------------------------------------------------------
## : Independent
## : Pre-election
## NULL
## ------------------------------------------------------------
## : Democrat
## : During-election
## vars n mean sd median trimmed mad min max range skew kurtosis se
## X1 1 250 4.07 1.03 4 4.21 1.48 1 5 4 -0.93 0.21 0.07
## ------------------------------------------------------------
## : Republican
## : During-election
## vars n mean sd median trimmed mad min max range skew kurtosis se
## X1 1 237 3.35 1.34 3 3.43 1.48 1 5 4 -0.29 -1.12 0.09
## ------------------------------------------------------------
## : Independent
## : During-election
## vars n mean sd median trimmed mad min max range skew kurtosis se
## X1 1 86 3 1.36 3 3 1.48 1 5 4 -0.11 -1.18 0.15
## ------------------------------------------------------------
## : Democrat
## : Post-election
## vars n mean sd median trimmed mad min max range skew kurtosis se
## X1 1 307 4.37 0.97 5 4.56 0 1 5 4 -1.6 1.97 0.06
## ------------------------------------------------------------
## : Republican
## : Post-election
## vars n mean sd median trimmed mad min max range skew kurtosis se
## X1 1 226 3.24 1.44 3 3.3 1.48 1 5 4 -0.29 -1.26 0.1
## ------------------------------------------------------------
## : Independent
## : Post-election
## vars n mean sd median trimmed mad min max range skew kurtosis se
## X1 1 102 3 1.59 3 3 2.97 1 5 4 -0.03 -1.55 0.16
## vars n mean sd median trimmed mad min max range skew kurtosis se
## X1 1 1208 3.3 1.43 3 3.37 1.48 1 5 4 -0.28 -1.25 0.04
##
## Descriptive statistics by group
## : Democrat
## vars n mean sd median trimmed mad min max range skew kurtosis se
## X1 1 557 4.1 1.06 4 4.27 1.48 1 5 4 -1.05 0.33 0.04
## ------------------------------------------------------------
## : Republican
## vars n mean sd median trimmed mad min max range skew kurtosis se
## X1 1 463 2.49 1.3 2 2.37 1.48 1 5 4 0.49 -0.91 0.06
## ------------------------------------------------------------
## : Independent
## vars n mean sd median trimmed mad min max range skew kurtosis se
## X1 1 187 2.93 1.41 3 2.91 1.48 1 5 4 -0.01 -1.24 0.1
##
## Descriptive statistics by group
## : Democrat
## : Pre-election
## NULL
## ------------------------------------------------------------
## : Republican
## : Pre-election
## NULL
## ------------------------------------------------------------
## : Independent
## : Pre-election
## NULL
## ------------------------------------------------------------
## : Democrat
## : During-election
## vars n mean sd median trimmed mad min max range skew kurtosis se
## X1 1 250 3.78 1.1 4 3.88 1.48 1 5 4 -0.6 -0.46 0.07
## ------------------------------------------------------------
## : Republican
## : During-election
## vars n mean sd median trimmed mad min max range skew kurtosis se
## X1 1 237 2.64 1.25 2 2.56 1.48 1 5 4 0.31 -0.94 0.08
## ------------------------------------------------------------
## : Independent
## : During-election
## vars n mean sd median trimmed mad min max range skew kurtosis se
## X1 1 86 2.92 1.29 3 2.9 1.48 1 5 4 -0.05 -1 0.14
## ------------------------------------------------------------
## : Democrat
## : Post-election
## vars n mean sd median trimmed mad min max range skew kurtosis se
## X1 1 307 4.36 0.94 5 4.54 0 1 5 4 -1.58 2.12 0.05
## ------------------------------------------------------------
## : Republican
## : Post-election
## vars n mean sd median trimmed mad min max range skew kurtosis se
## X1 1 226 2.33 1.33 2 2.17 1.48 1 5 4 0.69 -0.76 0.09
## ------------------------------------------------------------
## : Independent
## : Post-election
## vars n mean sd median trimmed mad min max range skew kurtosis se
## X1 1 101 2.93 1.51 3 2.91 1.48 1 5 4 0.01 -1.44 0.15
vote.party.time <- lm(Own_Nat_conf_diff ~ (pDem_Rep + pInd_Not) * tDur_Post, data = d)
summary(vote.party.time)##
## Call:
## lm(formula = Own_Nat_conf_diff ~ (pDem_Rep + pInd_Not) * tDur_Post,
## data = d)
##
## Residuals:
## Min 1Q Median 3Q Max
## -4.0891 -0.7131 -0.0814 0.0929 3.9109
##
## Coefficients:
## Estimate Std. Error t value Pr(>|t|)
## (Intercept) 0.35073 0.02954 11.873 < 2e-16 ***
## pDem_Rep 0.65719 0.05797 11.337 < 2e-16 ***
## pInd_Not 0.39623 0.07342 5.397 8.15e-08 ***
## tDur_Post -0.02835 0.05908 -0.480 0.631
## pDem_Rep:tDur_Post 0.48023 0.11594 4.142 3.68e-05 ***
## pInd_Not:tDur_Post -0.05383 0.14683 -0.367 0.714
## ---
## Signif. codes: 0 '***' 0.001 '**' 0.01 '*' 0.05 '.' 0.1 ' ' 1
##
## Residual standard error: 0.9194 on 1201 degrees of freedom
## (29 observations deleted due to missingness)
## Multiple R-squared: 0.128, Adjusted R-squared: 0.1244
## F-statistic: 35.27 on 5 and 1201 DF, p-value: < 2.2e-16
## $ANOVA
## Effect DFn DFd F p p<.05
## 2 party_factor 2 1201 0.7054629 4.940844e-01
## 3 election_timing 1 1201 1.3146046 2.517910e-01
## 5 Vote_Type 1 1201 7.5379086 6.131563e-03 *
## 4 party_factor:election_timing 2 1201 10.7311888 2.402464e-05 *
## 6 party_factor:Vote_Type 2 1201 2.7109894 6.687779e-02
## 7 election_timing:Vote_Type 1 1201 0.2257459 6.347826e-01
## 8 party_factor:election_timing:Vote_Type 2 1201 8.7081367 1.758991e-04 *
## ges
## 2 1.006339e-03
## 3 9.377021e-04
## 5 8.937546e-04
## 4 1.509213e-02
## 6 6.430344e-04
## 7 2.678946e-05
## 8 2.062596e-03
##
## Call:
## lm(formula = overallvote_conf ~ (pDem_Rep + pInd_Not), data = d)
##
## Residuals:
## Min 1Q Median 3Q Max
## -3.09874 -1.09874 -0.09874 0.90126 2.51188
##
## Coefficients:
## Estimate Std. Error t value Pr(>|t|)
## (Intercept) 3.17189 0.03884 81.658 < 2e-16 ***
## pDem_Rep -1.61062 0.07626 -21.121 < 2e-16 ***
## pInd_Not 0.36830 0.09652 3.816 0.000143 ***
## ---
## Signif. codes: 0 '***' 0.001 '**' 0.01 '*' 0.05 '.' 0.1 ' ' 1
##
## Residual standard error: 1.213 on 1204 degrees of freedom
## (29 observations deleted due to missingness)
## Multiple R-squared: 0.2795, Adjusted R-squared: 0.2783
## F-statistic: 233.6 on 2 and 1204 DF, p-value: < 2.2e-16
# ANOVA cmd approach
natvote.party.time <- lm(overallvote_conf ~ (pDem_Rep + pInd_Not) * (tDur_Post), data = d)
summary(natvote.party.time)##
## Call:
## lm(formula = overallvote_conf ~ (pDem_Rep + pInd_Not) * (tDur_Post),
## data = d)
##
## Residuals:
## Min 1Q Median 3Q Max
## -3.3616 -0.7760 0.2240 0.6384 2.6681
##
## Coefficients:
## Estimate Std. Error t value Pr(>|t|)
## (Intercept) 3.16048 0.03836 82.387 < 2e-16 ***
## pDem_Rep -1.58429 0.07528 -21.045 < 2e-16 ***
## pInd_Not 0.35199 0.09534 3.692 0.000233 ***
## tDur_Post 0.09789 0.07672 1.276 0.202258
## pDem_Rep:tDur_Post -0.89084 0.15056 -5.917 4.28e-09 ***
## pInd_Not:tDur_Post 0.12806 0.19068 0.672 0.501983
## ---
## Signif. codes: 0 '***' 0.001 '**' 0.01 '*' 0.05 '.' 0.1 ' ' 1
##
## Residual standard error: 1.194 on 1201 degrees of freedom
## (29 observations deleted due to missingness)
## Multiple R-squared: 0.3032, Adjusted R-squared: 0.3003
## F-statistic: 104.5 on 5 and 1201 DF, p-value: < 2.2e-16
natvote.party.time.c <- lm(overallvote_conf ~ tDur_Post + pDem_Rep + pInd_Not, data = d)
summary(natvote.party.time.c)##
## Call:
## lm(formula = overallvote_conf ~ tDur_Post + pDem_Rep + pInd_Not,
## data = d)
##
## Residuals:
## Min 1Q Median 3Q Max
## -3.1675 -1.0143 -0.0143 0.8325 2.5866
##
## Coefficients:
## Estimate Std. Error t value Pr(>|t|)
## (Intercept) 3.16785 0.03883 81.590 < 2e-16 ***
## tDur_Post 0.15314 0.06990 2.191 0.028661 *
## pDem_Rep -1.60097 0.07626 -20.992 < 2e-16 ***
## pInd_Not 0.37143 0.09638 3.854 0.000122 ***
## ---
## Signif. codes: 0 '***' 0.001 '**' 0.01 '*' 0.05 '.' 0.1 ' ' 1
##
## Residual standard error: 1.211 on 1203 degrees of freedom
## (29 observations deleted due to missingness)
## Multiple R-squared: 0.2824, Adjusted R-squared: 0.2806
## F-statistic: 157.8 on 3 and 1203 DF, p-value: < 2.2e-16
## Analysis of Variance Table
##
## Model 1: overallvote_conf ~ tDur_Post + pDem_Rep + pInd_Not
## Model 2: overallvote_conf ~ (pDem_Rep + pInd_Not) * (tDur_Post)
## Res.Df RSS Df Sum of Sq F Pr(>F)
## 1 1203 1763.2
## 2 1201 1712.2 2 51 17.887 2.214e-08 ***
## ---
## Signif. codes: 0 '***' 0.001 '**' 0.01 '*' 0.05 '.' 0.1 ' ' 1
#Dems
natvote.party.time.D <- lm(overallvote_conf ~ (pDemR + pDemI) * (tDur_Post), data = d)
summary(natvote.party.time.D)##
## Call:
## lm(formula = overallvote_conf ~ (pDemR + pDemI) * (tDur_Post),
## data = d)
##
## Residuals:
## Min 1Q Median 3Q Max
## -3.3616 -0.7760 0.2240 0.6384 2.6681
##
## Coefficients:
## Estimate Std. Error t value Pr(>|t|)
## (Intercept) 4.06878 0.05086 80.003 < 2e-16 ***
## pDemR -1.58429 0.07528 -21.045 < 2e-16 ***
## pDemI -1.14413 0.10129 -11.296 < 2e-16 ***
## tDur_Post 0.58556 0.10172 5.757 1.09e-08 ***
## pDemR:tDur_Post -0.89084 0.15056 -5.917 4.28e-09 ***
## pDemI:tDur_Post -0.57348 0.20258 -2.831 0.00472 **
## ---
## Signif. codes: 0 '***' 0.001 '**' 0.01 '*' 0.05 '.' 0.1 ' ' 1
##
## Residual standard error: 1.194 on 1201 degrees of freedom
## (29 observations deleted due to missingness)
## Multiple R-squared: 0.3032, Adjusted R-squared: 0.3003
## F-statistic: 104.5 on 5 and 1201 DF, p-value: < 2.2e-16
# Reps
natvote.party.time.R <- lm(overallvote_conf ~ (pRepD + pRepI) * (tDur_Post), data = d)
summary(natvote.party.time.R)##
## Call:
## lm(formula = overallvote_conf ~ (pRepD + pRepI) * (tDur_Post),
## data = d)
##
## Residuals:
## Min 1Q Median 3Q Max
## -3.3616 -0.7760 0.2240 0.6384 2.6681
##
## Coefficients:
## Estimate Std. Error t value Pr(>|t|)
## (Intercept) 2.48449 0.05551 44.761 < 2e-16 ***
## pRepD 1.58429 0.07528 21.045 < 2e-16 ***
## pRepI 0.44015 0.10370 4.244 2.36e-05 ***
## tDur_Post -0.30527 0.11101 -2.750 0.00605 **
## pRepD:tDur_Post 0.89084 0.15056 5.917 4.28e-09 ***
## pRepI:tDur_Post 0.31736 0.20740 1.530 0.12624
## ---
## Signif. codes: 0 '***' 0.001 '**' 0.01 '*' 0.05 '.' 0.1 ' ' 1
##
## Residual standard error: 1.194 on 1201 degrees of freedom
## (29 observations deleted due to missingness)
## Multiple R-squared: 0.3032, Adjusted R-squared: 0.3003
## F-statistic: 104.5 on 5 and 1201 DF, p-value: < 2.2e-16
# Inds
natvote.party.time.I <- lm(overallvote_conf ~ (pIndD + pIndR) * (tDur_Post), data = d)
summary(natvote.party.time.I)##
## Call:
## lm(formula = overallvote_conf ~ (pIndD + pIndR) * (tDur_Post),
## data = d)
##
## Residuals:
## Min 1Q Median 3Q Max
## -3.3616 -0.7760 0.2240 0.6384 2.6681
##
## Coefficients:
## Estimate Std. Error t value Pr(>|t|)
## (Intercept) 2.92465 0.08760 33.388 < 2e-16 ***
## pIndD 1.14413 0.10129 11.296 < 2e-16 ***
## pIndR -0.44015 0.10370 -4.244 2.36e-05 ***
## tDur_Post 0.01209 0.17519 0.069 0.94500
## pIndD:tDur_Post 0.57348 0.20258 2.831 0.00472 **
## pIndR:tDur_Post -0.31736 0.20740 -1.530 0.12624
## ---
## Signif. codes: 0 '***' 0.001 '**' 0.01 '*' 0.05 '.' 0.1 ' ' 1
##
## Residual standard error: 1.194 on 1201 degrees of freedom
## (29 observations deleted due to missingness)
## Multiple R-squared: 0.3032, Adjusted R-squared: 0.3003
## F-statistic: 104.5 on 5 and 1201 DF, p-value: < 2.2e-16
##
## Call:
## lm(formula = ownvote_conf ~ (pDem_Rep + pInd_Not), data = d)
##
## Residuals:
## Min 1Q Median 3Q Max
## -3.2370 -1.2370 0.7041 0.7630 2.0000
##
## Coefficients:
## Estimate Std. Error t value Pr(>|t|)
## (Intercept) 3.51351 0.03982 88.243 < 2e-16 ***
## pDem_Rep -0.94109 0.07829 -12.021 < 2e-16 ***
## pInd_Not 0.76644 0.09887 7.752 1.91e-14 ***
## ---
## Signif. codes: 0 '***' 0.001 '**' 0.01 '*' 0.05 '.' 0.1 ' ' 1
##
## Residual standard error: 1.245 on 1205 degrees of freedom
## (28 observations deleted due to missingness)
## Multiple R-squared: 0.1494, Adjusted R-squared: 0.148
## F-statistic: 105.8 on 2 and 1205 DF, p-value: < 2.2e-16
ownvote.party.time <- lm(ownvote_conf ~ (pDem_Rep + pInd_Not) * (tDur_Post), data = d)
summary(ownvote.party.time)##
## Call:
## lm(formula = ownvote_conf ~ (pDem_Rep + pInd_Not) * (tDur_Post),
## data = d)
##
## Residuals:
## Min 1Q Median 3Q Max
## -3.3713 -1.0720 0.6287 0.9280 2.0000
##
## Coefficients:
## Estimate Std. Error t value Pr(>|t|)
## (Intercept) 3.50794 0.03984 88.040 < 2e-16 ***
## pDem_Rep -0.92709 0.07829 -11.841 < 2e-16 ***
## pInd_Not 0.75812 0.09896 7.661 3.79e-14 ***
## tDur_Post 0.06300 0.07969 0.791 0.42934
## pDem_Rep:tDur_Post -0.41061 0.15659 -2.622 0.00885 **
## pInd_Not:tDur_Post 0.09403 0.19793 0.475 0.63482
## ---
## Signif. codes: 0 '***' 0.001 '**' 0.01 '*' 0.05 '.' 0.1 ' ' 1
##
## Residual standard error: 1.242 on 1202 degrees of freedom
## (28 observations deleted due to missingness)
## Multiple R-squared: 0.1557, Adjusted R-squared: 0.1522
## F-statistic: 44.33 on 5 and 1202 DF, p-value: < 2.2e-16
ownvote.party.time.c <- lm(ownvote_conf ~ tDur_Post + pDem_Rep + pInd_Not, data = d)
summary(ownvote.party.time.c)##
## Call:
## lm(formula = ownvote_conf ~ tDur_Post + pDem_Rep + pInd_Not,
## data = d)
##
## Residuals:
## Min 1Q Median 3Q Max
## -3.2794 -1.1849 0.6557 0.8151 2.0513
##
## Coefficients:
## Estimate Std. Error t value Pr(>|t|)
## (Intercept) 3.51094 0.03985 88.099 < 2e-16 ***
## tDur_Post 0.09454 0.07183 1.316 0.188
## pDem_Rep -0.93513 0.07839 -11.929 < 2e-16 ***
## pInd_Not 0.76861 0.09885 7.776 1.6e-14 ***
## ---
## Signif. codes: 0 '***' 0.001 '**' 0.01 '*' 0.05 '.' 0.1 ' ' 1
##
## Residual standard error: 1.244 on 1204 degrees of freedom
## (28 observations deleted due to missingness)
## Multiple R-squared: 0.1506, Adjusted R-squared: 0.1485
## F-statistic: 71.18 on 3 and 1204 DF, p-value: < 2.2e-16
## Analysis of Variance Table
##
## Model 1: ownvote_conf ~ tDur_Post + pDem_Rep + pInd_Not
## Model 2: ownvote_conf ~ (pDem_Rep + pInd_Not) * (tDur_Post)
## Res.Df RSS Df Sum of Sq F Pr(>F)
## 1 1204 1864.5
## 2 1202 1853.4 2 11.097 3.5982 0.02767 *
## ---
## Signif. codes: 0 '***' 0.001 '**' 0.01 '*' 0.05 '.' 0.1 ' ' 1
#Dems
ownvote.party.time.D <- lm(ownvote_conf ~ (pDemR + pDemI) * (tDur_Post), data = d)
summary(ownvote.party.time.D)##
## Call:
## lm(formula = ownvote_conf ~ (pDemR + pDemI) * (tDur_Post), data = d)
##
## Residuals:
## Min 1Q Median 3Q Max
## -3.3713 -1.0720 0.6287 0.9280 2.0000
##
## Coefficients:
## Estimate Std. Error t value Pr(>|t|)
## (Intercept) 4.22167 0.05289 79.817 < 2e-16 ***
## pDemR -0.92709 0.07829 -11.841 < 2e-16 ***
## pDemI -1.22167 0.10516 -11.617 < 2e-16 ***
## tDur_Post 0.29934 0.10578 2.830 0.00474 **
## pDemR:tDur_Post -0.41061 0.15659 -2.622 0.00885 **
## pDemI:tDur_Post -0.29934 0.21033 -1.423 0.15494
## ---
## Signif. codes: 0 '***' 0.001 '**' 0.01 '*' 0.05 '.' 0.1 ' ' 1
##
## Residual standard error: 1.242 on 1202 degrees of freedom
## (28 observations deleted due to missingness)
## Multiple R-squared: 0.1557, Adjusted R-squared: 0.1522
## F-statistic: 44.33 on 5 and 1202 DF, p-value: < 2.2e-16
# Reps
ownvote.party.time.R <- lm(ownvote_conf ~ (pRepD + pRepI) * (tDur_Post), data = d)
summary(ownvote.party.time.R)##
## Call:
## lm(formula = ownvote_conf ~ (pRepD + pRepI) * (tDur_Post), data = d)
##
## Residuals:
## Min 1Q Median 3Q Max
## -3.3713 -1.0720 0.6287 0.9280 2.0000
##
## Coefficients:
## Estimate Std. Error t value Pr(>|t|)
## (Intercept) 3.29457 0.05773 57.074 < 2e-16 ***
## pRepD 0.92709 0.07829 11.841 < 2e-16 ***
## pRepI -0.29457 0.10767 -2.736 0.00631 **
## tDur_Post -0.11127 0.11545 -0.964 0.33533
## pRepD:tDur_Post 0.41061 0.15659 2.622 0.00885 **
## pRepI:tDur_Post 0.11127 0.21535 0.517 0.60545
## ---
## Signif. codes: 0 '***' 0.001 '**' 0.01 '*' 0.05 '.' 0.1 ' ' 1
##
## Residual standard error: 1.242 on 1202 degrees of freedom
## (28 observations deleted due to missingness)
## Multiple R-squared: 0.1557, Adjusted R-squared: 0.1522
## F-statistic: 44.33 on 5 and 1202 DF, p-value: < 2.2e-16
# Inds
ownvote.party.time.I <- lm(ownvote_conf ~ (pIndD + pIndR) * (tDur_Post), data = d)
summary(ownvote.party.time.I)##
## Call:
## lm(formula = ownvote_conf ~ (pIndD + pIndR) * (tDur_Post), data = d)
##
## Residuals:
## Min 1Q Median 3Q Max
## -3.3713 -1.0720 0.6287 0.9280 2.0000
##
## Coefficients:
## Estimate Std. Error t value Pr(>|t|)
## (Intercept) 3.000e+00 9.089e-02 33.006 < 2e-16 ***
## pIndD 1.222e+00 1.052e-01 11.617 < 2e-16 ***
## pIndR 2.946e-01 1.077e-01 2.736 0.00631 **
## tDur_Post 2.563e-16 1.818e-01 0.000 1.00000
## pIndD:tDur_Post 2.993e-01 2.103e-01 1.423 0.15494
## pIndR:tDur_Post -1.113e-01 2.153e-01 -0.517 0.60545
## ---
## Signif. codes: 0 '***' 0.001 '**' 0.01 '*' 0.05 '.' 0.1 ' ' 1
##
## Residual standard error: 1.242 on 1202 degrees of freedom
## (28 observations deleted due to missingness)
## Multiple R-squared: 0.1557, Adjusted R-squared: 0.1522
## F-statistic: 44.33 on 5 and 1202 DF, p-value: < 2.2e-16
##
## Call:
## lm(formula = ownvote_conf ~ (pDem_Rep + pInd_Not) * (tDur_Post),
## data = d)
##
## Residuals:
## Min 1Q Median 3Q Max
## -3.3713 -1.0720 0.6287 0.9280 2.0000
##
## Coefficients:
## Estimate Std. Error t value Pr(>|t|)
## (Intercept) 3.50794 0.03984 88.040 < 2e-16 ***
## pDem_Rep -0.92709 0.07829 -11.841 < 2e-16 ***
## pInd_Not 0.75812 0.09896 7.661 3.79e-14 ***
## tDur_Post 0.06300 0.07969 0.791 0.42934
## pDem_Rep:tDur_Post -0.41061 0.15659 -2.622 0.00885 **
## pInd_Not:tDur_Post 0.09403 0.19793 0.475 0.63482
## ---
## Signif. codes: 0 '***' 0.001 '**' 0.01 '*' 0.05 '.' 0.1 ' ' 1
##
## Residual standard error: 1.242 on 1202 degrees of freedom
## (28 observations deleted due to missingness)
## Multiple R-squared: 0.1557, Adjusted R-squared: 0.1522
## F-statistic: 44.33 on 5 and 1202 DF, p-value: < 2.2e-16
##
## Call:
## lm(formula = overallvote_conf ~ (pDem_Rep + pInd_Not) * (tDur_Post),
## data = d)
##
## Residuals:
## Min 1Q Median 3Q Max
## -3.3616 -0.7760 0.2240 0.6384 2.6681
##
## Coefficients:
## Estimate Std. Error t value Pr(>|t|)
## (Intercept) 3.16048 0.03836 82.387 < 2e-16 ***
## pDem_Rep -1.58429 0.07528 -21.045 < 2e-16 ***
## pInd_Not 0.35199 0.09534 3.692 0.000233 ***
## tDur_Post 0.09789 0.07672 1.276 0.202258
## pDem_Rep:tDur_Post -0.89084 0.15056 -5.917 4.28e-09 ***
## pInd_Not:tDur_Post 0.12806 0.19068 0.672 0.501983
## ---
## Signif. codes: 0 '***' 0.001 '**' 0.01 '*' 0.05 '.' 0.1 ' ' 1
##
## Residual standard error: 1.194 on 1201 degrees of freedom
## (29 observations deleted due to missingness)
## Multiple R-squared: 0.3032, Adjusted R-squared: 0.3003
## F-statistic: 104.5 on 5 and 1201 DF, p-value: < 2.2e-16
##
## Descriptive statistics by group
## group: Democrat
## vars n mean sd median trimmed mad min max range skew kurtosis se
## X1 1 559 2.97 1.54 2.71 2.84 1.91 1 7 6 0.57 -0.58 0.07
## ------------------------------------------------------------
## group: Republican
## vars n mean sd median trimmed mad min max range skew kurtosis se
## X1 1 464 3.06 1.45 2.86 2.97 1.69 1 7 6 0.47 -0.58 0.07
## ------------------------------------------------------------
## group: Independent
## vars n mean sd median trimmed mad min max range skew kurtosis se
## X1 1 191 2.55 1.47 2.14 2.38 1.69 1 7 6 0.74 -0.44 0.11
##
## Descriptive statistics by group
## : Democrat
## : Pre-election
## NULL
## ------------------------------------------------------------
## : Republican
## : Pre-election
## NULL
## ------------------------------------------------------------
## : Independent
## : Pre-election
## NULL
## ------------------------------------------------------------
## : Democrat
## : During-election
## vars n mean sd median trimmed mad min max range skew kurtosis se
## X1 1 251 3.34 1.58 3.14 3.26 1.91 1 7 6 0.32 -0.93 0.1
## ------------------------------------------------------------
## : Republican
## : During-election
## vars n mean sd median trimmed mad min max range skew kurtosis se
## X1 1 238 2.93 1.38 2.86 2.83 1.48 1 7 6 0.57 -0.28 0.09
## ------------------------------------------------------------
## : Independent
## : During-election
## vars n mean sd median trimmed mad min max range skew kurtosis se
## X1 1 87 2.6 1.52 2.29 2.44 1.91 1 6.86 5.86 0.64 -0.63 0.16
## ------------------------------------------------------------
## : Democrat
## : Post-election
## vars n mean sd median trimmed mad min max range skew kurtosis se
## X1 1 308 2.67 1.44 2.43 2.51 1.69 1 7 6 0.81 -0.04 0.08
## ------------------------------------------------------------
## : Republican
## : Post-election
## vars n mean sd median trimmed mad min max range skew kurtosis se
## X1 1 226 3.2 1.5 3 3.13 1.69 1 7 6 0.35 -0.84 0.1
## ------------------------------------------------------------
## : Independent
## : Post-election
## vars n mean sd median trimmed mad min max range skew kurtosis se
## X1 1 104 2.51 1.44 1.86 2.34 1.27 1 7 6 0.81 -0.32 0.14
##
## Call:
## lm(formula = negative ~ (pDem_Rep + pInd_Not) * (tDur_Post),
## data = d)
##
## Residuals:
## Min 1Q Median 3Q Max
## -2.3364 -1.2387 -0.2119 1.0738 4.4915
##
## Coefficients:
## Estimate Std. Error t value Pr(>|t|)
## (Intercept) 2.87543 0.04721 60.914 < 2e-16 ***
## pDem_Rep 0.05787 0.09308 0.622 0.534
## pInd_Not 0.47866 0.11705 4.090 4.61e-05 ***
## tDur_Post -0.16169 0.09441 -1.713 0.087 .
## pDem_Rep:tDur_Post 0.93614 0.18616 5.029 5.69e-07 ***
## pInd_Not:tDur_Post -0.10324 0.23409 -0.441 0.659
## ---
## Signif. codes: 0 '***' 0.001 '**' 0.01 '*' 0.05 '.' 0.1 ' ' 1
##
## Residual standard error: 1.478 on 1208 degrees of freedom
## (22 observations deleted due to missingness)
## Multiple R-squared: 0.03859, Adjusted R-squared: 0.03461
## F-statistic: 9.698 on 5 and 1208 DF, p-value: 4.284e-09
##
## Call:
## lm(formula = negative ~ (pDem_Rep + pInd_Not) + (tDur_Post),
## data = d)
##
## Residuals:
## Min 1Q Median 3Q Max
## -2.1632 -1.3053 -0.2315 1.0511 4.5470
##
## Coefficients:
## Estimate Std. Error t value Pr(>|t|)
## (Intercept) 2.86743 0.04756 60.287 < 2e-16 ***
## pDem_Rep 0.07450 0.09391 0.793 0.427736
## pInd_Not 0.45864 0.11776 3.895 0.000104 ***
## tDur_Post -0.21427 0.08595 -2.493 0.012808 *
## ---
## Signif. codes: 0 '***' 0.001 '**' 0.01 '*' 0.05 '.' 0.1 ' ' 1
##
## Residual standard error: 1.493 on 1210 degrees of freedom
## (22 observations deleted due to missingness)
## Multiple R-squared: 0.01816, Adjusted R-squared: 0.01573
## F-statistic: 7.461 on 3 and 1210 DF, p-value: 5.961e-05
## Analysis of Variance Table
##
## Model 1: negative ~ (pDem_Rep + pInd_Not) + (tDur_Post)
## Model 2: negative ~ (pDem_Rep + pInd_Not) * (tDur_Post)
## Res.Df RSS Df Sum of Sq F Pr(>F)
## 1 1210 2696.2
## 2 1208 2640.1 2 56.098 12.834 3.051e-06 ***
## ---
## Signif. codes: 0 '***' 0.001 '**' 0.01 '*' 0.05 '.' 0.1 ' ' 1
##
## Call:
## lm(formula = negative ~ (pDemR + pDemI) * (tDur_Post), data = d)
##
## Residuals:
## Min 1Q Median 3Q Max
## -2.3364 -1.2387 -0.2119 1.0738 4.4915
##
## Coefficients:
## Estimate Std. Error t value Pr(>|t|)
## (Intercept) 3.00446 0.06285 47.800 < 2e-16 ***
## pDemR 0.05787 0.09308 0.622 0.534232
## pDemI -0.44973 0.12444 -3.614 0.000314 ***
## tDur_Post -0.66383 0.12571 -5.281 1.53e-07 ***
## pDemR:tDur_Post 0.93614 0.18616 5.029 5.69e-07 ***
## pDemI:tDur_Post 0.57131 0.24887 2.296 0.021869 *
## ---
## Signif. codes: 0 '***' 0.001 '**' 0.01 '*' 0.05 '.' 0.1 ' ' 1
##
## Residual standard error: 1.478 on 1208 degrees of freedom
## (22 observations deleted due to missingness)
## Multiple R-squared: 0.03859, Adjusted R-squared: 0.03461
## F-statistic: 9.698 on 5 and 1208 DF, p-value: 4.284e-09
##
## Call:
## lm(formula = negative ~ (pRepD + pRepI) * (tDur_Post), data = d)
##
## Residuals:
## Min 1Q Median 3Q Max
## -2.3364 -1.2387 -0.2119 1.0738 4.4915
##
## Coefficients:
## Estimate Std. Error t value Pr(>|t|)
## (Intercept) 3.06233 0.06865 44.606 < 2e-16 ***
## pRepD -0.05787 0.09308 -0.622 0.5342
## pRepI -0.50760 0.12746 -3.982 7.23e-05 ***
## tDur_Post 0.27231 0.13731 1.983 0.0476 *
## pRepD:tDur_Post -0.93614 0.18616 -5.029 5.69e-07 ***
## pRepI:tDur_Post -0.36483 0.25493 -1.431 0.1527
## ---
## Signif. codes: 0 '***' 0.001 '**' 0.01 '*' 0.05 '.' 0.1 ' ' 1
##
## Residual standard error: 1.478 on 1208 degrees of freedom
## (22 observations deleted due to missingness)
## Multiple R-squared: 0.03859, Adjusted R-squared: 0.03461
## F-statistic: 9.698 on 5 and 1208 DF, p-value: 4.284e-09
##
## Call:
## lm(formula = negative ~ (pIndR + pIndD) * (tDur_Post), data = d)
##
## Residuals:
## Min 1Q Median 3Q Max
## -2.3364 -1.2387 -0.2119 1.0738 4.4915
##
## Coefficients:
## Estimate Std. Error t value Pr(>|t|)
## (Intercept) 2.55473 0.10739 23.788 < 2e-16 ***
## pIndR 0.50760 0.12746 3.982 7.23e-05 ***
## pIndD 0.44973 0.12444 3.614 0.000314 ***
## tDur_Post -0.09251 0.21479 -0.431 0.666747
## pIndR:tDur_Post 0.36483 0.25493 1.431 0.152658
## pIndD:tDur_Post -0.57131 0.24887 -2.296 0.021869 *
## ---
## Signif. codes: 0 '***' 0.001 '**' 0.01 '*' 0.05 '.' 0.1 ' ' 1
##
## Residual standard error: 1.478 on 1208 degrees of freedom
## (22 observations deleted due to missingness)
## Multiple R-squared: 0.03859, Adjusted R-squared: 0.03461
## F-statistic: 9.698 on 5 and 1208 DF, p-value: 4.284e-09
##
## Descriptive statistics by group
## group: Democrat
## vars n mean sd median trimmed mad min max range skew kurtosis se
## X1 1 559 3.97 1.83 4 3.95 2.37 1 7 6 0.1 -1.13 0.08
## ------------------------------------------------------------
## group: Republican
## vars n mean sd median trimmed mad min max range skew kurtosis se
## X1 1 464 2.88 1.69 2.4 2.7 1.78 1 7 6 0.68 -0.56 0.08
## ------------------------------------------------------------
## group: Independent
## vars n mean sd median trimmed mad min max range skew kurtosis se
## X1 1 191 2.34 1.52 1.8 2.11 1.19 1 7 6 1.02 0.23 0.11
##
## Descriptive statistics by group
## : Democrat
## : Pre-election
## NULL
## ------------------------------------------------------------
## : Republican
## : Pre-election
## NULL
## ------------------------------------------------------------
## : Independent
## : Pre-election
## NULL
## ------------------------------------------------------------
## : Democrat
## : During-election
## vars n mean sd median trimmed mad min max range skew kurtosis se
## X1 1 251 3.26 1.62 3 3.14 1.78 1 7 6 0.52 -0.62 0.1
## ------------------------------------------------------------
## : Republican
## : During-election
## vars n mean sd median trimmed mad min max range skew kurtosis se
## X1 1 238 3.14 1.64 3 3.03 1.78 1 7 6 0.43 -0.79 0.11
## ------------------------------------------------------------
## : Independent
## : During-election
## vars n mean sd median trimmed mad min max range skew kurtosis se
## X1 1 87 2.4 1.43 1.8 2.24 1.19 1 6.2 5.2 0.74 -0.6 0.15
## ------------------------------------------------------------
## : Democrat
## : Post-election
## vars n mean sd median trimmed mad min max range skew kurtosis se
## X1 1 308 4.55 1.78 4.8 4.64 2.08 1 7 6 -0.27 -1.01 0.1
## ------------------------------------------------------------
## : Republican
## : Post-election
## vars n mean sd median trimmed mad min max range skew kurtosis se
## X1 1 226 2.61 1.71 2 2.36 1.48 1 7 6 1 -0.04 0.11
## ------------------------------------------------------------
## : Independent
## : Post-election
## vars n mean sd median trimmed mad min max range skew kurtosis se
## X1 1 104 2.28 1.6 1.5 2.01 0.74 1 7 6 1.2 0.67 0.16
##
## Call:
## lm(formula = positive ~ (pDem_Rep + pInd_Not) * (tDur_Post),
## data = d)
##
## Residuals:
## Min 1Q Median 3Q Max
## -3.5545 -1.2846 -0.2846 1.2455 4.7154
##
## Coefficients:
## Estimate Std. Error t value Pr(>|t|)
## (Intercept) 3.04482 0.05329 57.135 < 2e-16 ***
## pDem_Rep -1.03139 0.10508 -9.815 < 2e-16 ***
## pInd_Not 1.04681 0.13214 7.922 5.26e-15 ***
## tDur_Post 0.21709 0.10658 2.037 0.0419 *
## pDem_Rep:tDur_Post -1.83039 0.21016 -8.709 < 2e-16 ***
## pInd_Not:tDur_Post 0.49966 0.26427 1.891 0.0589 .
## ---
## Signif. codes: 0 '***' 0.001 '**' 0.01 '*' 0.05 '.' 0.1 ' ' 1
##
## Residual standard error: 1.669 on 1208 degrees of freedom
## (22 observations deleted due to missingness)
## Multiple R-squared: 0.1876, Adjusted R-squared: 0.1842
## F-statistic: 55.78 on 5 and 1208 DF, p-value: < 2.2e-16
##
## Call:
## lm(formula = positive ~ (pDem_Rep + pInd_Not) + (tDur_Post),
## data = d)
##
## Residuals:
## Min 1Q Median 3Q Max
## -3.1389 -1.5006 -0.3006 1.2994 4.4926
##
## Coefficients:
## Estimate Std. Error t value Pr(>|t|)
## (Intercept) 3.05737 0.05488 55.710 < 2e-16 ***
## pDem_Rep -1.06689 0.10835 -9.846 < 2e-16 ***
## pInd_Not 1.09802 0.13588 8.081 1.54e-15 ***
## tDur_Post 0.37139 0.09918 3.745 0.000189 ***
## ---
## Signif. codes: 0 '***' 0.001 '**' 0.01 '*' 0.05 '.' 0.1 ' ' 1
##
## Residual standard error: 1.722 on 1210 degrees of freedom
## (22 observations deleted due to missingness)
## Multiple R-squared: 0.1333, Adjusted R-squared: 0.1312
## F-statistic: 62.03 on 3 and 1210 DF, p-value: < 2.2e-16
## Analysis of Variance Table
##
## Model 1: positive ~ (pDem_Rep + pInd_Not) + (tDur_Post)
## Model 2: positive ~ (pDem_Rep + pInd_Not) * (tDur_Post)
## Res.Df RSS Df Sum of Sq F Pr(>F)
## 1 1210 3589.4
## 2 1208 3364.7 2 224.72 40.34 < 2.2e-16 ***
## ---
## Signif. codes: 0 '***' 0.001 '**' 0.01 '*' 0.05 '.' 0.1 ' ' 1
##
## Call:
## lm(formula = positive ~ (pDemR + pDemI) * (tDur_Post), data = d)
##
## Residuals:
## Min 1Q Median 3Q Max
## -3.5545 -1.2846 -0.2846 1.2455 4.7154
##
## Coefficients:
## Estimate Std. Error t value Pr(>|t|)
## (Intercept) 3.90596 0.07096 55.046 < 2e-16 ***
## pDemR -1.03139 0.10508 -9.815 < 2e-16 ***
## pDemI -1.56250 0.14048 -11.123 < 2e-16 ***
## tDur_Post 1.29717 0.14192 9.140 < 2e-16 ***
## pDemR:tDur_Post -1.83039 0.21016 -8.709 < 2e-16 ***
## pDemI:tDur_Post -1.41486 0.28096 -5.036 5.48e-07 ***
## ---
## Signif. codes: 0 '***' 0.001 '**' 0.01 '*' 0.05 '.' 0.1 ' ' 1
##
## Residual standard error: 1.669 on 1208 degrees of freedom
## (22 observations deleted due to missingness)
## Multiple R-squared: 0.1876, Adjusted R-squared: 0.1842
## F-statistic: 55.78 on 5 and 1208 DF, p-value: < 2.2e-16
##
## Call:
## lm(formula = positive ~ (pRepD + pRepI) * (tDur_Post), data = d)
##
## Residuals:
## Min 1Q Median 3Q Max
## -3.5545 -1.2846 -0.2846 1.2455 4.7154
##
## Coefficients:
## Estimate Std. Error t value Pr(>|t|)
## (Intercept) 2.8746 0.0775 37.089 < 2e-16 ***
## pRepD 1.0314 0.1051 9.815 < 2e-16 ***
## pRepI -0.5311 0.1439 -3.691 0.000233 ***
## tDur_Post -0.5332 0.1550 -3.440 0.000602 ***
## pRepD:tDur_Post 1.8304 0.2102 8.709 < 2e-16 ***
## pRepI:tDur_Post 0.4155 0.2878 1.444 0.149044
## ---
## Signif. codes: 0 '***' 0.001 '**' 0.01 '*' 0.05 '.' 0.1 ' ' 1
##
## Residual standard error: 1.669 on 1208 degrees of freedom
## (22 observations deleted due to missingness)
## Multiple R-squared: 0.1876, Adjusted R-squared: 0.1842
## F-statistic: 55.78 on 5 and 1208 DF, p-value: < 2.2e-16
##
## Call:
## lm(formula = positive ~ (pIndR + pIndD) * (tDur_Post), data = d)
##
## Residuals:
## Min 1Q Median 3Q Max
## -3.5545 -1.2846 -0.2846 1.2455 4.7154
##
## Coefficients:
## Estimate Std. Error t value Pr(>|t|)
## (Intercept) 2.3435 0.1212 19.329 < 2e-16 ***
## pIndR 0.5311 0.1439 3.691 0.000233 ***
## pIndD 1.5625 0.1405 11.123 < 2e-16 ***
## tDur_Post -0.1177 0.2425 -0.485 0.627532
## pIndR:tDur_Post -0.4155 0.2878 -1.444 0.149044
## pIndD:tDur_Post 1.4149 0.2810 5.036 5.48e-07 ***
## ---
## Signif. codes: 0 '***' 0.001 '**' 0.01 '*' 0.05 '.' 0.1 ' ' 1
##
## Residual standard error: 1.669 on 1208 degrees of freedom
## (22 observations deleted due to missingness)
## Multiple R-squared: 0.1876, Adjusted R-squared: 0.1842
## F-statistic: 55.78 on 5 and 1208 DF, p-value: < 2.2e-16
##
## Descriptive statistics by group
## group: Democrat
## vars n mean sd median trimmed mad min max range skew kurtosis se
## X1 1 558 2.89 0.66 2.86 2.86 0.58 1 5 4 0.37 0.6 0.03
## ------------------------------------------------------------
## group: Republican
## vars n mean sd median trimmed mad min max range skew kurtosis se
## X1 1 464 1.99 0.84 1.86 1.9 0.9 1 5 4 0.94 0.62 0.04
## ------------------------------------------------------------
## group: Independent
## vars n mean sd median trimmed mad min max range skew kurtosis se
## X1 1 190 2.35 0.79 2.3 2.31 0.5 1 5 4 0.64 0.96 0.06
##
## Descriptive statistics by group
## group: Democrat
## vars n mean sd median trimmed mad min max range skew kurtosis se
## X1 1 558 1.97 1.1 1.5 1.8 0.74 1 5 4 1.01 0.07 0.05
## ------------------------------------------------------------
## group: Republican
## vars n mean sd median trimmed mad min max range skew kurtosis se
## X1 1 464 2.96 1.28 3 2.95 1.48 1 5 4 0.04 -1.24 0.06
## ------------------------------------------------------------
## group: Independent
## vars n mean sd median trimmed mad min max range skew kurtosis se
## X1 1 190 2.16 0.97 2 2.06 0.74 1 5 4 0.73 0.02 0.07
d$Other_minus_Fox_perc <- NA
d$Other_minus_Fox_perc <- d$otherMediaPerception - d$foxPerception
percept <- lm(Other_minus_Fox_perc ~ (pDem_Rep + pInd_Not), data = d)
summary(percept)##
## Call:
## lm(formula = Other_minus_Fox_perc ~ (pDem_Rep + pInd_Not), data = d)
##
## Residuals:
## Min 1Q Median 3Q Max
## -4.1343 -0.8499 0.1214 0.9372 3.9316
##
## Coefficients:
## Estimate Std. Error t value Pr(>|t|)
## (Intercept) 0.04827 0.03943 1.224 0.221
## pDem_Rep -1.88730 0.07772 -24.285 <2e-16 ***
## pInd_Not -0.21804 0.09779 -2.230 0.026 *
## ---
## Signif. codes: 0 '***' 0.001 '**' 0.01 '*' 0.05 '.' 0.1 ' ' 1
##
## Residual standard error: 1.237 on 1209 degrees of freedom
## (24 observations deleted due to missingness)
## Multiple R-squared: 0.3285, Adjusted R-squared: 0.3274
## F-statistic: 295.8 on 2 and 1209 DF, p-value: < 2.2e-16
perception.m1 <- lm(voteLegit ~ pDem_Rep + pInd_Not + otherMediaPerception + foxPerception, data = d)
summary(perception.m1)##
## Call:
## lm(formula = voteLegit ~ pDem_Rep + pInd_Not + otherMediaPerception +
## foxPerception, data = d)
##
## Residuals:
## Min 1Q Median 3Q Max
## -3.3653 -0.7999 0.1392 0.7739 2.8750
##
## Coefficients:
## Estimate Std. Error t value Pr(>|t|)
## (Intercept) 2.40004 0.11331 21.181 < 2e-16 ***
## pDem_Rep -0.68869 0.08439 -8.161 8.34e-16 ***
## pInd_Not 0.56222 0.08568 6.562 7.89e-11 ***
## otherMediaPerception 0.51439 0.04189 12.278 < 2e-16 ***
## foxPerception -0.12612 0.02736 -4.609 4.47e-06 ***
## ---
## Signif. codes: 0 '***' 0.001 '**' 0.01 '*' 0.05 '.' 0.1 ' ' 1
##
## Residual standard error: 1.072 on 1202 degrees of freedom
## (29 observations deleted due to missingness)
## Multiple R-squared: 0.3202, Adjusted R-squared: 0.318
## F-statistic: 141.6 on 4 and 1202 DF, p-value: < 2.2e-16
##
## Call:
## lm(formula = voteLegit ~ pDem_Rep + pInd_Not + otherMediaPerception +
## foxPerception, data = d)
##
## Standardized Coefficients::
## (Intercept) pDem_Rep pInd_Not
## 0.0000000 -0.2431231 0.1568096
## otherMediaPerception foxPerception
## 0.3408677 -0.1207183
##
## Call:
## lm(formula = voteLegit ~ pDem_Rep + pInd_Not, data = d)
##
## Residuals:
## Min 1Q Median 3Q Max
## -3.1679 -0.8920 0.1080 0.8321 2.1080
##
## Coefficients:
## Estimate Std. Error t value Pr(>|t|)
## (Intercept) 3.34447 0.03645 91.749 < 2e-16 ***
## pDem_Rep -1.27585 0.07156 -17.828 < 2e-16 ***
## pInd_Not 0.56202 0.09058 6.205 7.52e-10 ***
## ---
## Signif. codes: 0 '***' 0.001 '**' 0.01 '*' 0.05 '.' 0.1 ' ' 1
##
## Residual standard error: 1.138 on 1204 degrees of freedom
## (29 observations deleted due to missingness)
## Multiple R-squared: 0.2326, Adjusted R-squared: 0.2313
## F-statistic: 182.4 on 2 and 1204 DF, p-value: < 2.2e-16
##
## Call:
## lm(formula = voteLegit ~ pDem_Rep + pInd_Not, data = d)
##
## Standardized Coefficients::
## (Intercept) pDem_Rep pInd_Not
## 0.0000000 -0.4504079 0.1567542
## Analysis of Variance Table
##
## Model 1: voteLegit ~ pDem_Rep + pInd_Not
## Model 2: voteLegit ~ pDem_Rep + pInd_Not + otherMediaPerception + foxPerception
## Res.Df RSS Df Sum of Sq F Pr(>F)
## 1 1204 1559.0
## 2 1202 1380.9 2 178.06 77.493 < 2.2e-16 ***
## ---
## Signif. codes: 0 '***' 0.001 '**' 0.01 '*' 0.05 '.' 0.1 ' ' 1
### Prep
mediap <- as.data.frame(cbind(d[d$election_timing != "Pre-election",]$party_factor,
d[d$election_timing != "Pre-election",]$otherMediaPerception,
d[d$election_timing != "Pre-election",]$foxPerception,
d[d$election_timing != "Pre-election",]$s3,
d[d$election_timing != "Pre-election",]$election_timing))
names(mediap) <- c("party_factor", "otherMedia","fox", "s3", "election_timing")
mediap$party_factor <- recode_factor(mediap$party_factor, `1` = "Democrat", `2` = "Republican", `3` = "Independent")
m1 <- tidyr::gather(mediap, media_type, perception, otherMedia:fox, factor_key=TRUE)
## Results
m1 <- na.omit(m1)
media.aov <- ezANOVA(data = m1
, dv = perception
, wid = s3
, within = media_type
, between = .(party_factor)
, type = 3)## Warning: Converting "s3" to factor for ANOVA.
## Warning: Data is unbalanced (unequal N per group). Make sure you specified a
## well-considered value for the type argument to ezANOVA().
## $ANOVA
## Effect DFn DFd F p p<.05 ges
## 2 party_factor 2 1209 5.658348 3.581296e-03 * 0.0055689106
## 3 media_type 1 1209 1.533206 2.158723e-01 0.0005091899
## 4 party_factor:media_type 2 1209 295.776634 2.715111e-105 * 0.1642706941
perception_diff <- lm(voteLegit ~ (pDem_Rep + pInd_Not) * Other_minus_Fox_perc, data = d)
perception_diff.c <- lm(voteLegit ~ (pDem_Rep + pInd_Not) + Other_minus_Fox_perc, data = d)
anova(perception_diff.c, perception_diff)## Analysis of Variance Table
##
## Model 1: voteLegit ~ (pDem_Rep + pInd_Not) + Other_minus_Fox_perc
## Model 2: voteLegit ~ (pDem_Rep + pInd_Not) * Other_minus_Fox_perc
## Res.Df RSS Df Sum of Sq F Pr(>F)
## 1 1203 1466.7
## 2 1201 1443.3 2 23.399 9.7352 6.397e-05 ***
## ---
## Signif. codes: 0 '***' 0.001 '**' 0.01 '*' 0.05 '.' 0.1 ' ' 1
vote.media.party.int <- lm(voteLegit ~ foxPerception.c * otherMediaPerception.c * (pDem_Rep + pInd_Not), data = d)
tab_model(vote.media.party.int)| vote Legit | |||
|---|---|---|---|
| Predictors | Estimates | CI | p |
| (Intercept) | 3.35 | 3.27 – 3.44 | <0.001 |
| foxPerception.c | -0.19 | -0.27 – -0.12 | <0.001 |
| otherMediaPerception.c | 0.37 | 0.27 – 0.47 | <0.001 |
| pDem_Rep | -1.02 | -1.20 – -0.83 | <0.001 |
| pInd_Not | 0.57 | 0.37 – 0.77 | <0.001 |
|
foxPerception.c * otherMediaPerception.c |
-0.01 | -0.07 – 0.06 | 0.823 |
|
foxPerception.c * pDem_Rep |
0.11 | -0.02 – 0.25 | 0.104 |
|
foxPerception.c * pInd_Not |
0.28 | 0.09 – 0.48 | 0.005 |
|
otherMediaPerception.c * pDem_Rep |
0.18 | -0.04 – 0.39 | 0.114 |
|
otherMediaPerception.c * pInd_Not |
-0.28 | -0.51 – -0.05 | 0.018 |
|
(foxPerception.c otherMediaPerception.c) pDem_Rep |
-0.03 | -0.16 – 0.11 | 0.699 |
|
(foxPerception.c otherMediaPerception.c) pInd_Not |
0.00 | -0.16 – 0.16 | 0.971 |
| Observations | 1207 | ||
| R2 / R2 adjusted | 0.282 / 0.276 | ||
vote.party.media <- lm(voteLegit ~ (pDem_Rep + pInd_Not) + foxPerception + otherMediaPerception, data = d)
summary(vote.party.media) ##
## Call:
## lm(formula = voteLegit ~ (pDem_Rep + pInd_Not) + foxPerception +
## otherMediaPerception, data = d)
##
## Residuals:
## Min 1Q Median 3Q Max
## -3.3653 -0.7999 0.1392 0.7739 2.8750
##
## Coefficients:
## Estimate Std. Error t value Pr(>|t|)
## (Intercept) 2.40004 0.11331 21.181 < 2e-16 ***
## pDem_Rep -0.68869 0.08439 -8.161 8.34e-16 ***
## pInd_Not 0.56222 0.08568 6.562 7.89e-11 ***
## foxPerception -0.12612 0.02736 -4.609 4.47e-06 ***
## otherMediaPerception 0.51439 0.04189 12.278 < 2e-16 ***
## ---
## Signif. codes: 0 '***' 0.001 '**' 0.01 '*' 0.05 '.' 0.1 ' ' 1
##
## Residual standard error: 1.072 on 1202 degrees of freedom
## (29 observations deleted due to missingness)
## Multiple R-squared: 0.3202, Adjusted R-squared: 0.318
## F-statistic: 141.6 on 4 and 1202 DF, p-value: < 2.2e-16
##
## Call:
## lm(formula = voteLegit ~ (pDem_Rep + pInd_Not) + foxPerception +
## otherMediaPerception, data = d)
##
## Standardized Coefficients::
## (Intercept) pDem_Rep pInd_Not
## 0.0000000 -0.2431231 0.1568096
## foxPerception otherMediaPerception
## -0.1207183 0.3408677
##
## Call:
## lm(formula = voteLegit ~ (pDem_Rep + pInd_Not), data = d)
##
## Residuals:
## Min 1Q Median 3Q Max
## -3.1679 -0.8920 0.1080 0.8321 2.1080
##
## Coefficients:
## Estimate Std. Error t value Pr(>|t|)
## (Intercept) 3.34447 0.03645 91.749 < 2e-16 ***
## pDem_Rep -1.27585 0.07156 -17.828 < 2e-16 ***
## pInd_Not 0.56202 0.09058 6.205 7.52e-10 ***
## ---
## Signif. codes: 0 '***' 0.001 '**' 0.01 '*' 0.05 '.' 0.1 ' ' 1
##
## Residual standard error: 1.138 on 1204 degrees of freedom
## (29 observations deleted due to missingness)
## Multiple R-squared: 0.2326, Adjusted R-squared: 0.2313
## F-statistic: 182.4 on 2 and 1204 DF, p-value: < 2.2e-16
##
## Call:
## lm(formula = voteLegit ~ (pDem_Rep + pInd_Not), data = d)
##
## Standardized Coefficients::
## (Intercept) pDem_Rep pInd_Not
## 0.0000000 -0.4504079 0.1567542
𝑍 = β1−β2/sqrt((SEβ1)2+(SEβ2)2)
##
## Call:
## lm(formula = voteLegit ~ (pDem_Rep + pInd_Not), data = d)
##
## Standardized Coefficients::
## (Intercept) pDem_Rep pInd_Not
## 0.0000000 -0.4504079 0.1567542
##
## Call:
## lm(formula = voteLegit ~ (pDem_Rep + pInd_Not) + foxPerception +
## otherMediaPerception, data = d)
##
## Standardized Coefficients::
## (Intercept) pDem_Rep pInd_Not
## 0.0000000 -0.2431231 0.1568096
## foxPerception otherMediaPerception
## -0.1207183 0.3408677
##
## Call:
## lm(formula = voteLegit ~ (pDem_Rep + pInd_Not), data = d)
##
## Residuals:
## Min 1Q Median 3Q Max
## -3.1679 -0.8920 0.1080 0.8321 2.1080
##
## Coefficients:
## Estimate Std. Error t value Pr(>|t|)
## (Intercept) 3.34447 0.03645 91.749 < 2e-16 ***
## pDem_Rep -1.27585 0.07156 -17.828 < 2e-16 ***
## pInd_Not 0.56202 0.09058 6.205 7.52e-10 ***
## ---
## Signif. codes: 0 '***' 0.001 '**' 0.01 '*' 0.05 '.' 0.1 ' ' 1
##
## Residual standard error: 1.138 on 1204 degrees of freedom
## (29 observations deleted due to missingness)
## Multiple R-squared: 0.2326, Adjusted R-squared: 0.2313
## F-statistic: 182.4 on 2 and 1204 DF, p-value: < 2.2e-16
##
## Call:
## lm(formula = voteLegit ~ (pDem_Rep + pInd_Not) + foxPerception +
## otherMediaPerception, data = d)
##
## Residuals:
## Min 1Q Median 3Q Max
## -3.3653 -0.7999 0.1392 0.7739 2.8750
##
## Coefficients:
## Estimate Std. Error t value Pr(>|t|)
## (Intercept) 2.40004 0.11331 21.181 < 2e-16 ***
## pDem_Rep -0.68869 0.08439 -8.161 8.34e-16 ***
## pInd_Not 0.56222 0.08568 6.562 7.89e-11 ***
## foxPerception -0.12612 0.02736 -4.609 4.47e-06 ***
## otherMediaPerception 0.51439 0.04189 12.278 < 2e-16 ***
## ---
## Signif. codes: 0 '***' 0.001 '**' 0.01 '*' 0.05 '.' 0.1 ' ' 1
##
## Residual standard error: 1.072 on 1202 degrees of freedom
## (29 observations deleted due to missingness)
## Multiple R-squared: 0.3202, Adjusted R-squared: 0.318
## F-statistic: 141.6 on 4 and 1202 DF, p-value: < 2.2e-16
B1 <- -0.4504079
B2 <- -0.2431231
SEB1 <- 0.07156
SEB2 <- 0.08439
(Z <- (B1 - B2)/(sqrt((SEB1)^2 + (SEB2^2))))## [1] -1.873408
voteconf <- as.data.frame(cbind(d[d$election_timing != "Pre-election",]$party_factor, d[d$election_timing != "Pre-election",]$ownvote_conf, d[d$election_timing != "Pre-election",]$overallvote_conf))
voteconf <- as.data.frame(cbind(voteconf, d[d$election_timing != "Pre-election",]$election_timing))
names(voteconf) <- c("party_factor", "Own","Nationwide", "election_timing")
voteconf$party_factor <- recode_factor(voteconf$party_factor, `1` = "Democrat", `2` = "Republican", `3` = "Independent")
voteconf$election_timing <- recode_factor(voteconf$election_timing, `During-election` = "Interregnum", `Post-election` = "Declared")
voteconffull.df <- tidyr::gather(voteconf, Vote_Type, Confidence, Own:Nationwide, factor_key=TRUE)
voteconf.df <- voteconffull.df[voteconffull.df$election_timing != "Pre-election",]
voteConf.party_plot <- ggplot(voteconf.df[!is.na(voteconf.df$party_factor),],
aes(x = election_timing, y = Confidence)) +
geom_violin(alpha = .6, aes(fill = party_factor)) +
geom_point(stat = 'summary', fun = 'mean', size = 1) +
geom_path(stat = 'summary', fun = 'mean', aes(group = 1, col = party_factor)) +
stat_summary(fun.data = mean_cl_normal, geom = "errorbar", position = position_dodge(.9), width=.1, fun.args = list(mult = 1)) +
facet_grid(Vote_Type ~ party_factor)
voteConf.party_plot +
scale_fill_manual(values = c('dodgerblue','red3','orchid4')) +
scale_color_manual(values = c('dodgerblue','red3','orchid4')) +
xlab("Election Phase") +
ylab("Vote Legitimacy") +
theme_classic()## Warning: Removed 35 rows containing non-finite values (stat_ydensity).
## Warning: Removed 35 rows containing non-finite values (stat_summary).
## Warning: Removed 35 rows containing non-finite values (stat_summary).
## Warning: Removed 35 rows containing non-finite values (stat_summary).
negAffect <- as.data.frame(cbind(d[d$election_timing != "Pre-election",]$party_factor, d[d$election_timing != "Pre-election",]$negative))
negAffect <- as.data.frame(cbind(negAffect, d[d$election_timing != "Pre-election",]$election_timing))
names(negAffect) <- c("party_factor", "negative_affect", "election_timing")
negAffect$party_factor <- recode_factor(negAffect$party_factor, `1` = "Democrat", `2` = "Republican", `3` = "Independent")
negAffect$election_timing <- recode_factor(negAffect$election_timing, `During-election` = "Interregnum", `Post-election` = "Declared")
negAffect <- negAffect[negAffect$election_timing != "Pre-election",]
negAffect.party_plot <- ggplot(negAffect[!is.na(negAffect$party_factor),],
aes(x = election_timing, y = negative_affect, fill = party_factor)) +
geom_violin(alpha = .6, aes(fill = party_factor)) +
geom_point(stat = 'summary', fun = 'mean', size = 1) +
geom_path(stat = 'summary', fun = 'mean', aes(group = 1, col = party_factor)) +
stat_summary(fun.data = mean_cl_normal, geom = "errorbar", position = position_dodge(.9), width=.1, fun.args = list(mult = 1)) +
facet_grid( ~ party_factor)
negAffect.party_plot +
scale_fill_manual(values = c('dodgerblue','red3','orchid4')) +
scale_color_manual(values = c('dodgerblue','red3','orchid4')) +
xlab("Election Phase") +
ylab("Average Negative Affect") +
theme_classic()## Warning: Removed 11 rows containing non-finite values (stat_ydensity).
## Warning: Removed 11 rows containing non-finite values (stat_summary).
## Warning: Removed 11 rows containing non-finite values (stat_summary).
## Warning: Removed 11 rows containing non-finite values (stat_summary).
# creating df with only media measures, party ID, and election timing
media <- as.data.frame(cbind(d[,c("party_factor",
"election_timing",
"mediaExposure_1",
"mediaExposure_2",
"mediaExposure_3",
"mediaExposure_4",
"mediaExposure_5",
"mediaExposure_6",
"mediaExposure_7",
"mediaExposure_8",
"mediaExposure_9",
"mediaExposure_10",
"mediaExposure_11",
"mediaExposure_12",
"mediaExposure_13",
"mediaExposure_14",
"mediaExposure_15",
"mediaTrust_1",
"mediaTrust_2",
"mediaTrust_3",
"mediaTrust_4",
"mediaTrust_5",
"mediaTrust_6",
"mediaTrust_7",
"mediaTrust_8",
"mediaTrust_9",
"mediaTrust_10",
"mediaTrust_11",
"mediaTrust_12",
"mediaTrust_13",
"mediaTrust_14",
"mediaTrust_15")]))
media[,18:32] <- media[,18:32] + 3
media$media_1 <- rowMeans(media[,c(3,18)], na.rm = T)
media$media_2 <- rowMeans(media[,c(4,19)], na.rm = T)
media$media_3 <- rowMeans(media[,c(5,20)], na.rm = T)
media$media_4 <- rowMeans(media[,c(6,21)], na.rm = T)
media$media_5 <- rowMeans(media[,c(7,22)], na.rm = T)
media$media_6 <- rowMeans(media[,c(8,23)], na.rm = T)
media$media_7 <- rowMeans(media[,c(9,24)], na.rm = T)
media$media_8 <- rowMeans(media[,c(10,25)], na.rm = T)
media$media_9 <- rowMeans(media[,c(11,26)], na.rm = T)
media$media_10 <- rowMeans(media[,c(12,27)], na.rm = T)
media$media_11 <- rowMeans(media[,c(13,28)], na.rm = T)
media$media_12 <- rowMeans(media[,c(14,29)], na.rm = T)
media$media_13 <- rowMeans(media[,c(15,30)], na.rm = T)
media$media_14 <- rowMeans(media[,c(16,31)], na.rm = T)
media$media_15 <- rowMeans(media[,c(17,32)], na.rm = T)
media.df <- tidyr::gather(media, Source, Perception, media_1:media_15, factor_key=TRUE)
media.df$Source <- recode_factor(media.df$Source, "media_1" = "NYTimes", "media_2" = "WSJ", "media_3" = "WashPost", "media_4" = "USAToday", "media_5" = "Fox News", "media_6" = "CNN", "media_7" = "MSNBC", "media_8" = "Yahoo", "media_9" = "HuffPost", "media_10" = "AOL", "media_11" = "NPR", "media_12" = "ABC", "media_13" = "NBC", "media_14" = "CBS", "media_15" = "PBS")
media.df$Source <- factor(media.df$Source, levels = c("Fox News", "ABC", "AOL", "CBS", "CNN", "HuffPost", "MSNBC", "NBC", "NPR", "NYTimes", "PBS", "USAToday", "WashPost", "WSJ", "Yahoo"))
media_plot <- ggplot(media.df[!is.na(media.df$party_factor),],
aes(x = Source, y = Perception, fill = party_factor)) +
geom_bar(stat = 'summary', fun = 'mean', position = position_dodge(.9), alpha = .9) +
stat_summary(fun.data = mean_cl_normal, geom = "errorbar", position = position_dodge(.9), width=.1, fun.args = list(mult = 1))
media_plot +
scale_fill_manual("Participant Partisan ID", values = c("dodgerblue", "red3", "orchid4")) +
xlab("Media Source") +
ylab("Consumption of/Trust in Media Source") +
coord_cartesian(ylim = c(1,5)) +
theme_blank() +
theme(axis.text.x = element_text(angle = 45, hjust = 1)) ## Warning: Removed 180 rows containing non-finite values (stat_summary).
## Warning: Removed 180 rows containing non-finite values (stat_summary).