Rationale

In Elaboration Likelihood Model theory, the assertion is that cognitively processing “high quality” persuasive information tends to produce long-term attitude change. Based on that thinking, participants in this survey who said they had no strong opinion on the legalization of recreational marijuana would be more likely to favor the legalization, the more time they spent being exposed to and consuming “high quality” information promoting the legalization and that that feeling would be more durable and lasting. The participants each spent half an hour on a website advocating the legalization, featuring both “high quality” or central information and “low quality” or peripheral information. Eye trackers determined how much time each participant spent on each type of information. The theory would suggest then that the longer participants spent on the high quality information, the more likely they would be persuaded to support the legalization longterm.


Hypothesis

The likelihood that participants will support long-term the legalization of recreational marijuana will increase as the amount of time that participants spend viewing/studying “high quality” information increases on a website advocating for such legalization.


Variables & method

The dependent variable in this analysis was a categorical one looking at whether, a month after participants viewed the advocacy website, the participants who initially said they had no strong feelings on whether or not to legalize recreational marijuana, now favored or opposed legalizing recreational marijuana in Tennessee. The independent variable here was the continuous measure of how much time each participant spent looking at the material on the website, in particular, the “high quality” information. And the more time the participant spent viewing the high quality information, the more likely they would be persuaded to support the legislation.

In this study, 200 participants were asked to spend 30 minutes letting an eye tracker watch them browse a realistic-looking website for a made-up organization advocating to legalize recreational marijuana use in Tennessee. All 200 had indicated on a questionnaire administered ahead of time that they had no strong opinions for or against legalizing recreational marijuana use. The eye tracker recorded how much of the allotted 30 minutes respondents spent looking at “high quality” persuasive information on the site in favor of legalizing recreational marijuana (summaries of medical studies, information from medical experts, incarceration statistics, tax revenue projections, etc.) rather than peripheral cues on the site (endorsements by celebrities, images, etc.) A month later, the participants were asked whether they favored or opposed legalizing recreational marijuana use for medical purposes.


Results & discussion

The data collected was then evaluated using logistic regression. Based on the results, shown below, the data supports the hypothesis, that the longer people spent on the high quality information, the more likely they were to support legalizing recreational marijuana in Tennessee. The Logistic Regression Curve in the first chart shows a positive direction. On the second chart, the Logistic Regression Results, the P_Value for the Independent Variable is 0.0000, meaning the result is in fact statistically significant. Additionally, on the following chart showing the Box-Tidwell results, the P-Value which is 0.6869 is just above the threshold for logistic regression. And, finally, the final chart indicates that particpants who spent at least 14.965 or almost 15 minutes or more on the “high quality” information were more likely of supporting the legalization.


Logistic Regression Results
Odds Ratios with 95% Confidence Intervals
term Odds_Ratio CI_Lower CI_Upper P_Value
(Intercept) 0.099 0.044 0.205 0.0000
IV 1.167 1.116 1.227 0.0000
Linearity of the Logit Test (Box-Tidwell)
Interaction term indicates violation if significant
term Estimate Std_Error P_Value
(Intercept) −2.566 1.100 0.0196
IV 0.262 0.290 0.3657
IV_log −0.032 0.078 0.6869
Inflection Point of Logistic Curve
Value of IV where predicted probability = 0.50
Probability Inflection_Point
0.5 14.965

Code

Here is the code used to produce this analysis and related graphs and charts.

# ------------------------------
# Install and load required packages
# ------------------------------
if (!require("tidyverse")) install.packages("tidyverse")
if (!require("gt")) install.packages("gt")
if (!require("gtExtras")) install.packages("gtExtras")
if (!require("plotly")) install.packages("plotly")

library(ggplot2)
library(dplyr)
library(gt)
library(gtExtras)
library(plotly)


# ------------------------------
# Read the data
# ------------------------------
mydata <- read.csv("ELM.csv") # <-- EDIT filename

# ################################################
# # (Optional) Remove specific case(es)s by row number
# ################################################
# # Example: remove rows 10 and 25
# rows_to_remove <- c(10, 25) # Edit and uncomment this line
# mydata <- mydata[-rows_to_remove, ] # Uncomment this line

# Specify dependent (DV) and independent (IV) variables
mydata$DV <- mydata$Favor_1   # <-- EDIT DV column
mydata$IV <- mydata$Minutes   # <-- EDIT IV column

# Ensure DV is binary numeric (0/1)
mydata$DV <- as.numeric(as.character(mydata$DV))


# ------------------------------
# Logistic regression plot 
# ------------------------------
logit_plot <- ggplot(mydata, aes(x = IV, y = DV)) +
  geom_point(alpha = 0.5) +   # scatterplot of observed data
  geom_smooth(method = "glm",
              method.args = list(family = "binomial"),
              se = FALSE,
              color = "#1f78b4") +
  labs(title = "Logistic Regression Curve",
       x = "Independent Variable (IV)",
       y = "Dependent Variable (DV)")

logit_plotly <- ggplotly(logit_plot)


# ------------------------------
# Run logistic regression
# ------------------------------
options(scipen = 999)
log.ed <- glm(DV ~ IV, data = mydata, family = "binomial")

# Extract coefficients and odds ratios
results <- broom::tidy(log.ed, conf.int = TRUE, exponentiate = TRUE) %>%
  select(term, estimate, conf.low, conf.high, p.value) %>%
  rename(Odds_Ratio = estimate,
         CI_Lower = conf.low,
         CI_Upper = conf.high,
         P_Value = p.value)

# Display results as a nice gt table
results_table <- results %>%
  gt() %>%
  fmt_number(columns = c(Odds_Ratio, CI_Lower, CI_Upper), decimals = 3) %>%
  fmt_number(columns = P_Value, decimals = 4) %>%
  tab_header(
    title = "Logistic Regression Results",
    subtitle = "Odds Ratios with 95% Confidence Intervals"
  )


# ------------------------------
# Check linearity of the logit (Box-Tidwell test)
# ------------------------------
# (Assumes IV > 0; shift IV if needed)
mydata$IV_log <- mydata$IV * log(mydata$IV)
linearity_test <- glm(DV ~ IV + IV_log, data = mydata, family = "binomial")

linearity_results <- broom::tidy(linearity_test) %>%
  select(term, estimate, std.error, p.value) %>%
  rename(Estimate = estimate,
         Std_Error = std.error,
         P_Value = p.value)

linearity_table <- linearity_results %>%
  gt() %>%
  fmt_number(columns = c(Estimate, Std_Error), decimals = 3) %>%
  fmt_number(columns = P_Value, decimals = 4) %>%
  tab_header(
    title = "Linearity of the Logit Test (Box-Tidwell)",
    subtitle = "Interaction term indicates violation if significant"
  )


# ------------------------------
# Calculate the inflection point (p = .50)
# ------------------------------
p <- 0.50
Inflection_point <- (log(p/(1-p)) - coef(log.ed)[1]) / coef(log.ed)[2]

inflection_table <- tibble(
  Probability = 0.5,
  Inflection_Point = Inflection_point
) %>%
  gt() %>%
  fmt_number(columns = Inflection_Point, decimals = 3) %>%
  tab_header(
    title = "Inflection Point of Logistic Curve",
    subtitle = "Value of IV where predicted probability = 0.50"
  )


# ------------------------------
# Outputs
# ------------------------------
# Interactive plot
logit_plotly

# Tables
results_table
linearity_table
inflection_table