---
title: ''
output:
  bookdown::pdf_document2: default
---

# Results


```{r packages,echo = FALSE, message = FALSE,results = "hide"}
library(weights)
library(ggplot2)
library(tidyr)
library(scales)
library(sjPlot)
library(sjmisc)
library(psych)
library(likert)
library(MASS)
library(reshape2)
library(reshape)
library(ggpubr)
library(tidyverse)
library(tigerstats)
library(carData)
library(effects)
library(car)
library(MASS)
library(splines) 
library(kableExtra)
library(stargazer)
library(apaTables)
library(gtsummary)
library(papaja)
library(interplot)
library(aod)
theme_set(theme_sjplot())
```

```{r echo = FALSE,message = FALSE,results = "hide"}
#load file
load(file = "rbind_all.Rda")
```

## Model
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;To test the set of the hypotheses, and examine what factors drive people to share political disinformation, I performed an OLS in which the dependent variable “repost” (share political disinformation) was classified according to its order of magnitude ("Extremely unlikely","Somewhat unlikely","Neither likely nor unlikely", "Somewhat likely", "Extremely likely"), and the log odds of the ordered outcome were modeled as a linear combination of the predictor variables, which include age, sex, party affiliation, education level, social media engagement, level of political knowledge, and the credibility of information source. The ordinal logistic model - proportional odds model is specified as follows:
\begin{align*}
\\logit(Y_i) = \beta_0 +\beta_1 S_i + \beta_2A_i  + \beta_3 E_i + \beta_4C_i + \beta_5 P_i + \beta_6 I_i +\beta_7 D_i + \beta_8 R_i + \beta_9 F_i \\
+ \beta_{10} (D_i \times F_i) +  \beta_{11}(R_i \times F_i) + \beta_{12} (I_i \times P_i) + \beta_{13}(I_i \times A_i) + \mu_i
\end{align*}

&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; Where the dependent variable indicates ordered log odds (or ordered logits) of partisan disinformation sharing behavior.

&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; $S_i$ = Sex; $A_i$ = Age; $E_i$ = Education;  $C_i$ = Social Media Engagement; $P_i$ = Political Knowledge; $I_i$ = Credibility; $D_i$ = Democrat^[$D_i$ is a dummy variable that equals to 1 if the respondent identifies as "Democrat," and 0 otherwise.]; $R_i$ = Democrat^[$R_i$ is a dummy variable that equals to 1 if the respondent identifies as "Republican," and 0 otherwise.]; $F_i$ = Favorability (Towards Democrats). These independent variables are included in the equation to measure the main effects.  

&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; $D_i \times F_i$ is the interaction term that measures the difference in the effect of identifying as a Democrat for favorablility of the (dis)information towards Democrats versus favorablility towards Republicans; $R_i \times F_i$ is the interaction term that measures the difference in the effect of identifying as a Republican for favorablility of the (dis)information towards Republicans versus favorablility towards Democrats. $I_i \times P_i$ is the interaction term that measures the effect of information credibility for individuals with different levels of political knowledge. $I_i \times A_i$ is the interaction term that measures the effect of information credibility for age.  

## Intepretation

```{r, echo = F, message = FALSE, warning=FALSE,results = "hide"}
# ordi_logic <- MASS::polr(formula = repost ~ poli_knowledge + partyid + sex + age +educ + social_media + credibility,  data = rbind_all, Hess = TRUE,method = "logistic")

rbind_all$repost <- as.ordered(rbind_all$repost)

# make independent as the reference/omitted variable
rbind_all$partyid <- relevel(rbind_all$partyid,"Ind")


# dummy code partyid 

rbind_all$rep <- ifelse(rbind_all$partyid == "Rep", 1, 0)
rbind_all$dem <- ifelse(rbind_all$partyid == "Dem", 1, 0)

rbind_all$rep <- as_factor(rbind_all$rep)
rbind_all$dem <- as_factor(rbind_all$dem)

```

