In these analyses, we test causal relationships between self and social relevance and broad- and narrowcast sharing intentions with data from Study 6.

define functions

# MLM results table function
table_model = function(model_data, eff_size = TRUE) {
  
  results = model_data %>%
    broom.mixed::tidy(conf.int = TRUE) %>%
    filter(effect == "fixed") %>%
    rename("SE" = std.error,
           "t" = statistic,
           "p" = p.value) %>%
    select(-group, -effect) %>%
    mutate_at(vars(-contains("term"), -contains("p.value")), round, 2) %>%
    mutate(term = gsub("article_cond", "", term),
           term = gsub("\\(Intercept\\)", "control", term),
           term = gsub("sharing_type", "sharing type", term),
           term = gsub("msg_rel_self_between", "self-relevance", term),
           term = gsub("msg_rel_social_between", "social relevance", term),
           term = gsub("contentclimate", "content (climate)", term),
           term = gsub("n_c", "word count", term),
           term = gsub(":", " x ", term),
           p = ifelse(p < .001, "< .001",
                      ifelse(p == 1, "1.000", gsub("0.(.*)", ".\\1", sprintf("%.3f", p)))),
           `b [95% CI]` = sprintf("%.2f [%0.2f, %.2f]", estimate, conf.low, conf.high)) 
  
  if (eff_size == TRUE) {
    eff_size = lme.dscore(model_data, data = study6, type = "lme4") %>%
      rownames_to_column(var = "term") %>%
      mutate(term = gsub("article_cond", "", term),
             term = gsub("article_cond", "", term),
             term = gsub("\\(Intercept\\)", "control", term),
             term = gsub("sharing_type", "sharing type", term),
             term = gsub("msg_rel_self_between", "self-relevance", term),
             term = gsub("msg_rel_social_between", "social relevance", term),
             term = gsub("contentclimate", "content (climate)", term),
             term = gsub(":", " x ", term),
             d = sprintf("%.2f", d)) %>%
      select(term, d)
    
    results %>%
      left_join(., eff_size) %>%
      mutate(d = ifelse(is.na(d), "--", d)) %>%
      select(term, `b [95% CI]`, d, df, t, p) %>%
      kable() %>%
      kableExtra::kable_styling()
    
  } else {
    results %>%
      select(term, `b [95% CI]`, df, t, p) %>%
      kable() %>%
      kableExtra::kable_styling()
  }
}

# Run bayesian mediation model
run_brm_model = function(model_name, model_formula, y_var, data) {
  if (file.exists(sprintf("models/model_%s.RDS", model_name))) {
    assign(get("model_name"), readRDS(sprintf("models/model_%s.RDS", model_name)))
  } else {
    
    assign(get("model_name"),
           brm(
             model_formula,
             data = data,
             cores = 4,
             thin = 4,
             seed = seed,
             control = list(adapt_delta = .99, max_treedepth = 15)
        ))
    
    saveRDS(eval(parse(text = model_name)), sprintf("models/model_%s.RDS", model_name))
    return(eval(parse(text = model_name)))
  }
}

# Get path estimates from bayesian mediation models
create_paths = function(model, x_var, y_var) {
  paths = posterior_samples(model) %>% 
    mutate(a1 = get(sprintf("b_msgrelself_article_cond%s", x_var)),
           a2 = get(sprintf("b_msgrelsocial_article_cond%s", x_var)),
           b1 = get(sprintf("b_%s_msg_rel_self", y_var)),
           b2 = get(sprintf("b_%s_msg_rel_social", y_var)),
           c_prime = get(sprintf("b_%s_article_cond%s", y_var, x_var)),
           a1b1 = a1 * b1,
           a2b2 = a2 * b2,
           c = c_prime + a1b1 + a2b2,
           cor1 = get(sprintf("cor_SID__msgrelself_article_cond%s__%s_msg_rel_self", x_var, y_var)),
           cor2 = get(sprintf("cor_SID__msgrelsocial_article_cond%s__%s_msg_rel_social", x_var, y_var)),
           sd_a1 = get(sprintf("sd_SID__msgrelself_article_cond%s", x_var)),
           sd_b1 = get(sprintf("sd_SID__%s_msg_rel_self", y_var)),
           sd_a2 = get(sprintf("sd_SID__msgrelsocial_article_cond%s", x_var)),
           sd_b2 = get(sprintf("sd_SID__%s_msg_rel_social", y_var)),
           cov_a1b1 = cor1*sd_a1*sd_b1,
           cov_a2b2 = cor2*sd_a2*sd_b2,
           a1b1_cov_a1b1 = a1b1 + cov_a1b1,
           a2b2_cov_a2b2 = a2b2 + cov_a2b2,
           model = x_var,
           outcome = y_var)
  
  return(paths)
}

create_paths_words = function(model, x_var, y_var) {
  y_var = gsub("_", "", y_var)
  paths = posterior_samples(model) %>% 
    mutate(a1 = get(sprintf("b_nc_article_cond%s", x_var)),
           b1 = get(sprintf("b_%s_n_c", y_var)),
           c_prime = get(sprintf("b_%s_article_cond%s", y_var, x_var)),
           a1b1 = a1 * b1,
           c = c_prime + a1b1,
           cor1 = get(sprintf("cor_SID__nc_article_cond%s__%s_n_c", x_var, y_var)),
           sd_a1 = get(sprintf("sd_SID__nc_article_cond%s", x_var)),
           sd_b1 = get(sprintf("sd_SID__%s_n_c", y_var)),
           cov_a1b1 = cor1*sd_a1*sd_b1,
           a1b1_cov_a1b1 = a1b1 + cov_a1b1,
           model = x_var,
           outcome = y_var)
  
  return(paths)
}

get_paths = function(model, x_var, y_var) {
  create_paths(model, x_var, y_var) %>% 
    select(a1:a2b2_cov_a2b2, -contains("sd"), -contains("cor"), -starts_with("cov")) %>% 
    gather(path, value) %>% 
    group_by(path) %>% 
    summarize(median = median(value),
              `Mdn [95% CI]` = sprintf("%.2f [%.2f, %.2f]", median(value), quantile(value, probs = .025), quantile(value, probs = .975))) %>%
    mutate(path = factor(path, levels = c("a1", "b1", "a1b1", "a1b1_cov_a1b1", "a2", "b2", "a2b2", "a2b2_cov_a2b2", "c", "c_prime"))) %>%
    arrange(path) %>%
    select(-median) %>%
    kable() %>%
    kableExtra::kable_styling()
}

get_paths_words = function(model, x_var, y_var) {
  create_paths_words(model, x_var, y_var) %>% 
    select(a1:a1b1_cov_a1b1, -contains("sd"), -contains("cor"), -starts_with("cov")) %>% 
    gather(path, value) %>% 
    group_by(path) %>% 
    summarize(median = median(value),
              `Mdn [95% CI]` = sprintf("%.2f [%.2f, %.2f]", median(value), quantile(value, probs = .025), quantile(value, probs = .975))) %>%
    mutate(path = factor(path, levels = c("a1", "b1", "a1b1", "a1b1_cov_a1b1", "c", "c_prime"))) %>%
    arrange(path) %>%
    select(-median) %>%
    kable() %>%
    kableExtra::kable_styling()
}

percent_mediated = function(model, x_var, y_var) {
  create_paths(model, x_var, y_var) %>% 
    select(a1b1_cov_a1b1, a2b2_cov_a2b2, c) %>% 
    gather(path, value) %>% 
    group_by(path) %>% 
    summarize(median = median(value)) %>%
    select(path, median) %>%
    spread(path, median) %>%
    mutate(self = round((a1b1_cov_a1b1 / c) * 100, 0),
           social = round((a2b2_cov_a2b2 / c) * 100, 0),
           total = self + social) %>%
    select(self, social, total) %>%
    kable(caption = "percent mediated") %>%
    kableExtra::kable_styling()
}

