Rationale

Agenda-setting theory suggests that the amount of attention the media gives to an issue can influence how important audiences perceive that issue to be. In other words, media coverage can help shape which issues people see as important.

For this project, the focus is on immigration coverage by Fox News and CNN. The information provided for this analysis indicates that Fox News consistently devoted more coverage to immigration than CNN in the months leading up to the survey. This provides an opportunity to examine whether the network a person preferred was associated with whether they identified immigration as the most important problem facing the United States.

Hypothesis

Fox News viewers will be more likely to identify immigration as the most important problem facing the United States than CNN viewers.

Variables & Method

The independent variable is Preferred Network, which identifies whether the respondent usually watches Fox News or CNN. The dependent variable is Immigration, which indicates whether the respondent named immigration as the most important problem facing the United States.

Viewers were coded as either “1 Top issue” or “2 Not top issue.” The dataset contains 600 respondents, with 300 CNN viewers and 300 Fox viewers.

A chi-square test was used to determine whether preferred network and immigration were in any way associated with one another.

Crosstabulation

Preferred Network and Immigration as Top Issue
Preferred Network Immigration Count
CNN 1 Top issue 35
Fox 1 Top issue 115
CNN 2 Not top issue 265
Fox 2 Not top issue 185

Graph

Results & Discussion

The crosstabulation shows that 35 of 300 CNN viewers, around 11%, identified immigration as the top issue, in comparison with an astounding 115 Fox viewers, 38%.

A chi-square test found a statistically significant association between preferred network and whether immigration was identified as the top issue.

Chi-Square Test of Independence
Statistic Value df p_value
Chi-square 55.476 1 <0.001

These results are consistent with my hypothesis because immigration was shown as the main issue and was more frequently discussed on Fox News. Those who watched Fox News wanted that coverage and Fox devoted more time to immigration than their counterparts at CNN.

However, the chi-square test shows that there was an correlation between the network of choice and those that identified immigration as a top issue in the US.

Code

library(dplyr)
library(ggplot2)
library(gt)

options(scipen=999)

FetchedData <- read.csv("https://drkblake.com/wp-content/uploads/2023/09/TopIssue.csv")
write.csv(FetchedData, "TopIssue.csv", row.names=FALSE)
rm(FetchedData)

mydata <- read.csv("TopIssue.csv")

crosstab <- table(mydata$PreferredNetwork, mydata$Immigration)

crosstab_table <- as.data.frame(crosstab) %>%
  rename(
    `Preferred Network` = Var1,
    Immigration = Var2,
    Count = Freq
  ) %>%
  gt() %>%
  tab_header(
    title = "Preferred Network and Immigration as Top Issue"
  )

chitest <- chisq.test(crosstab)

chitest_table <- data.frame(
  Statistic = "Chi-square",
  Value = round(as.numeric(chitest$statistic), 3),
  df = as.numeric(chitest$parameter),
  p_value = format.pval(chitest$p.value, digits = 3, eps = 0.001)
) %>%
  gt() %>%
  tab_header(
    title = "Chi-Square Test of Independence"
  )

graph <- ggplot(
  mydata,
  aes(x = PreferredNetwork, fill = Immigration)
) +
  geom_bar() +
  labs(
    title = "Preferred Network and Immigration as Top Issue",
    x = "Preferred Network",
    y = "Number of Viewers",
    fill = "Immigration"
  )