```{r full model,echo = FALSE, message = FALSE,warning = FALSE,results = "hide"}
# Full model without interaction terms
# model1 <- polr(repost ~  sex + age + edu + social + poli + credibility + partyid + Rep_unfav, weights = weightvec, data = rbind_all, Hess = TRUE,method = "logistic")
# summary(model1)


# exploring interections https://cran.r-project.org/web/packages/interactions/vignettes/interactions.html 

# coeftest(model1)
# coefci(model1)
# exp(cbind(OR=coef(model1), confint(model1)))

#reduce model
model2<- polr(repost ~  sex +age + edu + social + poli + credibility + Rep_unfav + dem + rep + (dem + rep)  * Rep_unfav + credibility * (poli + edu), weights = weightvec, data = rbind_all, Hess = TRUE,method = "logistic")
summary(model2)$coef

# library(lmtest)
# coeftest(model2)
 # Anova(model2)

# model2 <- polr(repost ~ partyid + sex + age +educ + social_media + poli_knowledge * partyid + poli_knowledge * educ, weights = weightvec, data = rbind_all, contrasts=NULL,method=c("probit"))


#

# wald.test(b = coef(model2), Sigma = vcov(model2), terms = NULL)

# wald test for interactions https://cran.r-project.org/web/packages/clubSandwich/vignettes/Wald-tests-in-clubSandwich.html

```

```{r table6, echo = FALSE, message=FALSE, warning = FALSE,fig.show="hold",results='asis'}
stargazer(model2, type = "latex",
          header = FALSE,
          table.placement = "H",
          style = "apsr",
  title = "Odds ratios and 95 percent confidence intervals from logistic regression analyses predicting the likelihood of disinformation sharing behavior by selected characteristics for the model with interaction terms",
  column.labels = c("Regression model"),
  # dep.var.caption = "Dependent variable ",
  dep.var.labels = "Information sharing",
covariate.labels=c("Male","Age","Education","Social media use","Political knowledge","Credibility","Favorability (Favorable towards Democrats)","Democrat","Republican","Democrat: Favorability","Republican: Favorability","Political knowledge: Credibility","Education: Credibility "),
  # keep.stat = c("rsq", "f"),
          keep.stat = c("n", "null.dev", "res.dev"), 
  single.row = TRUE, # to put coefficients and standard errors on same line
          no.space = TRUE, # to remove the spaces after each line of coefficients
          column.sep.width = "1pt", # to reduce column width
          font.size = "small", # to make font size smaller
  ci=TRUE, 
ci.level=0.95, # confidence level is 95%
          digits=3,
  # float.env = "sidewaystable",
  notes = "Note: The table reports coefficients, p values, and confidence intervals",
  notes.align = "l")
```



&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; My study investigates what factors contribute to partisan (dis)information sharing behavior on social media. Table 6 shows the odds ratios generated by the ordinal regression model I performed, which displays the values of coefficients and intercepts, and confidence internals of the model. 

&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; The categorical variable sex is interpreted as: a male individual, as opposed to a female individual, is associated with a higher likelihood of sharing partisan disinformation. The variable is statistically significant at the 1% level (p<.01). 

&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; The continuous variable age is interpreted as: with one unit increase in age, the log of odds of an individual sharing partisan disinformation increases by 0.007, holding everything else constant. The age variable is also statistically significant at the 1% level (p<.01).  This shows that age is a positive predictor of disinformation sharing behavior. Older individuals are more likely to share partisan disinformation on social media. 

&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; As mentioned earlier, the education variable is recoded and treated as a continuous variable that falls within the interval of 0 to 1 in the regression model. As shown in Table 6, an increase in educational attainment by one unit increases the expected value of disinformation sharing in log odds by  -0.678 at the 1% level (p<.01), holding constant all other variables. This result indicates that educational attainment is negatively associated with disinformation sharing behavior: An individual with a higher level of education is less likely to share disinformation than those with a lower level of education. 

&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; Social media use is also positively associated with disinformation sharing behavior. Holding other variables constant, an increase in social media use by one unit increases the expected value of disinformation sharing in log odds by 2.926 at the 1% level (p<.01). This suggests that the more engaged an individual is in social media, the more likely the individual shares disinformation. However, given that this study does not examine what motivates disinformation sharing behavior, it demands further investigation that whether social media users purposefully or unintentionally disseminate such dubious information. It is possible that social media users accidentally share disinformation as they are engaged and spend more time in social media. 