percent_mediated_words = function(model, x_var, y_var) {
  create_paths_words(model, x_var, y_var) %>% 
    select(a1b1_cov_a1b1, c) %>% 
    gather(path, value) %>% 
    group_by(path) %>% 
    summarize(median = median(value)) %>%
    select(path, median) %>%
    spread(path, median) %>%
    mutate(word_count = round((a1b1_cov_a1b1 / c) * 100, 0)) %>%
    select(word_count) %>%
    kable(caption = "percent mediated") %>%
    kableExtra::kable_styling()
}

prep data

First, we load the relevant packages and data, and define the plotting aesthetics.

load packages

if(!require('pacman')) {
    install.packages('pacman')
}

pacman::p_load(tidyverse, knitr, kableExtra, lmerTest, boot, report, brms, tidybayes, ggpubr, tidyText, EMAtools, broom.mixed)
report::cite_packages()
##   - Alboukadel Kassambara (2020). ggpubr: 'ggplot2' Based Publication Ready Plots. R package version 0.4.0. https://CRAN.R-project.org/package=ggpubr
##   - Angelo Canty and Brian Ripley (2021). boot: Bootstrap R (S-Plus) Functions. R package version 1.3-28.
##   - Ben Bolker and David Robinson (2022). broom.mixed: Tidying Methods for Mixed Models. R package version 0.2.9.3. https://CRAN.R-project.org/package=broom.mixed
##   - Dirk Eddelbuettel and Romain Francois (2011). Rcpp: Seamless R and C++ Integration. Journal of Statistical Software, 40(8), 1-18, <doi:10.18637/jss.v040.i08>.
##   - Douglas Bates and Martin Maechler (2021). Matrix: Sparse and Dense Matrix Classes and Methods. R package version 1.3-4. https://CRAN.R-project.org/package=Matrix
##   - Douglas Bates, Martin Maechler, Ben Bolker, Steve Walker (2015). Fitting Linear Mixed-Effects Models Using lme4. Journal of Statistical Software, 67(1), 1-48. doi:10.18637/jss.v067.i01.
##   - Evan Kleiman (2021). EMAtools: Data Management Tools for Real-Time Monitoring/Ecological Momentary Assessment Data. R package version 0.1.4. https://CRAN.R-project.org/package=EMAtools
##   - H. Wickham. ggplot2: Elegant Graphics for Data Analysis. Springer-Verlag New York, 2016.
##   - Hadley Wickham (2019). stringr: Simple, Consistent Wrappers for Common String Operations. R package version 1.4.0. https://CRAN.R-project.org/package=stringr
##   - Hadley Wickham (2021). forcats: Tools for Working with Categorical Variables (Factors). R package version 0.5.1. https://CRAN.R-project.org/package=forcats
##   - Hadley Wickham and Maximilian Girlich (2022). tidyr: Tidy Messy Data. R package version 1.2.0. https://CRAN.R-project.org/package=tidyr
##   - Hadley Wickham, Jim Hester and Jennifer Bryan (2022). readr: Read Rectangular Text Data. R package version 2.1.2. https://CRAN.R-project.org/package=readr
##   - Hadley Wickham, Romain François, Lionel Henry and Kirill Müller (2022). dplyr: A Grammar of Data Manipulation. R package version 1.0.8. https://CRAN.R-project.org/package=dplyr
##   - Hao Zhu (2021). kableExtra: Construct Complex Table with 'kable' and Pipe Syntax. R package version 1.3.4. https://CRAN.R-project.org/package=kableExtra
##   - Kay M (2022). _tidybayes: Tidy Data and Geoms for Bayesian Models_.doi: 10.5281/zenodo.1308151 (URL:https://doi.org/10.5281/zenodo.1308151), R package version 3.0.2, <URL:http://mjskay.github.io/tidybayes/>.
##   - Kirill Müller and Hadley Wickham (2021). tibble: Simple Data Frames. R package version 3.1.6. https://CRAN.R-project.org/package=tibble
##   - Kuznetsova A, Brockhoff PB, Christensen RHB (2017). "lmerTest Package:Tests in Linear Mixed Effects Models." _Journal of StatisticalSoftware_, *82*(13), 1-26. doi: 10.18637/jss.v082.i13 (URL:https://doi.org/10.18637/jss.v082.i13).
##   - Lionel Henry and Hadley Wickham (2020). purrr: Functional Programming Tools. R package version 0.3.4. https://CRAN.R-project.org/package=purrr
##   - Makowski, D., Ben-Shachar, M.S., Patil, I. & Lüdecke, D. (2020). Automated Results Reporting as a Practical Tool to Improve Reproducibility and Methodological Best Practices Adoption. CRAN. Available from https://github.com/easystats/report. doi: .
##   - Paul-Christian Bürkner (2017). brms: An R Package for Bayesian Multilevel Models Using Stan. Journal of Statistical Software, 80(1), 1-28. doi:10.18637/jss.v080.i01
##   - R Core Team (2021). R: A language and environment for statistical computing. R Foundation for Statistical Computing, Vienna, Austria. URL https://www.R-project.org/.
##   - Rinker, T. W. & Kurkiewicz, D. (2017). pacman: Package Management for R. version 0.5.0. Buffalo, New York. http://github.com/trinker/pacman
##   - Wickham et al., (2019). Welcome to the tidyverse. Journal of Open Source Software, 4(43), 1686, https://doi.org/10.21105/joss.01686
##   - Yihui Xie (2021). knitr: A General-Purpose Package for Dynamic Report Generation in R. R package version 1.37.

define aesthetics

palette_condition = c("#ee9b00", "#bb3e03", "#005f73")
palette_sharing = c("#086E70", "#FFA600")
palette_content = c("#9FC490", "#43BCCD")
palette_relevance = c("#FB590E", "#00667A")

plot_aes = theme_minimal() +
  theme(legend.position = "top",
        legend.text = element_text(size = 12),
        text = element_text(size = 16, family = "Futura Medium"),
        axis.text = element_text(color = "black"),
        axis.line = element_line(colour = "black"),
        axis.ticks.y = element_blank())

load data

study6 = read.csv("../data/study6.csv", stringsAsFactors = FALSE) %>%
  mutate(content = factor(content, levels = c("health", "climate")))

study6_comments = read.csv("../data/study6_comments.csv", stringsAsFactors = FALSE)

condition ns

study6 %>%
  select(group, SID) %>%
  unique() %>%
  group_by(group) %>%
  summarize(n = n())

manipulation checks

self-relevance

Test whether messages in the self condition will be rated as more self-relevant than messages in the control condition.

run model

mod_h1 = lmer(msg_rel_self ~ 1 + article_cond + (1 + article_cond | SID),
              data = study6,
              control = lmerControl(optimizer = "bobyqa"))
summary(mod_h1)
## Linear mixed model fit by REML. t-tests use Satterthwaite's method [
## lmerModLmerTest]
## Formula: msg_rel_self ~ 1 + article_cond + (1 + article_cond | SID)
##    Data: study6
## Control: lmerControl(optimizer = "bobyqa")
## 
## REML criterion at convergence: 74144.5
## 
## Scaled residuals: 
##     Min      1Q  Median      3Q     Max 
## -3.3486 -0.5966  0.0850  0.5823  3.3875 
## 
## Random effects:
##  Groups   Name               Variance Std.Dev. Corr       
##  SID      (Intercept)        489.1    22.12               
##           article_condself   222.4    14.91    -0.44      
##           article_condsocial 145.9    12.08    -0.34  0.06
##  Residual                    552.3    23.50               
## Number of obs: 7940, groups:  SID, 397
## 
## Fixed effects:
##                    Estimate Std. Error      df t value             Pr(>|t|)    
## (Intercept)          52.849      1.171 396.000  45.132 < 0.0000000000000002 ***
## article_condself     12.408      1.218 225.445  10.189 < 0.0000000000000002 ***
## article_condsocial    5.118      1.096 212.745   4.671           0.00000532 ***
## ---
## Signif. codes:  0 '***' 0.001 '**' 0.01 '*' 0.05 '.' 0.1 ' ' 1
## 
## Correlation of Fixed Effects:
##             (Intr) artcl_cndsl
## artcl_cndsl -0.352            
## artcl_cndsc -0.287  0.101

model summary table

table_model(mod_h1)
term b [95% CI] d df t p
control 52.85 [50.55, 55.15] 396.00 45.13 < .001
self 12.41 [10.01, 14.81] 1.36 225.44 10.19 < .001
social 5.12 [2.96, 7.28] 0.64 212.74 4.67 < .001

social relevance

Test whether messages in the social condition will be rated as more socially relevant than messages in the control condition.

run model

mod_h2 = lmer(msg_rel_social ~ 1 + article_cond + (1 + article_cond | SID),
              data = study6,
              control = lmerControl(optimizer = "bobyqa"))
summary(mod_h2)
## Linear mixed model fit by REML. t-tests use Satterthwaite's method [
## lmerModLmerTest]
## Formula: msg_rel_social ~ 1 + article_cond + (1 + article_cond | SID)
##    Data: study6
## Control: lmerControl(optimizer = "bobyqa")
## 
## REML criterion at convergence: 72201.7
## 
## Scaled residuals: 
##     Min      1Q  Median      3Q     Max 
## -3.8896 -0.4633  0.0913  0.5490  3.4932 
## 
## Random effects:
##  Groups   Name               Variance Std.Dev. Corr       
##  SID      (Intercept)        481.0    21.93               
##           article_condself   158.1    12.57    -0.46      
##           article_condsocial 167.1    12.93    -0.47  0.27
##  Residual                    426.8    20.66               
## Number of obs: 7940, groups:  SID, 397
## 
## Fixed effects:
##                    Estimate Std. Error      df t value             Pr(>|t|)    
## (Intercept)          58.436      1.149 396.000   50.88 < 0.0000000000000002 ***
## article_condself      8.656      1.040 228.124    8.32  0.00000000000000804 ***
## article_condsocial    8.904      1.062 220.989    8.38  0.00000000000000616 ***
## ---
## Signif. codes:  0 '***' 0.001 '**' 0.01 '*' 0.05 '.' 0.1 ' ' 1
## 
## Correlation of Fixed Effects:
##             (Intr) artcl_cndsl
## artcl_cndsl -0.356            
## artcl_cndsc -0.365  0.130

model summary table

table_model(mod_h2)
term b [95% CI] d df t p
control 58.44 [56.18, 60.69] 396.00 50.88 < .001
self 8.66 [6.61, 10.71] 1.10 228.12 8.32 < .001
social 8.90 [6.81, 11.00] 1.13 220.99 8.38 < .001

condition effects by sharing type

Test whether messages in the experimental conditions will evoke higher sharing intentions than messages in the control condition, and whether this is moderated by sharing type.

run model

mod_h3_h4 = lmer(msg_share ~ 1 + article_cond*sharing_type + (1 + sharing_type | SID),
              data = study6,
              control = lmerControl(optimizer = "bobyqa"))
summary(mod_h3_h4)
## Linear mixed model fit by REML. t-tests use Satterthwaite's method [
## lmerModLmerTest]
## Formula: msg_share ~ 1 + article_cond * sharing_type + (1 + sharing_type |  
##     SID)
##    Data: study6
## Control: lmerControl(optimizer = "bobyqa")
## 
## REML criterion at convergence: 71638.9
## 
## Scaled residuals: 
##     Min      1Q  Median      3Q     Max 
## -4.0176 -0.4887 -0.0143  0.4899  4.3824 
## 
## Random effects:
##  Groups   Name         Variance Std.Dev. Corr 
##  SID      (Intercept)  845.7    29.08         
##           sharing_type 128.1    11.32    -0.44
##  Residual              386.8    19.67         
## Number of obs: 7939, groups:  SID, 397
## 
## Fixed effects:
##                                  Estimate Std. Error        df t value
## (Intercept)                       45.0383     1.5249  431.3357  29.536
## article_condself                   5.2305     0.8489 7536.0749   6.162
## article_condsocial                 3.3742     0.8546 7535.2126   3.948
## sharing_type                       0.1607     0.8440  743.4852   0.190
## article_condself:sharing_type      2.0847     1.1538 6961.8849   1.807
## article_condsocial:sharing_type    3.5251     1.1609 6926.6611   3.036
##                                             Pr(>|t|)    
## (Intercept)                     < 0.0000000000000002 ***
## article_condself                      0.000000000756 ***
## article_condsocial                    0.000079372297 ***
## sharing_type                                  0.8490    
## article_condself:sharing_type                 0.0708 .  
## article_condsocial:sharing_type               0.0024 ** 
## ---
## Signif. codes:  0 '***' 0.001 '**' 0.01 '*' 0.05 '.' 0.1 ' ' 1
## 
## Correlation of Fixed Effects:
##               (Intr) artcl_cndsl artcl_cndsc shrng_ artcl_cndsl:_
## artcl_cndsl   -0.151                                             
## artcl_cndsc   -0.150  0.075                                      
## sharing_typ   -0.433  0.272       0.270                          
## artcl_cndsl:_  0.111 -0.686      -0.106      -0.400              
## artcl_cndsc:_  0.110 -0.106      -0.685      -0.398  0.164

model summary table

table_model(mod_h3_h4)
term b [95% CI] d df t p
control 45.04 [42.04, 48.04] 431.34 29.54 < .001
self 5.23 [3.57, 6.89] 0.14 7536.07 6.16 < .001
social 3.37 [1.70, 5.05] 0.09 7535.21 3.95 < .001
sharing type 0.16 [-1.50, 1.82] 0.01 743.49 0.19 .850
self x sharing type 2.08 [-0.18, 4.35] 0.04 6961.88 1.81 .070
social x sharing type 3.53 [1.25, 5.80] 0.07 6926.66 3.04 < .001

combined plot

This is the plot in Figure 4.

# generate predicted values
predicted_h1 = ggeffects::ggpredict(mod_h1, c("article_cond")) %>%
              data.frame() %>%
  mutate(model = "self\nrelevance")

predicted_h2 = ggeffects::ggpredict(mod_h2, c("article_cond")) %>%
              data.frame() %>%
  mutate(model = "social\nrelevance")

predicted_h3_h4 = ggeffects::ggpredict(mod_h3_h4, c("article_cond", "sharing_type")) %>%
              data.frame() %>%
  mutate(group = ifelse(group == "0", "broadcast sharing", "narrowcast sharing"))

# manipulation check plot
check = bind_rows(predicted_h1, predicted_h2) %>%
  ggplot(aes(x = model, y = predicted, color = x)) +
    geom_pointrange(aes( ymin = conf.low, ymax = conf.high), position = position_dodge(.5), size = 1) +
    coord_flip() +
    scale_color_manual(name = "", values = palette_condition) +
    scale_y_continuous(limits = c(50, 72)) +
    labs(x = "", y = "\nmean predicted rating") +
    plot_aes +
    theme(legend.position = c(.85, .15))

# causal analysis plot
causal = predicted_h3_h4 %>%
  mutate(group = gsub(" sharing", "", group)) %>%
  ggplot(aes(x = x, y = predicted, color = x)) +
  geom_pointrange(aes(ymin = conf.low, ymax = conf.high, alpha = group), position = position_dodge(.5), size = 1) +
  coord_flip() +
  scale_color_manual(name = "", values = palette_condition, guide = "none") +
  scale_alpha_manual(name = "", values = c(1, .5)) +
  labs(x = "", y = "\nmean predicted sharing intention rating") +
  scale_y_continuous(limits = c(40, 60)) +
  plot_aes +
  theme(legend.position = c(.85, .15))