&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; My study measures the effect of changes in political knowledge on partisan (dis)information sharing behavior in the context of social media. As Table 6 shows, the continuous variable political knowledge is negatively associated with disinformation sharing behavior. With one unit increase in an individual's political knowledge, the log of odds of the individual sharing partisan disinformation decreases by 1.854 at the 1% level (p<.01), holding everything else constant. The result shows that the more politically literate an individual is, the less likely the individual shares deceptive or misleading information on social media.

&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; Table 6 shows that information credibility is not a robust predictor of disinformation sharing behavior. Although the values of coefficients associated with information credibility indicate that the credibility of information appears to slightly reduce the likelihood of sharing disinformation, but this relationship is not significant. It should be noted, however, that it is challenging to distinguish truth from falsehoods online, even for experts. In other words, individuals may lack skills or expertise to properly assess the veracity of information online, and therefore, it is a possible explanation that whether the information comes from a credible source is not a consideration when they decide on sharing it or not. 

&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;In this study, favorability as a a variable is measured by social media posts congenial to party identification. All the social media information presented to the research participants is designed in a fashion where it is favorable towards Democrats and unfavoriable towards Republicans at the same time, and vice versa. Interestingly, favorability itself does not serve as a reliable predictor of disinformation sharing behavior as the variable is not statistically significant. 

&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;Partisanship is hypothesized to be an important factor in (dis)information sharing in this study. "Democrat" is a dummy variable, in which "1" refers to individuals who identify as Democrats, and "0" otherwise. As shown in the table, democrats are more likely to share partisan disinformation when compared with individuals who do not identify as Democrats (including Republicans and Independents). However, this variable is not statistically significant. Likewise, "Republican" is another dummy variable that is recoded as "1" for Republican and "0" otherwise (including Democrats and Independents). In this case, a Republican, as opposed to a Democrat or an Independent, is associated with a higher likelihood of sharing partisan disinformation at the 1% level (p<.01), holding all other variables constant. The may imply that Republicans share more political disinformation online, which is consistent with the public's perception of Republicans and conservatives.   

&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;In this model, I include four interaction terms to examine the joint effects of some independent variables. The first pair of interaction terms is Democrat $\times$ Favorability, which measures the interaction effect of partisanship on partisan sharing uncongenial to Republicans (or congenial to Democrats). The interaction term is statistically significant at the 1% significance level (as p-value is <.01). The interaction is interpreted as as: Democrats are more likely to share partisan disinformation when it is favorable towards Democrats and unfavorable towards Republicans. The positive association between partisanship and sharing intention is dependent on whether the information is politically congenial to partisan preferences. The log odds of Democrats sharing partisan information increase by 0.552 when the information is unfavorable to Republicans and favorable to Democrats.

&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;In addition, I generated an interaction plot ( See Figure \@ref(fig:fig1)^[0 = information unfavorable to Democrats and favorable to Republicans, 1 = information favorable to Democrats and unfavorable to Republicans.]) to demonstrate the interaction effects of these two model coefficients. For Democrats (denoted as the blue error bars), the predicted probabilities of Democrats being "somewhat likely" or "extremely likely' to share disinformation congenial to Democrats are higher, as apposed to Republicans (denoted as the red error bars).  

```{r fig1,fig.cap = 'Predicted Probabilities of Share (Democrat vs. Non-Democrat)',echo = FALSE,messages = F, warnings = F, fig.align='center',fig.pos='H',results='asis',fig.height = 6}

plot_model(model2, type = "pred", terms = c("dem", "Rep_unfav")) + 
 # labs(title = "Predicted Probabilities of Share (Democrat vs. Non-Democrat)") +
  ggtitle("Predicted Probabilities of Share (Democrat)") +
  theme(legend.position = "bottom") +
  xlab("Democrat vs. Non-Democrat") +
  ylab("Probabilities of Share/Repost") +
  # scale_y_continuous(breaks=seq(0, 1, by = .1))+ 
  labs(color = "Party Identification") +
  # scale_color_manual(labels = c("Non-Democrat", "Democrat"), values = c("red","blue")) +
  theme(plot.title = element_text(size = 10,hjust = 0.5,face = "bold"))

# Perfectly solved the cross-referencing issue
# https://github.com/rstudio/bookdown/issues/343

```