cowplot::plot_grid(check, causal, labels = c("A", "B"))

mediation

Use Elizabeth Page-Gould’s code for estimating indirect effects in multilevel models to test whether the experimental effects on sharing intentions are mediate through self or social relevance.

prep data

# source functions
source("indirectMLM.R")

# create self condition dataframe
data_med_self = study6 %>%
  filter(group == "self") %>%
  mutate(article_cond = ifelse(article_cond == "self", 1, 0),
         sharing_type = ifelse(sharing_type == 0, "broadcast", "narrowcast"),
         SID = as.character(SID)) %>%
  spread(sharing_type, msg_share) %>%
  select(SID, article_cond, trial, msg_rel_self, broadcast, narrowcast) %>%
  na.omit() %>%
  data.frame()

# create social condition dataframe
data_med_social = study6 %>%
  filter(group == "social") %>%
  mutate(article_cond = ifelse(article_cond == "social", 1, 0),
         sharing_type = ifelse(sharing_type == 0, "broadcast", "narrowcast"),
         SID = as.character(SID)) %>%
  spread(sharing_type, msg_share) %>%
  select(SID, article_cond, trial, msg_rel_social, broadcast, narrowcast) %>%
  na.omit() %>%
  data.frame()

self condition

Test whether there is an indirect effect through self-relevance, such that the self-relevance manipulation will be associated with higher self-relevance ratings, which in turn will be related to stronger a) broadcast and b) narrowcast sharing intentions.

broadcast intentions

y_var = "broadcast"
m_var = "msg_rel_self"
model_name = "mediation_self_broadcast"
data = data_med_self

if (file.exists(sprintf("models/model_%s.RDS", model_name))) {
  assign(get("model_name"), readRDS(sprintf("models/model_%s.RDS", model_name)))
} else {
  assign(get("model_name"), boot(data = data, statistic = indirect.mlm, R = 500,
                                 y = y_var, x = "article_cond", mediator = m_var, group.id = "SID",
                                 between.m = F, uncentered.x = F))
  saveRDS(eval(parse(text = model_name)), sprintf("models/model_%s.RDS", model_name))
}

indirect.mlm.summary(get(model_name))
## #### Population Covariance ####
## Covariance of Random Slopes a and b: -0.129 [-0.516, 0.294]
## 
## 
## #### Indirect Effects ####
## # Within-subject Effects
## Unbiased Estimate of Within-subjects Indirect Effect: 4.21 [3.362, 5.073]
## Biased Estimate of Within-subjects Indirect Effect: 4.339 [3.5, 5.151]
## Bias in Within-subjects Indirect Effect: 0.128 [0.006, 0.52]
## 
## 
## #### Total Effect ####
## Unbiased Estimate of Total Effect: 5.377 [3.828, 6.86]
## Biased Total Effect of X on Y (c path): 5.48 [3.851, 7.032]
## Bias in Total Effect: 0.103 [0.008, 0.448]
## 
## 
## #### Direct Effects ####
## Direct Effect of Predictor on Dependent Variable (c' path): 1.167 [-0.127, 2.668]
## Within-subjects Effect of Predictor on Mediator (a path for group-mean centered predictor): 12.629 [10.572, 14.777]
## Within-subjects Effect of Mediator on Dependent Variable (b path for group-mean centered mediator): 0.344 [0.308, 0.378]
# percent mediated
sprintf("percent mediated = %s", round(((12.629 * 0.344) / 5.377) * 100, 0))
## [1] "percent mediated = 81"

narrowcast intentions

y_var = "narrowcast"
m_var = "msg_rel_self"
model_name = "mediation_self_narrowcast"
data = data_med_self

if (file.exists(sprintf("models/model_%s.RDS", model_name))) {
  assign(get("model_name"), readRDS(sprintf("models/model_%s.RDS", model_name)))
} else {
  assign(get("model_name"), boot(data = data, statistic = indirect.mlm, R = 500,
                                 y = y_var, x = "article_cond", mediator = m_var, group.id = "SID",
                                 between.m = F, uncentered.x = F))
  saveRDS(eval(parse(text = model_name)), sprintf("models/model_%s.RDS", model_name))
}

indirect.mlm.summary(get(model_name))
## #### Population Covariance ####
## Covariance of Random Slopes a and b: -0.039 [-0.428, 0.595]
## 
## 
## #### Indirect Effects ####
## # Within-subject Effects
## Unbiased Estimate of Within-subjects Indirect Effect: 5.294 [4.288, 6.45]
## Biased Estimate of Within-subjects Indirect Effect: 5.332 [4.228, 6.213]
## Bias in Within-subjects Indirect Effect: 0.038 [0.011, 0.612]
## 
## 
## #### Total Effect ####
## Unbiased Estimate of Total Effect: 6.789 [5.291, 8.528]
## Biased Total Effect of X on Y (c path): 7.063 [5.324, 8.728]
## Bias in Total Effect: 0.274 [0.011, 0.527]
## 
## 
## #### Direct Effects ####
## Direct Effect of Predictor on Dependent Variable (c' path): 1.495 [0.028, 3.025]
## Within-subjects Effect of Predictor on Mediator (a path for group-mean centered predictor): 12.629 [10.519, 14.523]
## Within-subjects Effect of Mediator on Dependent Variable (b path for group-mean centered mediator): 0.422 [0.377, 0.453]
# percent mediated
sprintf("percent mediated = %s", round(((12.629 * 0.422) / 6.789) * 100, 0))
## [1] "percent mediated = 79"

social condition

Test whether there is an indirect effect through social relevance, such that the social relevance manipulation will be associated with higher social relevance ratings, which in turn will be related to stronger a) broadcast and b) narrowcast sharing intentions.

broadcast intentions

y_var = "broadcast"
m_var = "msg_rel_social"
model_name = "mediation_social_broadcast"
data = data_med_social

if (file.exists(sprintf("models/model_%s.RDS", model_name))) {
  assign(get("model_name"), readRDS(sprintf("models/model_%s.RDS", model_name)))
} else {
  assign(get("model_name"), boot(data = data, statistic = indirect.mlm, R = 500,
                                 y = y_var, x = "article_cond", mediator = m_var, group.id = "SID",
                                 between.m = F, uncentered.x = F))
  saveRDS(eval(parse(text = model_name)), sprintf("models/model_%s.RDS", model_name))
}

indirect.mlm.summary(get(model_name))
## #### Population Covariance ####
## Covariance of Random Slopes a and b: -0.302 [-0.824, 0.074]
## 
## 
## #### Indirect Effects ####
## # Within-subject Effects
## Unbiased Estimate of Within-subjects Indirect Effect: 3.759 [2.691, 4.711]
## Biased Estimate of Within-subjects Indirect Effect: 4.059 [3.037, 5.098]
## Bias in Within-subjects Indirect Effect: 0.301 [0.012, 0.82]
## 
## 
## #### Total Effect ####
## Unbiased Estimate of Total Effect: 3.402 [1.719, 4.812]
## Biased Total Effect of X on Y (c path): 3.122 [1.524, 4.79]
## Bias in Total Effect: 0.28 [0.009, 0.409]
## 
## 
## #### Direct Effects ####
## Direct Effect of Predictor on Dependent Variable (c' path): -0.357 [-1.81, 1.007]
## Within-subjects Effect of Predictor on Mediator (a path for group-mean centered predictor): 8.591 [6.71, 10.646]
## Within-subjects Effect of Mediator on Dependent Variable (b path for group-mean centered mediator): 0.472 [0.431, 0.509]
# percent mediated
sprintf("percent mediated = %s", round(((8.591 * 0.472) / 3.402) * 100, 0))
## [1] "percent mediated = 119"

narrowcast intentions

y_var = "narrowcast"
m_var = "msg_rel_social"
model_name = "mediation_social_narrowcast"
data = data_med_social

if (file.exists(sprintf("models/model_%s.RDS", model_name))) {
  assign(get("model_name"), readRDS(sprintf("models/model_%s.RDS", model_name)))
} else {
  assign(get("model_name"), boot(data = data, statistic = indirect.mlm, R = 500,
                                 y = y_var, x = "article_cond", mediator = m_var, group.id = "SID",
                                 between.m = F, uncentered.x = F))
  saveRDS(eval(parse(text = model_name)), sprintf("models/model_%s.RDS", model_name))
}

indirect.mlm.summary(get(model_name))
## #### Population Covariance ####
## Covariance of Random Slopes a and b: -0.247 [-0.655, 0.177]
## 
## 
## #### Indirect Effects ####
## # Within-subject Effects
## Unbiased Estimate of Within-subjects Indirect Effect: 4.482 [3.4, 5.491]
## Biased Estimate of Within-subjects Indirect Effect: 4.728 [3.644, 5.711]
## Bias in Within-subjects Indirect Effect: 0.246 [0.011, 0.652]
## 
## 
## #### Total Effect ####
## Unbiased Estimate of Total Effect: 7.326 [5.325, 8.797]
## Biased Total Effect of X on Y (c path): 7.162 [5.305, 8.829]
## Bias in Total Effect: 0.163 [0.005, 0.385]
## 
## 
## #### Direct Effects ####
## Direct Effect of Predictor on Dependent Variable (c' path): 2.843 [1.231, 4.147]
## Within-subjects Effect of Predictor on Mediator (a path for group-mean centered predictor): 8.591 [6.75, 10.425]
## Within-subjects Effect of Mediator on Dependent Variable (b path for group-mean centered mediator): 0.55 [0.5, 0.589]
# percent mediated
sprintf("percent mediated = %s", round(((8.591 * 0.55) / 7.326) * 100, 0))
## [1] "percent mediated = 64"

post-hoc

These analyses were added in response to feedback from reviewers during peer review.

moderation by article content

Are the relationships moderated by article content types (health or climate)?

self-relevance

run model

Note: The model allowing both condition and article content type to vary randomly across people did not converge. We therefore used AIC to select the best fitting random effects structure and summarize results from this model

mod_h1_1 = lmer(msg_rel_self ~ 1 + article_cond * content + (1 + article_cond | SID),
              data = study6,
              control = lmerControl(optimizer = "bobyqa"))
mod_h1_2 = lmer(msg_rel_self ~ 1 + article_cond * content + (1 + content | SID),
              data = study6,
              control = lmerControl(optimizer = "bobyqa"))
anova(mod_h1_1, mod_h1_2)
summary(mod_h1_2)
## Linear mixed model fit by REML. t-tests use Satterthwaite's method [
## lmerModLmerTest]
## Formula: msg_rel_self ~ 1 + article_cond * content + (1 + content | SID)
##    Data: study6
## Control: lmerControl(optimizer = "bobyqa")
## 
## REML criterion at convergence: 73563
## 
## Scaled residuals: 
##     Min      1Q  Median      3Q     Max 
## -3.4975 -0.5745  0.0706  0.5683  3.6967 
## 
## Random effects:
##  Groups   Name           Variance Std.Dev. Corr 
##  SID      (Intercept)    489.4    22.12         
##           contentclimate 393.1    19.83    -0.38
##  Residual                495.1    22.25         
## Number of obs: 7940, groups:  SID, 397
## 
## Fixed effects:
##                                    Estimate Std. Error        df t value
## (Intercept)                         51.1853     1.2211  476.5708  41.918
## article_condself                    13.2763     1.0107 7500.6358  13.136
## article_condsocial                   5.3246     1.0138 7488.0287   5.252
## contentclimate                       3.4472     1.2309  589.1541   2.801
## article_condself:contentclimate     -2.2894     1.4120 7490.1761  -1.621
## article_condsocial:contentclimate   -0.1779     1.4179 7477.5483  -0.125
##                                               Pr(>|t|)    
## (Intercept)                       < 0.0000000000000002 ***
## article_condself                  < 0.0000000000000002 ***
## article_condsocial                         0.000000154 ***
## contentclimate                                 0.00527 ** 
## article_condself:contentclimate                0.10499    
## article_condsocial:contentclimate              0.90016    
## ---
## Signif. codes:  0 '***' 0.001 '**' 0.01 '*' 0.05 '.' 0.1 ' ' 1
## 
## Correlation of Fixed Effects:
##              (Intr) artcl_cndsl artcl_cndsc cntntc artcl_cndsl:
## artcl_cndsl  -0.217                                            
## artcl_cndsc  -0.220  0.066                                     
## contentclmt  -0.454  0.217       0.220                         
## artcl_cndsl:  0.157 -0.698      -0.072      -0.318             
## artcl_cndsc:  0.158 -0.071      -0.697      -0.315  0.100

model summary table

table_model(mod_h1_2)
term b [95% CI] d df t p
control 51.19 [48.79, 53.58] 476.57 41.92 < .001
self 13.28 [11.30, 15.26] 0.30 7500.64 13.14 < .001
social 5.32 [3.34, 7.31] 0.12 7488.03 5.25 < .001
content (climate) 3.45 [1.03, 5.86] 0.23 589.15 2.80 .010
self x content (climate) -2.29 [-5.06, 0.48] -0.04 7490.18 -1.62 .100
social x content (climate) -0.18 [-2.96, 2.60] -0.00 7477.55 -0.13 .900

social relevance

run model

mod_h2 = lmer(msg_rel_social ~ 1 + article_cond * content + (1 + article_cond + content | SID),
              data = study6,
              control = lmerControl(optimizer = "bobyqa"))
summary(mod_h2)
## Linear mixed model fit by REML. t-tests use Satterthwaite's method [
## lmerModLmerTest]
## Formula: msg_rel_social ~ 1 + article_cond * content + (1 + article_cond +  
##     content | SID)
##    Data: study6
## Control: lmerControl(optimizer = "bobyqa")
## 
## REML criterion at convergence: 71331.2
## 
## Scaled residuals: 
##     Min      1Q  Median      3Q     Max 
## -4.2233 -0.4311  0.0831  0.5342  3.7533 
## 
## Random effects:
##  Groups   Name               Variance Std.Dev. Corr             
##  SID      (Intercept)        491.6    22.17                     
##           article_condself   165.2    12.85    -0.39            
##           article_condsocial 203.8    14.28    -0.48 -0.06      
##           contentclimate     283.4    16.83    -0.20 -0.12 -0.03
##  Residual                    347.1    18.63                     
## Number of obs: 7940, groups:  SID, 397
## 
## Fixed effects:
##                                   Estimate Std. Error       df t value
## (Intercept)                         61.343      1.194  418.312  51.395
## article_condself                     7.493      1.200  380.443   6.247
## article_condsocial                   7.742      1.253  350.234   6.178
## contentclimate                      -5.723      1.048  582.803  -5.460
## article_condself:contentclimate      1.929      1.184 7130.851   1.629
## article_condsocial:contentclimate    2.233      1.188 7125.900   1.879
##                                               Pr(>|t|)    
## (Intercept)                       < 0.0000000000000002 ***
## article_condself                         0.00000000112 ***
## article_condsocial                       0.00000000180 ***
## contentclimate                           0.00000007037 ***
## article_condself:contentclimate                 0.1033    
## article_condsocial:contentclimate               0.0603 .  
## ---
## Signif. codes:  0 '***' 0.001 '**' 0.01 '*' 0.05 '.' 0.1 ' ' 1
## 
## Correlation of Fixed Effects:
##              (Intr) artcl_cndsl artcl_cndsc cntntc artcl_cndsl:
## artcl_cndsl  -0.329                                            
## artcl_cndsc  -0.386  0.127                                     
## contentclmt  -0.300  0.099       0.135                         
## artcl_cndsl:  0.135 -0.498      -0.058      -0.313             
## artcl_cndsc:  0.135 -0.045      -0.461      -0.310  0.099