&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;With interaction between Republican and favorability, the interaction term is statistically significant at the 1% significance level (as p-value is <.01). The log odds of Republicans sharing partisan information decrease by 0.590 when the information is unfavorable to Republicans and favorable to Democrats. In other words, the log odds of Republicans sharing partisan information increase by 0.590 when the information is favorable to Republicans and unfavorable to Democrats. The results shown in Figure \@ref(fig:fig2)^[Identical to Figure 1, 0 = information unfavorable to Democrats and favorable to Republicans, 1 = information favorable to Democrats and unfavorable to Republicans. ] further confirm this finding, where Republicans (denoted as the blue error bars^[Please note that Republicans are denoted as the blue error bars as Republican is coded as "1".]) tend to be less "somewhat likely"  or "extremely likely" to share partisan disinformation uncongenial to their party preferences. 

```{r fig2,fig.cap = 'Predicted Probabilities of Share (Republican vs. Non-Republican)',echo = FALSE,messages = F, warnings = F, fig.align='center',fig.pos='H',results='asis',fig.height = 6}
plot_model(model2, type = "pred", terms = c("rep", "Rep_unfav")) +
    ggtitle("Predicted Probabilities of Share (Republican)") +
  theme(legend.position = "bottom") +
  xlab("Republican vs. Non-Republican") +
  ylab("Probabilities of Share/Repost") +
  # scale_color_manual(labels = c("Non-Republican", "Republican"), values = c("blue","red"))  +
  labs(color = "Party Identification") +
    theme(plot.title = element_text(size = 10,hjust = 0.5,face = "bold"))
```
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;Additionally, the joint effect of political knowledge and credibility on disinformation sharing is also statistically significant at the 10% significance level (as p <.01), which is also shown in Figure \@ref(fig:fig3).  It suggests that an politically literate individual is more likely to share the information referencing to a credible source. A possible explanation is that individuals with more political knowledge are potentially more familiar with credile information and news sources as political literature individuals might be better educated. However, the interaction term of education and credibility seems to suggest otherwise. As shown in Table 6,  the log odds of more educated individuals sharing partisan disinformation when they identify the information source as credible only increase by 0.043 with one unit increase in the interaction effect, which is not statistically significant. 

```{r fig3,fig.cap = "Predicted Probabilities of Share (Political Knowledge Interacts with Information Credibility)", echo = FALSE,messages = F, warnings = F, fig.align='center',fig.pos='H',results='asis',fig.height = 6}
plot_model(model2, 
           type = "pred", 
           terms = c("poli", "credibility")) +
  ggtitle("Predicted Probabilities of Share on Effects of Interaction between Political Knowledge and Information Credibility") +
  theme(legend.position = "bottom") + 
  xlab("Level of Political Knowledge") +
  ylab("Probabilities of Share/Repost") +
  labs(colour = "Credibility") +
    theme(plot.title = element_text(size = 8,hjust = 0.5,face = "bold"))
```


&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;Finally, the joint effect of education and credibility on disinformation sharing is not statistically significant according to Table 6 and Figure \@ref(fig:fig4). Individuals who have higher levels of education show relatively low willingness to share partisan disinformation even when the disinformation is labelled as credible. This finding suggests that the credibility of information sources does not shape disinformation behavior regardless of educational attainment. 

```{r fig4,fig.cap = "Predicted Probabilities of Share (Education Interacts with Information Credibility)", echo = FALSE,messages = F, warnings = F, fig.align='center',fig.pos='H',results='asis',fig.height = 6}
plot_model(model2, 
           type = "pred", 
           terms = c("edu", "credibility")) +
  ggtitle("Predicted Probabilities of Share on Effects of Interaction between Education and Information Credibility") +
  theme(legend.position = "bottom") + 
  xlab("Level of Education") +
  ylab("Probabilities of Share/Repost") +
  labs(colour = "Credibility") +
    theme(plot.title = element_text(size = 8,hjust = 0.5,face = "bold"))
```


&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;Based on the analyses above, Hypotheses 1 - 6 are supported, while Hypothesis 7 regarding information credibility is rejected. In other words, political knowledge, social media engagement, age, gender/sex, educational attainment are statistically correlated to disinformation sharing behavior, but information credibility is not a strong predictor of disinformation sharing behavior. 