model summary table

table_model(mod_h2)
term b [95% CI] d df t p
control 61.34 [59.00, 63.69] 418.31 51.40 < .001
self 7.49 [5.13, 9.85] 0.64 380.44 6.25 < .001
social 7.74 [5.28, 10.21] 0.66 350.23 6.18 < .001
content (climate) -5.72 [-7.78, -3.66] -0.45 582.80 -5.46 < .001
self x content (climate) 1.93 [-0.39, 4.25] 0.04 7130.85 1.63 .100
social x content (climate) 2.23 [-0.10, 4.56] 0.04 7125.90 1.88 .060

sharing

run model

mod_h3_h4 = lmer(msg_share ~ 1 + article_cond*sharing_type*content + (1 + sharing_type + content | SID),
              data = study6,
              control = lmerControl(optimizer = "bobyqa"))
summary(mod_h3_h4)
## Linear mixed model fit by REML. t-tests use Satterthwaite's method [
## lmerModLmerTest]
## Formula: msg_share ~ 1 + article_cond * sharing_type * content + (1 +  
##     sharing_type + content | SID)
##    Data: study6
## Control: lmerControl(optimizer = "bobyqa")
## 
## REML criterion at convergence: 71332.9
## 
## Scaled residuals: 
##     Min      1Q  Median      3Q     Max 
## -3.8661 -0.4764 -0.0139  0.4778  4.2978 
## 
## Random effects:
##  Groups   Name           Variance Std.Dev. Corr       
##  SID      (Intercept)    865.8    29.42               
##           sharing_type   135.2    11.63    -0.41      
##           contentclimate 124.4    11.15    -0.14 -0.12
##  Residual                351.2    18.74               
## Number of obs: 7939, groups:  SID, 397
## 
## Fixed effects:
##                                                 Estimate Std. Error        df
## (Intercept)                                      44.3935     1.5942  477.2320
## article_condself                                  4.2828     1.1396 7083.9962
## article_condsocial                                3.9382     1.1405 7067.0243
## sharing_type                                      2.0942     1.0261 1504.9798
## contentclimate                                    1.4479     1.0262 1695.6117
## article_condself:sharing_type                     2.2286     1.5367 7101.1088
## article_condsocial:sharing_type                   3.9765     1.5354 7082.5075
## article_condself:contentclimate                   1.4750     1.5691 7301.8591
## article_condsocial:contentclimate                -1.3762     1.5743 7291.9623
## sharing_type:contentclimate                      -3.9082     1.2100 6964.9808
## article_condself:sharing_type:contentclimate     -0.2526     2.1148 7063.1436
## article_condsocial:sharing_type:contentclimate   -0.7646     2.1222 7053.9721
##                                                t value             Pr(>|t|)    
## (Intercept)                                     27.846 < 0.0000000000000002 ***
## article_condself                                 3.758             0.000173 ***
## article_condsocial                               3.453             0.000557 ***
## sharing_type                                     2.041             0.041427 *  
## contentclimate                                   1.411             0.158426    
## article_condself:sharing_type                    1.450             0.147039    
## article_condsocial:sharing_type                  2.590             0.009623 ** 
## article_condself:contentclimate                  0.940             0.347249    
## article_condsocial:contentclimate               -0.874             0.382054    
## sharing_type:contentclimate                     -3.230             0.001244 ** 
## article_condself:sharing_type:contentclimate    -0.119             0.904929    
## article_condsocial:sharing_type:contentclimate  -0.360             0.718641    
## ---
## Signif. codes:  0 '***' 0.001 '**' 0.01 '*' 0.05 '.' 0.1 ' ' 1
## 
## Correlation of Fixed Effects:
##                (Intr) artcl_cndsl artcl_cndsc shrng_ cntntc artcl_cndsl:_
## artcl_cndsl    -0.204                                                    
## artcl_cndsc    -0.205  0.156                                             
## sharing_typ    -0.433  0.309       0.310                                 
## contentclmt    -0.297  0.324       0.328       0.309                     
## artcl_cndsl:_   0.147 -0.674      -0.163      -0.458 -0.237              
## artcl_cndsc:_   0.148 -0.163      -0.673      -0.461 -0.239  0.241       
## artcl_cndsl:    0.152 -0.689      -0.175      -0.233 -0.480  0.465       
## artcl_cndsc:    0.152 -0.172      -0.685      -0.232 -0.477  0.164       
## shrng_typ:c     0.188 -0.270      -0.272      -0.583 -0.590  0.401       
## artcl_cndsl:_: -0.111  0.468       0.161       0.345  0.349 -0.695       
## artcl_cndsc:_: -0.110  0.159       0.464       0.343  0.348 -0.236       
##                artcl_cndsc:_ artcl_cndsl: artcl_cndsc: shrn_: artcl_cndsl:_:
## artcl_cndsl                                                                 
## artcl_cndsc                                                                 
## sharing_typ                                                                 
## contentclmt                                                                 
## artcl_cndsl:_                                                               
## artcl_cndsc:_                                                               
## artcl_cndsl:    0.166                                                       
## artcl_cndsc:    0.461         0.250                                         
## shrng_typ:c     0.405         0.400        0.397                            
## artcl_cndsl:_: -0.239        -0.675       -0.235       -0.591               
## artcl_cndsc:_: -0.689        -0.235       -0.675       -0.588  0.348

model summary table

table_model(mod_h3_h4)
term b [95% CI] d df t p
control 44.39 [41.26, 47.53] 477.23 27.85 < .001
self 4.28 [2.05, 6.52] 0.09 7084.00 3.76 < .001
social 3.94 [1.70, 6.17] 0.08 7067.02 3.45 < .001
sharing type 2.09 [0.08, 4.11] 0.11 1504.98 2.04 .040
content (climate) 1.45 [-0.56, 3.46] 0.07 1695.61 1.41 .160
self x sharing type 2.23 [-0.78, 5.24] 0.03 7101.11 1.45 .150
social x sharing type 3.98 [0.97, 6.99] 0.06 7082.51 2.59 .010
self x content (climate) 1.47 [-1.60, 4.55] 0.02 7301.86 0.94 .350
social x content (climate) -1.38 [-4.46, 1.71] -0.02 7291.96 -0.87 .380
sharing type x content (climate) -3.91 [-6.28, -1.54] -0.08 6964.98 -3.23 < .001
self x sharing type x content (climate) -0.25 [-4.40, 3.89] -0.00 7063.14 -0.12 .900
social x sharing type x content (climate) -0.76 [-4.92, 3.40] -0.01 7053.97 -0.36 .720

plot

# generate predicted values
predicted_h1 = ggeffects::ggpredict(mod_h1_2, c("article_cond", "content")) %>%
              data.frame() %>%
  mutate(model = "self\nrelevance")

predicted_h2 = ggeffects::ggpredict(mod_h2, c("article_cond", "content")) %>%
              data.frame() %>%
  mutate(model = "social\nrelevance")

predicted_h3_h4 = ggeffects::ggpredict(mod_h3_h4, c("article_cond", "sharing_type", "content")) %>%
              data.frame() %>%
  mutate(group = ifelse(group == "0", "broadcast sharing", "narrowcast sharing"))

# manipulation check plot
check = bind_rows(predicted_h1, predicted_h2) %>%
  ggplot(aes(x = x, y = predicted, color = group)) +
  stat_summary(aes(group = group), fun.y = "mean", geom = "line", position = position_dodge(.2), size = 1) + 
  geom_pointrange(aes( ymin = conf.low, ymax = conf.high), position = position_dodge(.2), size = 1) +
  facet_grid(~model) +
  scale_color_manual(name = "", values = palette_content) +
  labs(x = "", y = "mean predicted rating\n") +
  plot_aes +
  theme(legend.position = c(.85, .15))

# causal analysis plot
causal = predicted_h3_h4 %>%
  mutate(group = gsub(" sharing", "", group)) %>%
  ggplot(aes(x = x, y = predicted, color = facet)) + 
  stat_summary(aes(group = facet), fun.y = "mean", geom = "line", position = position_dodge(.2), size = 1) + 
  geom_pointrange(aes(ymin = conf.low, ymax = conf.high), position = position_dodge(.2), size = 1) +
  facet_grid(~group) +
  scale_color_manual(name = "", values = palette_content) +
  scale_alpha_manual(name = "", values = c(1, .5)) +
  labs(x = "", y = "mean predicted sharing intention rating\n") +
  scale_y_continuous(limits = c(40, 60)) +
  plot_aes +
  theme(legend.position = c(.85, .15))

cowplot::plot_grid(check, causal, labels = c("A", "B"))

bayesian parallel mediation

To include both self and social relevance as parallel mediators of the relationship between the experimental condition (self, social, or control) and sharing intentions, we estimated four separate models using {brms}.

prep data

# create self condition dataframe
data_med_self = study6 %>%
  filter(group == "self") %>%
  mutate(sharing_type = ifelse(sharing_type == 0, "broadcast", "narrowcast")) %>%
  spread(sharing_type, msg_share) %>%
  select(SID, article_cond, trial, msg_rel_social, msg_rel_self, broadcast, narrowcast)

# create social condition dataframe
data_med_social = study6 %>%
  filter(group == "social") %>%
  mutate(sharing_type = ifelse(sharing_type == 0, "broadcast", "narrowcast")) %>%
  spread(sharing_type, msg_share) %>%
  select(SID, article_cond, trial, msg_rel_self, msg_rel_social, broadcast, narrowcast)

# set seed
seed = 6523

self condition

Test whether there is an indirect effect through social relevance, such that the self relevance manipulation will be associated with higher social relevance ratings, which in turn will be related to stronger a) broadcast and b) narrowcast sharing intentions.

broadcast intentions

x_var = "self"
y_var = "broadcast"
model_name = "mediation_self_broadcast_brm"
data = data_med_self
model_formula = bf(msg_rel_social ~ article_cond + (1 + article_cond |i| SID)) +
  bf(msg_rel_self ~ article_cond + (1 + article_cond |i| SID)) +
  bf(paste0(y_var, " ~ article_cond + msg_rel_social + msg_rel_self + (1 +  msg_rel_social + msg_rel_self |i| SID)")) +
  set_rescor(FALSE)

model_self_broad = run_brm_model(model_name, model_formula, y_var, data)
get_paths(model_self_broad, x_var, y_var)
path Mdn [95% CI]
a1 12.62 [9.92, 15.56]
b1 0.24 [0.18, 0.29]
a1b1 2.95 [2.06, 4.03]
a1b1_cov_a1b1 3.18 [2.05, 4.50]
a2 8.94 [6.67, 11.23]
b2 0.19 [0.13, 0.24]
a2b2 1.65 [1.03, 2.36]
a2b2_cov_a2b2 1.67 [0.86, 2.53]
c 5.27 [3.69, 6.99]
c_prime 0.64 [-0.68, 2.13]
percent_mediated(model_self_broad, x_var, y_var)
percent mediated
self social total
60 32 92

narrowcast intentions

x_var = "self"
y_var = "narrowcast"
model_name = "mediation_self_narrowcast_brm"
data = data_med_self
model_formula = bf(msg_rel_social ~ article_cond + (1 + article_cond |i| SID)) +
  bf(msg_rel_self ~ article_cond + (1 + article_cond |i| SID)) +
  bf(paste0(y_var, " ~ article_cond + msg_rel_social + msg_rel_self + (1 +  msg_rel_social + msg_rel_self |i| SID)")) +
  set_rescor(FALSE)

model_self_narrow = run_brm_model(model_name, model_formula, y_var, data)
get_paths(model_self_narrow, x_var, y_var)
path Mdn [95% CI]
a1 12.65 [9.77, 15.38]
b1 0.20 [0.14, 0.25]
a1b1 2.46 [1.58, 3.37]
a1b1_cov_a1b1 2.56 [1.45, 3.81]
a2 8.92 [6.67, 11.25]
b2 0.37 [0.30, 0.44]
a2b2 3.33 [2.35, 4.51]
a2b2_cov_a2b2 3.48 [2.31, 4.91]
c 6.80 [4.85, 8.90]
c_prime 1.01 [-0.42, 2.47]
percent_mediated(model_self_narrow, x_var, y_var)
percent mediated
self social total
38 51 89

social condition

Test whether there is an indirect effect through social relevance, such that the social relevance manipulation will be associated with higher social relevance ratings, which in turn will be related to stronger a) broadcast and b) narrowcast sharing intentions.

broadcast intentions

x_var = "social"
y_var = "broadcast"
m_var = "msg_rel_self"
model_name = "mediation_social_broadcast_brm"
data = data_med_social
model_formula = bf(msg_rel_social ~ article_cond + (1 + article_cond |i| SID)) +
  bf(msg_rel_self ~ article_cond + (1 + article_cond |i| SID)) +
  bf(paste0(y_var, " ~ article_cond + msg_rel_social + msg_rel_self + (1 +  msg_rel_social + msg_rel_self |i| SID)")) +
  set_rescor(FALSE)

model_social_broad = run_brm_model(model_name, model_formula, y_var, data)
get_paths(model_social_broad, x_var, y_var)
path Mdn [95% CI]
a1 4.94 [2.65, 7.43]
b1 0.26 [0.20, 0.31]
a1b1 1.26 [0.63, 1.99]
a1b1_cov_a1b1 1.19 [0.29, 2.12]
a2 8.61 [6.11, 11.01]
b2 0.28 [0.22, 0.34]
a2b2 2.42 [1.67, 3.24]
a2b2_cov_a2b2 2.27 [1.35, 3.43]
c 3.41 [1.75, 5.05]
c_prime -0.29 [-1.57, 1.02]
percent_mediated(model_social_broad, x_var, y_var)
percent mediated
self social total
35 67 102

narrowcast intentions

x_var = "social"
y_var = "narrowcast"
m_var = "msg_rel_self"
model_name = "mediation_social_narrowcast_brm"
data = data_med_social
model_formula = bf(msg_rel_social ~ article_cond + (1 + article_cond |i| SID)) +
  bf(msg_rel_self ~ article_cond + (1 + article_cond |i| SID)) +
  bf(paste0(y_var, " ~ article_cond + msg_rel_social + msg_rel_self + (1 +  msg_rel_social + msg_rel_self |i| SID)")) +
  set_rescor(FALSE)

model_social_narrow = run_brm_model(model_name, model_formula, y_var, data)
get_paths(model_social_narrow, x_var, y_var)
path Mdn [95% CI]
a1 4.94 [2.59, 7.42]
b1 0.13 [0.08, 0.19]
a1b1 0.64 [0.29, 1.16]
a1b1_cov_a1b1 0.65 [-0.11, 1.42]
a2 8.53 [6.25, 10.87]
b2 0.45 [0.38, 0.51]
a2b2 3.81 [2.69, 4.90]
a2b2_cov_a2b2 3.89 [2.59, 5.15]
c 7.15 [5.25, 9.00]
c_prime 2.67 [1.04, 4.19]
percent_mediated(model_social_narrow, x_var, y_var)
percent mediated
self social total
9 54 63

combined plot

labels = data.frame(model = c("self", "social"),
                    outcome = c("broadcast", "narrowcast"),
                    value = c(1, 1))

create_paths(model_self_broad, "self", "broadcast") %>%
  bind_rows(create_paths(model_self_narrow, "self", "narrowcast")) %>%
  bind_rows(create_paths(model_social_broad, "social", "broadcast")) %>%
  bind_rows(create_paths(model_social_narrow, "social", "narrowcast")) %>%
  select(model, outcome, a1b1_cov_a1b1, a2b2_cov_a2b2) %>% 
  gather(path, value, -model, -outcome) %>%
  mutate(path = ifelse(path == "a1b1_cov_a1b1", "self-relevance", "social relevance")) %>%
  ggplot(aes(x = value, y = "", fill = path)) +
  geom_rect(data = labels,
            aes(xmin = -Inf, xmax = Inf, ymin = -Inf, ymax = Inf),
            alpha = .5, fill = "grey") +
  stat_halfeye(alpha = .8) +
  facet_grid(model ~ outcome) +
  scale_y_discrete(expand = c(.1, 0)) +
  scale_fill_manual(values = palette_relevance, name = "mediator") +
  labs(x = "indirect effect", y = "") +
  plot_aes

word count analyses

In these analyses we looked at how depth of processing, operationalized as word count, is related to the outcomes of interest.

word count by condition

Does word count differ by condition?

summarize

n_words = study6_comments %>%
  mutate(study = "study 6",
         item = sprintf("%s_%s", content, article_number),
         SID = sprintf("%s_%s", study, SID)) %>%
  group_by(article_cond, SID, item) %>%
  tidytext::unnest_tokens(word, value) %>%
  summarize(n = n()) 

words_ratings = n_words %>%
  left_join(., study6, by = c()) %>%
  ungroup() %>%
  mutate(n_c = n - mean(n, na.rm = TRUE))

n_words %>%
  group_by(article_cond) %>%
  summarize(mean = mean(n, na.rm = TRUE),
            sd = sd(n, na.rm = TRUE),
            min = min(n, na.rm = TRUE),
            max = max(n, na.rm = TRUE)) %>%
  kable(digits = 2) %>%
  kableExtra::kable_styling()
article_cond mean sd min max
control 13.53 8.21 2 89
self 16.62 10.69 2 97
social 16.58 9.99 3 59

rsharing

mod_words = lmer(n ~ 1 + article_cond + (1 | SID),
              data = n_words,
              control = lmerControl(optimizer = "bobyqa"))

table_model(mod_words, eff_size = FALSE)
term b [95% CI] df t p
control 13.53 [12.75, 14.31] 437.17 33.98 < .001
self 3.08 [2.60, 3.56] 3725.05 12.63 < .001
social 3.05 [2.57, 3.54] 3727.22 12.43 < .001

self-relevance

mod_words_h1 = lmer(msg_rel_self ~ 1 + n_c + (1 + n_c | SID),
              data = words_ratings,
              control = lmerControl(optimizer = "bobyqa"))

table_model(mod_words_h1, eff_size = FALSE)
term b [95% CI] df t p
control 57.28 [55.09, 59.47] 389.24 51.49 < .001
word count 0.50 [0.32, 0.67] 273.86 5.62 < .001

social relevance

mod_words_h2 = lmer(msg_rel_social ~ 1 + n_c + (1 + n_c | SID),
              data = words_ratings,
              control = lmerControl(optimizer = "bobyqa"))

table_model(mod_words_h2, eff_size = FALSE)
term b [95% CI] df t p
control 62.75 [60.69, 64.82] 389.46 59.79 < .001
word count 0.48 [0.33, 0.63] 236.60 6.45 < .001

mediation models

Is the relationship between experimental condition (self, social, or control) and relevance (self or social) mediated by word count?

self –> self relevance

x_var = "self"
y_var = "msg_rel_self"
model_name = "mediation_self_words_selfrelevance_brm"
data = words_ratings %>%
  filter(group == "self")
model_formula = bf(n_c ~ article_cond + (1 + article_cond |i| SID)) +
  bf(paste0(y_var, " ~ article_cond + n_c + (1 + n_c |i| SID)")) +
  set_rescor(FALSE)

model_self_word = run_brm_model(model_name, model_formula, y_var, data)
get_paths_words(model_self_word, x_var, y_var)
path Mdn [95% CI]
a1 3.08 [2.30, 3.84]
b1 0.38 [0.12, 0.63]
a1b1 1.16 [0.32, 2.08]
a1b1_cov_a1b1 2.18 [1.00, 3.59]
c 11.59 [9.91, 13.32]
c_prime 10.42 [8.84, 12.13]
percent_mediated_words(model_self_word, x_var, y_var)
percent mediated
word_count
19

self –> social relevance

x_var = "self"
y_var = "msg_rel_social"
model_name = "mediation_self_words_socialrelevance_brm"
data = words_ratings %>%
  filter(group == "self")
model_formula = bf(n_c ~ article_cond + (1 + article_cond |i| SID)) +
  bf(paste0(y_var, " ~ article_cond + n_c + (1 + n_c |i| SID)")) +
  set_rescor(FALSE)

model_self_word = run_brm_model(model_name, model_formula, y_var, data)
get_paths_words(model_self_word, x_var, y_var)
path Mdn [95% CI]
a1 3.07 [2.30, 3.81]
b1 0.34 [0.13, 0.53]
a1b1 1.02 [0.35, 1.81]
a1b1_cov_a1b1 1.14 [0.11, 2.21]
c 8.85 [7.34, 10.29]
c_prime 7.82 [6.41, 9.28]
percent_mediated_words(model_self_word, x_var, y_var)
percent mediated
word_count
13

social –> social relevance

x_var = "social"
y_var = "msg_rel_social"
model_name = "mediation_social_words_socialrelevance_brm"
data = words_ratings %>%
  filter(group == "social")
model_formula = bf(n_c ~ article_cond + (1 + article_cond |i| SID)) +
  bf(paste0(y_var, " ~ article_cond + n_c + (1 + n_c |i| SID)")) +
  set_rescor(FALSE)

model_social_word = run_brm_model(model_name, model_formula, y_var, data)
get_paths_words(model_social_word, x_var, y_var)
path Mdn [95% CI]
a1 3.05 [2.29, 3.81]
b1 0.18 [-0.04, 0.42]
a1b1 0.54 [-0.10, 1.33]
a1b1_cov_a1b1 1.19 [0.15, 2.26]
c 7.88 [6.50, 9.47]
c_prime 7.35 [5.91, 8.78]
percent_mediated_words(model_social_word, x_var, y_var)
percent mediated
word_count
15

social –> self relevance

x_var = "social"
y_var = "msg_rel_self"
model_name = "mediation_social_words_selfrelevance_brm"
data = words_ratings %>%
  filter(group == "social")
model_formula = bf(n_c ~ article_cond + (1 + article_cond |i| SID)) +
  bf(paste0(y_var, " ~ article_cond + n_c + (1 + n_c |i| SID)")) +
  set_rescor(FALSE)

model_social_word = run_brm_model(model_name, model_formula, y_var, data)
get_paths_words(model_social_word, x_var, y_var)
path Mdn [95% CI]
a1 3.05 [2.33, 3.74]
b1 0.21 [-0.05, 0.48]
a1b1 0.65 [-0.14, 1.54]
a1b1_cov_a1b1 0.79 [-0.35, 2.04]
c 4.81 [3.06, 6.41]
c_prime 4.14 [2.46, 5.83]
percent_mediated_words(model_social_word, x_var, y_var)
percent mediated
word_count
16