Primary Analysis Re-Done for Selected Participants
Only Keep Mode 4 respondents who said they “knew” they needed to click the button or said they did not know but saw the comment box (note that they will have to click the button to see the comment box)
# mode 4 respondents to keep
mode4_respondents_to_keep <- df_followup_final %>% filter(Treatment == "Chat Generate") %>% filter(mode4_button == "No, I knew I needed to click this button." | (mode4_button == "Yes, I did NOT know I needed to click this button." & sawCommentBox == 1)) %>% pull(prolific_id)
mode123_respondents_to_keep <- df_wide_all %>% filter(Treatment != "Chat Generate") %>% pull(prolific_id)
respondents_to_keep <- c(mode4_respondents_to_keep, mode123_respondents_to_keep)
User Level Regression
All Videos
cov_form_lm <- paste0("num_comment ~ Treatment + ", paste(video_columns, collapse = " + "))
user_lm_all <- lm(cov_form_lm, data = df_wide_all %>% filter(prolific_id %in% respondents_to_keep))
cov_form_lm_with_cov <- paste0("num_comment ~ Treatment + ", paste(video_columns, collapse = " + "), "+ ", paste(covariates_simple, collapse = " + "),
"+ willingness_to_pay")
user_lm_with_cov_all <- lm(cov_form_lm_with_cov, data = df_wide_all %>% filter(prolific_id %in% respondents_to_keep))
stargazer(user_lm_all, user_lm_with_cov_all,
star.cutoffs = c(0.05, 0.01, 0.001),
dep.var.labels = "Number of Comments",
covariate.labels = c("Treatment: Hint Control", "Treatment: One-Click Generate", "Treatment: Chat Generate",
"Video 11", "Video 13", "Video 14", "Video 15", "Video 16", "Video 17",
"Video 18", "Video 19", "Video 20", "Video 21", "Video 22", "Video 23",
covariates_simple_fancy, "Willingness to Pay"),
column.labels = c("Without Covariates", "With Covariates"))
##
## % Table created by stargazer v.5.2.3 by Marek Hlavac, Social Policy Institute. E-mail: marek.hlavac at gmail.com
## % Date and time: Fri, Mar 28, 2025 - 11:02:42
## \begin{table}[!htbp] \centering
## \caption{}
## \label{}
## \begin{tabular}{@{\extracolsep{5pt}}lcc}
## \\[-1.8ex]\hline
## \hline \\[-1.8ex]
## & \multicolumn{2}{c}{\textit{Dependent variable:}} \\
## \cline{2-3}
## \\[-1.8ex] & \multicolumn{2}{c}{Number of Comments} \\
## & Without Covariates & With Covariates \\
## \\[-1.8ex] & (1) & (2)\\
## \hline \\[-1.8ex]
## Treatment: Hint Control & 0.229$^{*}$ & 0.246$^{**}$ \\
## & (0.093) & (0.091) \\
## & & \\
## Treatment: One-Click Generate & 0.195$^{*}$ & 0.236$^{**}$ \\
## & (0.092) & (0.090) \\
## & & \\
## Treatment: Chat Generate & 0.564$^{***}$ & 0.545$^{***}$ \\
## & (0.110) & (0.107) \\
## & & \\
## Video 11 & 0.204$^{*}$ & 0.148 \\
## & (0.084) & (0.082) \\
## & & \\
## Video 13 & 0.142 & 0.135 \\
## & (0.084) & (0.083) \\
## & & \\
## Video 14 & 0.327$^{***}$ & 0.363$^{***}$ \\
## & (0.092) & (0.091) \\
## & & \\
## Video 15 & 0.310$^{**}$ & 0.324$^{***}$ \\
## & (0.098) & (0.096) \\
## & & \\
## Video 16 & 0.276$^{**}$ & 0.277$^{**}$ \\
## & (0.085) & (0.086) \\
## & & \\
## Video 17 & 0.147 & 0.145 \\
## & (0.086) & (0.085) \\
## & & \\
## Video 18 & 0.124 & 0.155 \\
## & (0.089) & (0.088) \\
## & & \\
## Video 19 & 0.379$^{***}$ & 0.445$^{***}$ \\
## & (0.095) & (0.094) \\
## & & \\
## Video 20 & 0.274$^{**}$ & 0.230$^{*}$ \\
## & (0.094) & (0.093) \\
## & & \\
## Video 21 & 0.283$^{**}$ & 0.302$^{**}$ \\
## & (0.098) & (0.097) \\
## & & \\
## Video 22 & 0.191$^{*}$ & 0.171 \\
## & (0.096) & (0.094) \\
## & & \\
## Video 23 & 0.377$^{***}$ & 0.377$^{***}$ \\
## & (0.086) & (0.085) \\
## & & \\
## Age & & 0.003 \\
## & & (0.002) \\
## & & \\
## YouTube User & & 0.243$^{*}$ \\
## & & (0.102) \\
## & & \\
## Social Media: Non-User & & 0.468 \\
## & & (0.395) \\
## & & \\
## Social Media: User & & $-$0.148 \\
## & & (0.124) \\
## & & \\
## Social Media Usage (1 - 4 Scale) & & $-$0.080 \\
## & & (0.044) \\
## & & \\
## Online Usage (1 - 4 Scale) & & 0.031 \\
## & & (0.036) \\
## & & \\
## Female & & $-$0.175$^{*}$ \\
## & & (0.074) \\
## & & \\
## Race: Asian & & 0.211 \\
## & & (0.167) \\
## & & \\
## Race: Black & & $-$0.108 \\
## & & (0.137) \\
## & & \\
## Race: Hispanic & & $-$0.105 \\
## & & (0.185) \\
## & & \\
## Race: White & & $-$0.099 \\
## & & (0.118) \\
## & & \\
## Race: Other & & \\
## & & \\
## & & \\
## Education: High School or Less & & 0.090 \\
## & & (0.128) \\
## & & \\
## Education: Some College & & 0.092 \\
## & & (0.115) \\
## & & \\
## Education: Bachelor & & 0.115 \\
## & & (0.097) \\
## & & \\
## Education: Postgraduate & & \\
## & & \\
## & & \\
## Political Party: Democrat & & $-$0.077 \\
## & & (0.090) \\
## & & \\
## Political Party: Republican & & $-$0.215$^{*}$ \\
## & & (0.104) \\
## & & \\
## Political Party: Other & & \\
## & & \\
## & & \\
## Political Ideology (1 - 5 Scale; 5 Strong Liberal) & & $-$0.068 \\
## & & (0.041) \\
## & & \\
## Income (1 - 5 Scale) & & $-$0.028 \\
## & & (0.035) \\
## & & \\
## Social Media Reply Frequency (1 - 6 Scale) & & 0.128$^{***}$ \\
## & & (0.028) \\
## & & \\
## Review Frequency (1 - 6 Scale) & & 0.148$^{***}$ \\
## & & (0.033) \\
## & & \\
## Willingness to Pay & & 0.024 \\
## & & (0.029) \\
## & & \\
## Constant & 0.772$^{***}$ & 0.245 \\
## & (0.160) & (0.343) \\
## & & \\
## \hline \\[-1.8ex]
## Observations & 1,660 & 1,660 \\
## R$^{2}$ & 0.042 & 0.101 \\
## Adjusted R$^{2}$ & 0.033 & 0.081 \\
## Residual Std. Error & 1.409 (df = 1644) & 1.373 (df = 1623) \\
## F Statistic & 4.789$^{***}$ (df = 15; 1644) & 5.088$^{***}$ (df = 36; 1623) \\
## \hline
## \hline \\[-1.8ex]
## \textit{Note:} & \multicolumn{2}{r}{$^{*}$p$<$0.05; $^{**}$p$<$0.01; $^{***}$p$<$0.001} \\
## \end{tabular}
## \end{table}
user_lm_basic <- lm(num_comment ~ Treatment, data = df_wide_all %>% filter(prolific_id %in% respondents_to_keep))
coef_table <- summary(user_lm_basic)$coefficients
# row names contain Treatment or Intercept
coef_table <- coef_table[row.names(coef_table) %in% c("TreatmentHint Control", "TreatmentOne-Click Generate", "TreatmentChat Generate", "(Intercept)"),]
# ggplot
coef_df <- coef_table %>% as.data.frame()
coef_df$ci_lower <- coef_df$Estimate - coef_df$`Std. Error` * 1.96
coef_df$ci_upper <- coef_df$Estimate + coef_df$`Std. Error` * 1.96
coef_df$Treatment <- rownames(coef_df)
coef_df$Treatment <- str_replace(coef_df$Treatment, "Treatment", "")
coef_df$Treatment <- factor(coef_df$Treatment, levels = c( "(Intercept)", "Chat Generate", "One-Click Generate", "Hint Control"))
ggplot(coef_df %>% filter(Treatment != "(Intercept)"), aes(x = Estimate, y = Treatment)) +
geom_vline(xintercept = 0, linetype = "dashed") +
geom_point(aes(color = ifelse(ci_lower > 0 | ci_upper < 0, "Significant", "Not Significant")), size = 3) +
geom_errorbarh(aes(xmin = ci_lower, xmax = ci_upper), height = 0.1) +
theme_minimal() +
theme(legend.position = "none") +
# make fonts bigger
theme(axis.text.x = element_text(face = "bold", size = 12.5),
axis.text.y = element_text(face = "bold", size = 12.5),
axis.title.x = element_text(face = "bold",size = 15),
axis.title.y = element_text(face = "bold",size = 15)) +
# make title bigger and bold
theme(plot.title = element_text(face='bold', size=15),
plot.subtitle = element_text(size = 12.5)) +
labs(x = "Coefficient Estimate", y = "Treatment", title = "Number of Comments ATE: User Level Regression", subtitle = paste0("vs Pure Control (Baseline): ", round(coef_df$Estimate[1], 2)))
ggsave("tables_and_figures/num_comment_ate_redo.png", width = 8, height = 6)
First Three Videos
cov_form_lm <- paste0("num_comment ~ Treatment + ", paste(video_columns, collapse = " + "))
user_lm <- lm(cov_form_lm, data = df_wide %>% filter(prolific_id %in% respondents_to_keep))
cov_form_lm_with_cov <- paste0("num_comment ~ Treatment + ", paste(video_columns, collapse = " + "), "+ ", paste(covariates_simple, collapse = " + "))
user_lm_with_cov <- lm(cov_form_lm_with_cov, data = df_wide %>% filter(prolific_id %in% respondents_to_keep))
stargazer(user_lm, user_lm_with_cov, type = "text",
star.cutoffs = c(0.05, 0.01, 0.001),
dep.var.labels = "Number of Comments (Upper Bound: 3)",
covariate.labels = c("Treatment: Hint Control", "Treatment: One-Click Generate", "Treatment: Chat Generate",
"Video 11", "Video 13", "Video 14", "Video 15", "Video 16", "Video 17",
"Video 18", "Video 19", "Video 20", "Video 21", "Video 22", "Video 23",
covariates_simple_fancy),
column.labels = c("Without Covariates", "With Covariates"))
##
## ====================================================================================================
## Dependent variable:
## -------------------------------------------------
## Number of Comments (Upper Bound: 3)
## Without Covariates With Covariates
## (1) (2)
## ----------------------------------------------------------------------------------------------------
## Treatment: Hint Control 0.208* 0.229**
## (0.089) (0.087)
##
## Treatment: One-Click Generate 0.135 0.175*
## (0.089) (0.087)
##
## Treatment: Chat Generate 0.576*** 0.564***
## (0.105) (0.103)
##
## Video 11 -0.156 -0.208*
## (0.099) (0.099)
##
## Video 13 -0.223* -0.224*
## (0.095) (0.094)
##
## Video 14 -0.069 -0.038
## (0.105) (0.104)
##
## Video 15 -0.065 -0.055
## (0.113) (0.112)
##
## Video 16 -0.134 -0.129
## (0.098) (0.099)
##
## Video 17 -0.214* -0.215*
## (0.102) (0.101)
##
## Video 18 -0.248* -0.212*
## (0.104) (0.104)
##
## Video 19 -0.035 0.039
## (0.114) (0.113)
##
## Video 20 -0.135 -0.168
## (0.110) (0.109)
##
## Video 21 -0.081 -0.065
## (0.117) (0.117)
##
## Video 22 -0.216 -0.234*
## (0.113) (0.112)
##
## Video 23
##
##
## Age 0.003
## (0.002)
##
## YouTube User 0.218*
## (0.098)
##
## Social Media: Non-User 0.460
## (0.380)
##
## Social Media: User -0.151
## (0.119)
##
## Social Media Usage (1 - 4 Scale) -0.082
## (0.043)
##
## Online Usage (1 - 4 Scale) 0.032
## (0.034)
##
## Female -0.164*
## (0.071)
##
## Race: Asian 0.144
## (0.161)
##
## Race: Black -0.048
## (0.130)
##
## Race: Hispanic -0.057
## (0.178)
##
## Race: White -0.070
## (0.113)
##
## Race: Other
##
##
## Education: High School or Less 0.029
## (0.123)
##
## Education: Some College 0.096
## (0.110)
##
## Education: Bachelor 0.111
## (0.093)
##
## Education: Postgraduate
##
##
## Political Party: Democrat -0.072
## (0.087)
##
## Political Party: Republican -0.192
## (0.099)
##
## Political Party: Other
##
##
## Political Ideology (1 - 5 Scale; 5 Strong Liberal) -0.070
## (0.039)
##
## Income (1 - 5 Scale) -0.025
## (0.033)
##
## Social Media Reply Frequency (1 - 6 Scale) 0.112***
## (0.027)
##
## Review Frequency (1 - 6 Scale) 0.156***
## (0.031)
##
## Constant 1.932*** 1.455***
## (0.211) (0.364)
##
## ----------------------------------------------------------------------------------------------------
## Observations 1,660 1,660
## R2 0.026 0.082
## Adjusted R2 0.017 0.063
## Residual Std. Error 1.354 (df = 1645) 1.322 (df = 1625)
## F Statistic 3.088*** (df = 14; 1645) 4.278*** (df = 34; 1625)
## ====================================================================================================
## Note: *p<0.05; **p<0.01; ***p<0.001
Panel Regression
Outcome: {Review or Not, Time Spent, Input Length, Informativeness}
Outcome ~ treatment + video + user (+ demographics) [adding time fixed effect to detect any time-dependent effect]
Note: we are focusing on the outcome
Review or Not first.
All Videos
panel_lm <- feols(hasComment ~ Treatment + order | Video.Id, data = df_panel %>% filter(prolific_id %in% respondents_to_keep), cluster = ~User.Id)
# panel_lm_with_cov <- feols(hasComment ~ Treatment + order | Video.Id + social_media_nonUser + social_media_user + social_media_YT + social_media_use + website_use + gender + age + raceAsian + raceBlack + raceHispanic + raceWhite + raceOther + edu + polparty + libcons + income + social_media_reply + review_freq, data = df_panel)
panel_lm_with_cov <- feols(hasComment ~ Treatment + order | Video.Id + age + social_media_YT + social_media_nonUser + social_media_user + social_media_use_numeric + website_use_numeric + genderFemale + raceAsian + raceBlack + raceHispanic + raceWhite + raceOther + eduHighSchoolOrLess + eduSomeCollege + eduBachelor + eduPostGrad + polpartyDem + polpartyRep + polpartyOther + libcons_numeric + income_numeric + social_media_reply_numeric + review_freq_numeric, data = df_panel %>% filter(prolific_id %in% respondents_to_keep), cluster = ~User.Id)
model_list <- list(panel_lm, panel_lm_with_cov)
texreg::screenreg(model_list,
stars = c(0.05, 0.01, 0.001),
caption = "Panel Regression Results",
label = "tab:panel_regression",
digits = 4,
custom.note = "Standard errors are clustered at the video level.",
custom.model.names = c("Without Covariates", "With Covariates"),
custom.coef.names = c("Hint Control", "One-Click Generate", "Chat Generate", "Order"))
##
## ============================================================================
## Without Covariates With Covariates
## ----------------------------------------------------------------------------
## Hint Control 0.0752 ** 0.0705 *
## (0.0287) (0.0274)
## One-Click Generate 0.0614 * 0.0662 *
## (0.0296) (0.0278)
## Chat Generate 0.1832 *** 0.1749 ***
## (0.0343) (0.0348)
## Order -0.0436 *** -0.0421 ***
## (0.0097) (0.0072)
## ----------------------------------------------------------------------------
## Num. obs. 5199 5199
## Num. groups: Video.Id 12 12
## R^2 (full model) 0.0267 0.1233
## R^2 (proj model) 0.0241 0.0235
## Adj. R^2 (full model) 0.0239 0.1035
## Adj. R^2 (proj model) 0.0233 0.0227
## Num. groups: age 60
## Num. groups: social_media_YT 2
## Num. groups: social_media_nonUser 2
## Num. groups: social_media_user 2
## Num. groups: social_media_use_numeric 4
## Num. groups: website_use_numeric 4
## Num. groups: genderFemale 2
## Num. groups: raceAsian 2
## Num. groups: raceBlack 2
## Num. groups: raceHispanic 2
## Num. groups: raceWhite 2
## Num. groups: raceOther 2
## Num. groups: eduHighSchoolOrLess 2
## Num. groups: eduSomeCollege 2
## Num. groups: eduBachelor 2
## Num. groups: eduPostGrad 2
## Num. groups: polpartyDem 2
## Num. groups: polpartyRep 2
## Num. groups: polpartyOther 2
## Num. groups: libcons_numeric 5
## Num. groups: income_numeric 6
## Num. groups: social_media_reply_numeric 6
## Num. groups: review_freq_numeric 6
## ============================================================================
## Standard errors are clustered at the video level.
First Three Videos
panel_lm <- feols(hasComment ~ Treatment + order | Video.Id, data = df_panel %>% filter(firstThree == 1) %>% filter(prolific_id %in% respondents_to_keep), cluster = ~User.Id)
panel_lm_with_cov <- feols(hasComment ~ Treatment + order | Video.Id + age + social_media_YT + social_media_nonUser + social_media_user + social_media_use_numeric + website_use_numeric + genderFemale + raceAsian + raceBlack + raceHispanic + raceWhite + raceOther + eduHighSchoolOrLess + eduSomeCollege + eduBachelor + eduPostGrad + polpartyDem + polpartyRep + polpartyOther + libcons_numeric + income_numeric + social_media_reply_numeric + review_freq_numeric, data = df_panel %>% filter(firstThree == 1) %>% filter(prolific_id %in% respondents_to_keep), cluster = ~User.Id)
model_list <- list(panel_lm, panel_lm_with_cov)
texreg::screenreg(model_list,
stars = c(0.05, 0.01, 0.001),
caption = "Panel Regression Results (First Three Videos)",
label = "tab:panel_regression_first_three",
digits = 4,
custom.note = "Standard errors are clustered at the video level.",
custom.model.names = c("Without Covariates", "With Covariates"),
custom.coef.names = c("Hint Control", "One-Click Generate", "Chat Generate", "Order"))
##
## ============================================================================
## Without Covariates With Covariates
## ----------------------------------------------------------------------------
## Hint Control 0.0693 * 0.0671 *
## (0.0292) (0.0278)
## One-Click Generate 0.0455 0.0533
## (0.0297) (0.0284)
## Chat Generate 0.1919 *** 0.1846 ***
## (0.0344) (0.0350)
## Order -0.0244 *** -0.0261 ***
## (0.0048) (0.0048)
## ----------------------------------------------------------------------------
## Num. obs. 4980 4980
## Num. groups: Video.Id 12 12
## R^2 (full model) 0.0196 0.1156
## R^2 (proj model) 0.0170 0.0167
## Adj. R^2 (full model) 0.0167 0.0947
## Adj. R^2 (proj model) 0.0162 0.0159
## Num. groups: age 60
## Num. groups: social_media_YT 2
## Num. groups: social_media_nonUser 2
## Num. groups: social_media_user 2
## Num. groups: social_media_use_numeric 4
## Num. groups: website_use_numeric 4
## Num. groups: genderFemale 2
## Num. groups: raceAsian 2
## Num. groups: raceBlack 2
## Num. groups: raceHispanic 2
## Num. groups: raceWhite 2
## Num. groups: raceOther 2
## Num. groups: eduHighSchoolOrLess 2
## Num. groups: eduSomeCollege 2
## Num. groups: eduBachelor 2
## Num. groups: eduPostGrad 2
## Num. groups: polpartyDem 2
## Num. groups: polpartyRep 2
## Num. groups: polpartyOther 2
## Num. groups: libcons_numeric 5
## Num. groups: income_numeric 6
## Num. groups: social_media_reply_numeric 6
## Num. groups: review_freq_numeric 6
## ============================================================================
## Standard errors are clustered at the video level.
Mediation Analysis (User Level)
First conduct a overall correlation analysis for the mediators.
mediator_columns <- c("mech_popup", "mech_speed", "mech_wording", "mech_formulate","mech_difficulty", "mech_AIaversion", "mech_trueop")
mech_fancy_names <- c("Pop-up (+)", "Speed (+)", "Help Wording (+)", "Help Formulate (+)", "Difficult to Use (-)", "AI Aversion (-)", "True Opinion (-)")
mech_mapping <- c("Speed (+)" = "mech_speed", "Help Wording (+)" = "mech_wording", "Difficult to Use (-)" = "mech_difficulty", "Help Formulate (+)" = "mech_formulate", "AI Aversion (-)" = "mech_AIaversion", "Pop-up (+)" = "mech_popup", "True Opinion (-)" = "mech_trueop")
covariates_simple_without_baseline <- covariates_simple[!covariates_simple %in% c("raceOther", "eduHighSchoolOrLess", "polpartyOther")]
covariates_simple_without_baseline_fancy <- covariates_simple_fancy[!covariates_simple_fancy %in% c("Race: Other", "Political Party: Other", "Education: High School or Less")]
# visual correlation plot
mediator_corr <- cor(df_wide_all[df_wide_all$prolific_id %in% respondents_to_keep, c(mediator_columns, "willingness_to_pay", "review_exp")], use = "pairwise.complete.obs")
# change with fancy names
rownames(mediator_corr) <- c(mech_fancy_names, "Willingness to Pay", "Review Experience")
colnames(mediator_corr) <- c(mech_fancy_names, "Willingness to Pay", "Review Experience")
# visualize
corrplot(mediator_corr,method = 'number')
Step 1: Mediator Treatment Effect
Mediator: {faster, not reflect true opinion, right word, difficulty of usage, thought formulation, AI aversion, pop-up feature} Mediator ~ treatment + video (+ demographics)
mediator_coef_df <- data.frame()
for (m in c("mech_speed", "mech_wording", "mech_difficulty", "mech_formulate", "mech_AIaversion", "mech_popup", "mech_trueop")){
cov_form_lm <- paste0(m, " ~ Treatment + ", paste(video_columns, collapse = " + "))
mediator_lm <- lm(cov_form_lm, data = df_wide_all %>% filter(prolific_id %in% respondents_to_keep))
mediator_lm_coef <- summary(mediator_lm)$coefficients[2:4, c("Estimate", "Std. Error")]
mediator_coef_df <- rbind(mediator_coef_df, cbind(mediator_lm_coef, mech_fancy_names[which(mech_mapping == m)]))
}
colnames(mediator_coef_df) <- c("Estimate", "Std. Error", "Mediator")
mediator_coef_df$Mediator <- factor(mediator_coef_df$Mediator, levels = c("Pop-up (+)", "Speed (+)", "Help Wording (+)", "Help Formulate (+)", "Difficult to Use (-)","AI Aversion (-)", "True Opinion (-)"))
mediator_coef_df$Estimate <- as.numeric(as.character(mediator_coef_df$Estimate))
mediator_coef_df$`Std. Error` <- as.numeric(as.character(mediator_coef_df$`Std. Error`))
mediator_coef_df$Treatment <- rownames(mediator_coef_df)
mediator_coef_df$Treatment <- ifelse(str_detect(mediator_coef_df$Treatment, "Hint"), "Hint Control",
ifelse(str_detect(mediator_coef_df$Treatment, "One"), "One-Click Generate", "Chat Generate"))
mediator_coef_df$Treatment <- factor(mediator_coef_df$Treatment, levels = c("Hint Control", "One-Click Generate", "Chat Generate"))
This plot is generated based on estimating {Mediator ~ treatment + video}. We use all videos instead of limiting to first three.
#plot bar plot
ggplot(mediator_coef_df, aes(x = Mediator, y = Estimate, fill = Treatment)) +
geom_bar(stat = "identity", position = "dodge") +
geom_errorbar(aes(ymin = Estimate - 1.96*`Std. Error`, ymax = Estimate + 1.96*`Std. Error`), width = 0.2, position = position_dodge(0.9)) +
labs(title = "Mediator Analysis", x = "Mediator", y = "Estimate") +
scale_fill_manual(name = "vs Pure Control",
values=c("Hint Control" = "turquoise2","One-Click Generate"="pink2","Chat Generate" = "orange2")) +
theme_minimal() +
theme(axis.text.x = element_text(angle = 45, hjust = 1),
# center title
title = element_text(face = "bold"))
mediator_coef_with_cov_df <- data.frame()
for (m in c("mech_speed", "mech_wording", "mech_difficulty", "mech_formulate", "mech_AIaversion", "mech_popup", "mech_trueop")){
cov_form_lm_with_cov <- paste0(m, " ~ Treatment + ", paste(video_columns, collapse = " + "), "+ ", paste(covariates_simple_without_baseline, collapse = " + "))
mediator_lm_with_cov <- lm(cov_form_lm_with_cov, data = df_wide_all %>% filter(prolific_id %in% respondents_to_keep))
assign(paste0("mediator_lm_with_cov_", m), lm(cov_form_lm_with_cov, data = df_wide_all %>% filter(prolific_id %in% respondents_to_keep)))
mediator_lm_coef <- summary(mediator_lm_with_cov)$coefficients[2:4, c("Estimate", "Std. Error")]
mediator_coef_with_cov_df <- rbind(mediator_coef_with_cov_df, cbind(mediator_lm_coef, mech_fancy_names[which(mech_mapping == m)]))
}
colnames(mediator_coef_with_cov_df) <- c("Estimate", "Std. Error", "Mediator")
mediator_coef_with_cov_df$Mediator <- factor(mediator_coef_with_cov_df$Mediator, levels = c("Pop-up (+)", "Speed (+)", "Help Wording (+)", "Help Formulate (+)", "Difficult to Use (-)","AI Aversion (-)", "True Opinion (-)"))
mediator_coef_with_cov_df$Estimate <- as.numeric(as.character(mediator_coef_with_cov_df$Estimate))
mediator_coef_with_cov_df$`Std. Error` <- as.numeric(as.character(mediator_coef_with_cov_df$`Std. Error`))
mediator_coef_with_cov_df$Treatment <- rownames(mediator_coef_with_cov_df)
mediator_coef_with_cov_df$Treatment <- ifelse(str_detect(mediator_coef_with_cov_df$Treatment, "Hint"), "Hint Control",
ifelse(str_detect(mediator_coef_with_cov_df$Treatment, "One"), "One-Click Generate", "Chat Generate"))
mediator_coef_with_cov_df$Treatment <- factor(mediator_coef_with_cov_df$Treatment, levels = c("Hint Control", "One-Click Generate", "Chat Generate"))
#plot bar plot
ggplot(mediator_coef_with_cov_df, aes(x = Mediator, y = Estimate, fill = Treatment)) +
geom_bar(stat = "identity", position = "dodge") +
geom_errorbar(aes(ymin = Estimate - 1.96*`Std. Error`, ymax = Estimate + 1.96*`Std. Error`), width = 0.2, position = position_dodge(0.9)) +
labs(title = "Mediator Analysis (With Covariates)", x = "Mediator", y = "Estimate") +
scale_fill_manual(name = "vs Pure Control",
values=c("Hint Control" = "turquoise2","One-Click Generate"="pink2","Chat Generate" = "orange2")) +
theme_minimal() +
theme(axis.text.x = element_text(angle = 45, hjust = 1),
# center title
title = element_text(face = "bold"))
Step 2: Mediation Effect
Number of Reviews ~ treatment + mediator + video (+ demographics)
outcome_coef_with_cov_df <- data.frame()
for (m in mediator_columns){
cov_form_lm_with_cov <- paste0("num_comment ~ Treatment + ", m, " + ", paste(video_columns, collapse = " + "), "+ ", paste(covariates_simple_without_baseline, collapse = " + "))
assign(paste0("outcome_lm_with_cov_", m), lm(cov_form_lm_with_cov, data = df_wide_all %>% filter(prolific_id %in% respondents_to_keep)))
}
# include png
include_graphics("tables_and_figures/mediation_table_redone.png")
Individual Mediator Effect
- ACME (Average Causal Mediation Effect): The indirect effect (IE) of the treatment through the mediator.
- ADE (Average Direct Effect): The direct effect (DE) of the treatment on the outcome.
- Proportion Mediated: The proportion of the total effect explained by the mediator.
Should note that the y-axis ranges are different for each mediator plot.
conduct_mediation_analysis <- function(mediator_lm_with_cov, outcome_lm_with_cov, mediator, sims = 500){
mediation_hintcontrol <- mediate(mediator_lm_with_cov, outcome_lm_with_cov, treat = "Treatment", control.value = "Pure Control", treat.value = "Hint Control", mediator = mediator, sims = 500, robustSE = TRUE)
mediation_oneclick <- mediate(mediator_lm_with_cov, outcome_lm_with_cov, treat = "Treatment", control.value = "Pure Control", treat.value = "One-Click Generate", mediator = mediator, sims = 500, robustSE = TRUE)
mediation_chat <- mediate(mediator_lm_with_cov, outcome_lm_with_cov, treat = "Treatment", control.value = "Pure Control", treat.value = "Chat Generate", mediator = mediator, sims = 500, robustSE = TRUE)
hintcontrol_mediate_df <- rbind(c(mediation_hintcontrol$d.avg, mediation_hintcontrol$d.avg.ci),
c(mediation_hintcontrol$z.avg, mediation_hintcontrol$z.avg.ci),
c(mediation_hintcontrol$n.avg, mediation_hintcontrol$n.avg.ci)) %>% as.data.frame()
hintcontrol_mediate_df$type <- c("ACME", "ADE", "Prop. Mediated")
hintcontrol_mediate_df$treatment <- "Hint Control"
oneclick_mediate_df <- rbind(c(mediation_oneclick$d.avg, mediation_oneclick$d.avg.ci),
c(mediation_oneclick$z.avg, mediation_oneclick$z.avg.ci),
c(mediation_oneclick$n.avg, mediation_oneclick$n.avg.ci)) %>% as.data.frame()
oneclick_mediate_df$type <- c("ACME", "ADE", "Prop. Mediated")
oneclick_mediate_df$treatment <- "One-click Generate"
chat_mediate_df <- rbind(c(mediation_chat$d.avg, mediation_chat$d.avg.ci),
c(mediation_chat$z.avg, mediation_chat$z.avg.ci),
c(mediation_chat$n.avg, mediation_chat$n.avg.ci)) %>% as.data.frame()
chat_mediate_df$type <- c("ACME", "ADE", "Prop. Mediated")
chat_mediate_df$treatment <- "Chat Generate"
mediate_df_popup <- rbind(hintcontrol_mediate_df, oneclick_mediate_df, chat_mediate_df)
colnames(mediate_df_popup) <- c("Estimate", "2.5% CI", "97.5% CI", "Estimate Type", "Treatment")
mediate_df_popup$Treatment <- factor(mediate_df_popup$Treatment, levels = c("Hint Control", "One-click Generate", "Chat Generate"))
# plot
output_plot <- ggplot(mediate_df_popup, aes(x = `Treatment`, y = Estimate, fill = `Estimate Type`)) +
geom_bar(stat = "identity", position = "dodge") +
geom_errorbar(aes(ymin = `2.5% CI`, ymax = `97.5% CI`), width = 0.2, position = position_dodge(0.9)) +
labs(title = paste0("Mediation Analysis: ", mech_mapping[which(mech_mapping == mediator)] %>% names()), x = "Treatment", y = "Estimate") +
scale_fill_manual(name = "Estimate Type",
values=c("ACME" = "turquoise4","ADE"="pink4","Prop. Mediated" = "orange4")) +
theme_minimal() +
theme(axis.text.x = element_text(angle = 45, hjust = 1),
# center title
title = element_text(face = "bold"))
return(list(mediate_df_popup, output_plot))
}
Pop-up
mediate_analysis_popup <- conduct_mediation_analysis(mediator_lm_with_cov_mech_popup, outcome_lm_with_cov_mech_popup, "mech_popup")
mediate_analysis_popup[[2]]
Speed
mediate_analysis_speed <- conduct_mediation_analysis(mediator_lm_with_cov_mech_speed, outcome_lm_with_cov_mech_speed, "mech_speed")
mediate_analysis_speed[[2]]
Help Wording
mediate_analysis_wording <- conduct_mediation_analysis(mediator_lm_with_cov_mech_wording, outcome_lm_with_cov_mech_wording, "mech_wording")
mediate_analysis_wording[[2]]
Help Formulate
mediate_analysis_formulate <- conduct_mediation_analysis(mediator_lm_with_cov_mech_formulate, outcome_lm_with_cov_mech_formulate, "mech_formulate")
mediate_analysis_formulate[[2]]
Difficult to Use
mediate_analysis_difficulty <- conduct_mediation_analysis(mediator_lm_with_cov_mech_difficulty, outcome_lm_with_cov_mech_difficulty, "mech_difficulty")
mediate_analysis_difficulty[[2]]
AI Aversion
mediate_analysis_AIaversion <- conduct_mediation_analysis(mediator_lm_with_cov_mech_AIaversion, outcome_lm_with_cov_mech_AIaversion, "mech_AIaversion")
mediate_analysis_AIaversion[[2]]
Not Reflect True Opinion
mediate_analysis_trueop <- conduct_mediation_analysis(mediator_lm_with_cov_mech_trueop, outcome_lm_with_cov_mech_trueop, "mech_trueop")
mediate_analysis_trueop[[2]]
Subgroup Analysis
The outcome variable here is number of videos that have comments.
Subgroups using median split: social media usage, comment frequency, demographics, popup. Currently do not include social media platform type.
subgroups_columns <- c("social_media_use_numeric_median", "website_use_numeric_median", "social_media_reply_numeric_median", "review_freq_numeric_median", "age_median", "income_numeric_median", "libcons_numeric_median", "mech_popup_median", "edu_combined", "race_combined", "polparty_combined")
for (subgroup in subgroups_columns){
subgroup_lm <- lm(paste0("num_comment ~ Treatment * ", subgroup, " + ", paste(video_columns, collapse = " + ")), data = df_wide_all %>% filter(prolific_id %in% respondents_to_keep))
assign(paste0("subgroup_lm_", subgroup), subgroup_lm)
}
for (subgroup in subgroups_columns){
subgroup_lm <- get(paste0("subgroup_lm_", subgroup))
coef_table <- summary(subgroup_lm)$coefficients
cat("#### ", subgroup, "\n")
print(paste0("Values for this variable: ", paste(unique(df_wide_all[[subgroup]]), collapse = ", ")))
rows_to_extract <- rownames(coef_table)[!str_detect(rownames(coef_table), "video") & (rownames(coef_table) != "(Intercept)")]
subgroup_coef <- coef_table[rows_to_extract, ]
print(kable(subgroup_coef, format = "markdown"))
cat("\n")
}
website_use_numeric_median
[1] “Values for this variable: Above Median, Below Median”
| Estimate | Std. Error | t value | Pr(>|t|) | |
|---|---|---|---|---|
| TreatmentHint Control | 0.3283684 | 0.1508469 | 2.1768315 | 0.0296354 |
| TreatmentOne-Click Generate | 0.0551583 | 0.1491331 | 0.3698596 | 0.7115349 |
| TreatmentChat Generate | 0.6712905 | 0.1782302 | 3.7664243 | 0.0001715 |
| website_use_numeric_medianBelow Median | -0.0972649 | 0.1346293 | -0.7224648 | 0.4701118 |
| TreatmentHint Control:website_use_numeric_medianBelow Median | -0.1652794 | 0.1908014 | -0.8662380 | 0.3864863 |
| TreatmentOne-Click Generate:website_use_numeric_medianBelow Median | 0.2262604 | 0.1894917 | 1.1940385 | 0.2326356 |
| TreatmentChat Generate:website_use_numeric_medianBelow Median | -0.1771663 | 0.2264243 | -0.7824526 | 0.4340616 |
review_freq_numeric_median
[1] “Values for this variable: Below Median, Above Median”
| Estimate | Std. Error | t value | Pr(>|t|) | |
|---|---|---|---|---|
| TreatmentHint Control | 0.1349381 | 0.1651471 | 0.8170782 | 0.4140024 |
| TreatmentOne-Click Generate | 0.1763267 | 0.1666244 | 1.0582284 | 0.2901072 |
| TreatmentChat Generate | -0.3098180 | 0.1961824 | -1.5792343 | 0.1144752 |
| review_freq_numeric_medianBelow Median | -0.6352782 | 0.1378514 | -4.6084261 | 0.0000044 |
| TreatmentHint Control:review_freq_numeric_medianBelow Median | 0.1520215 | 0.1977095 | 0.7689132 | 0.4420555 |
| TreatmentOne-Click Generate:review_freq_numeric_medianBelow Median | 0.0555269 | 0.1981112 | 0.2802814 | 0.7792970 |
| TreatmentChat Generate:review_freq_numeric_medianBelow Median | 1.2523011 | 0.2345903 | 5.3382483 | 0.0000001 |
age_median
[1] “Values for this variable: Above Median, Below Median”
| Estimate | Std. Error | t value | Pr(>|t|) | |
|---|---|---|---|---|
| TreatmentHint Control | 0.2888197 | 0.1315517 | 2.1954843 | 0.0282685 |
| TreatmentOne-Click Generate | 0.1374881 | 0.1304824 | 1.0536908 | 0.2921797 |
| TreatmentChat Generate | 0.3408758 | 0.1589556 | 2.1444714 | 0.0321417 |
| age_medianBelow Median | -0.0709854 | 0.1301728 | -0.5453171 | 0.5856096 |
| TreatmentHint Control:age_medianBelow Median | -0.1251085 | 0.1854153 | -0.6747474 | 0.4999314 |
| TreatmentOne-Click Generate:age_medianBelow Median | 0.1110670 | 0.1838469 | 0.6041275 | 0.5458424 |
| TreatmentChat Generate:age_medianBelow Median | 0.4215936 | 0.2193829 | 1.9217251 | 0.0548135 |
income_numeric_median
[1] “Values for this variable: Below Median, Above Median”
| Estimate | Std. Error | t value | Pr(>|t|) | |
|---|---|---|---|---|
| TreatmentHint Control | 0.2183693 | 0.1754816 | 1.2444004 | 0.2135301 |
| TreatmentOne-Click Generate | 0.1162543 | 0.1666547 | 0.6975757 | 0.4855414 |
| TreatmentChat Generate | 0.5458511 | 0.2116805 | 2.5786553 | 0.0100051 |
| income_numeric_medianBelow Median | 0.0817390 | 0.1421196 | 0.5751422 | 0.5652740 |
| TreatmentHint Control:income_numeric_medianBelow Median | 0.0116961 | 0.2063253 | 0.0566875 | 0.9548010 |
| TreatmentOne-Click Generate:income_numeric_medianBelow Median | 0.1154452 | 0.1998527 | 0.5776516 | 0.5635787 |
| TreatmentChat Generate:income_numeric_medianBelow Median | 0.0206267 | 0.2474946 | 0.0833420 | 0.9335898 |
libcons_numeric_median
[1] “Values for this variable: Below Median, Above Median”
| Estimate | Std. Error | t value | Pr(>|t|) | |
|---|---|---|---|---|
| TreatmentHint Control | 0.2287490 | 0.1394149 | 1.6407778 | 0.1010353 |
| TreatmentOne-Click Generate | 0.3416249 | 0.1376354 | 2.4821008 | 0.0131605 |
| TreatmentChat Generate | 0.6847832 | 0.1584974 | 4.3204707 | 0.0000165 |
| libcons_numeric_medianBelow Median | 0.2395846 | 0.1309827 | 1.8291310 | 0.0675615 |
| TreatmentHint Control:libcons_numeric_medianBelow Median | -0.0045879 | 0.1869218 | -0.0245447 | 0.9804211 |
| TreatmentOne-Click Generate:libcons_numeric_medianBelow Median | -0.2664468 | 0.1857307 | -1.4345866 | 0.1515956 |
| TreatmentChat Generate:libcons_numeric_medianBelow Median | -0.2191693 | 0.2199288 | -0.9965467 | 0.3191316 |
mech_popup_median
[1] “Values for this variable: Below Median, Above Median”
| Estimate | Std. Error | t value | Pr(>|t|) | |
|---|---|---|---|---|
| TreatmentHint Control | 0.3658515 | 0.1349562 | 2.710891 | 0.0067803 |
| TreatmentOne-Click Generate | 0.4865368 | 0.1384421 | 3.514370 | 0.0004528 |
| TreatmentChat Generate | 0.3821181 | 0.1517818 | 2.517548 | 0.0119121 |
| mech_popup_medianBelow Median | -0.4762149 | 0.1270124 | -3.749356 | 0.0001834 |
| TreatmentHint Control:mech_popup_medianBelow Median | -0.2027932 | 0.1816001 | -1.116702 | 0.2642855 |
| TreatmentOne-Click Generate:mech_popup_medianBelow Median | -0.4027106 | 0.1823382 | -2.208592 | 0.0273409 |
| TreatmentChat Generate:mech_popup_medianBelow Median | 0.3341409 | 0.2139776 | 1.561570 | 0.1185823 |
edu_combined
[1] “Values for this variable: Bachelor’s Degree, High School or Less, Graduate Degree, Some College”
| Estimate | Std. Error | t value | Pr(>|t|) | |
|---|---|---|---|---|
| TreatmentHint Control | 0.1957383 | 0.2443234 | 0.8011441 | 0.4231648 |
| TreatmentOne-Click Generate | 0.2805413 | 0.2623139 | 1.0694870 | 0.2850084 |
| TreatmentChat Generate | 0.6931569 | 0.2901608 | 2.3888720 | 0.0170132 |
| edu_combinedSome College | 0.1845947 | 0.2313182 | 0.7980121 | 0.4249796 |
| edu_combinedBachelor’s Degree | 0.0093550 | 0.2090512 | 0.0447498 | 0.9643122 |
| edu_combinedGraduate Degree | -0.0462207 | 0.2341840 | -0.1973693 | 0.8435631 |
| TreatmentHint Control:edu_combinedSome College | -0.2550121 | 0.3148784 | -0.8098749 | 0.4181301 |
| TreatmentOne-Click Generate:edu_combinedSome College | -0.5350225 | 0.3283311 | -1.6295213 | 0.1033957 |
| TreatmentChat Generate:edu_combinedSome College | 0.0228716 | 0.3798683 | 0.0602093 | 0.9519963 |
| TreatmentHint Control:edu_combinedBachelor’s Degree | 0.0664558 | 0.2813627 | 0.2361925 | 0.8133129 |
| TreatmentOne-Click Generate:edu_combinedBachelor’s Degree | 0.0337079 | 0.2951147 | 0.1142198 | 0.9090776 |
| TreatmentChat Generate:edu_combinedBachelor’s Degree | -0.0027415 | 0.3319558 | -0.0082585 | 0.9934117 |
| TreatmentHint Control:edu_combinedGraduate Degree | 0.3143028 | 0.3205477 | 0.9805182 | 0.3269757 |
| TreatmentOne-Click Generate:edu_combinedGraduate Degree | 0.0583927 | 0.3321757 | 0.1757886 | 0.8604819 |
| TreatmentChat Generate:edu_combinedGraduate Degree | -0.6772368 | 0.3808468 | -1.7782396 | 0.0755507 |
race_combined
[1] “Values for this variable: White, Hispanic, Black, Other, Asian”
| Estimate | Std. Error | t value | Pr(>|t|) | |
|---|---|---|---|---|
| TreatmentHint Control | 0.2412597 | 0.1189426 | 2.0283715 | 0.0426849 |
| TreatmentOne-Click Generate | 0.1587837 | 0.1198295 | 1.3250802 | 0.1853305 |
| TreatmentChat Generate | 0.6851269 | 0.1428995 | 4.7944674 | 0.0000018 |
| race_combinedBlack | 0.2441061 | 0.1738135 | 1.4044139 | 0.1603864 |
| race_combinedHispanic | -0.2591924 | 0.2986590 | -0.8678541 | 0.3856021 |
| race_combinedAsian | -0.1462594 | 0.2517847 | -0.5808907 | 0.5613945 |
| race_combinedOther | 0.5590399 | 0.2344862 | 2.3841056 | 0.0172347 |
| TreatmentHint Control:race_combinedBlack | 0.0574304 | 0.2471644 | 0.2323569 | 0.8162900 |
| TreatmentOne-Click Generate:race_combinedBlack | -0.0859740 | 0.2427430 | -0.3541773 | 0.7232519 |
| TreatmentChat Generate:race_combinedBlack | -0.8243798 | 0.2883724 | -2.8587332 | 0.0043075 |
| TreatmentHint Control:race_combinedHispanic | 0.0083722 | 0.4309947 | 0.0194253 | 0.9845042 |
| TreatmentOne-Click Generate:race_combinedHispanic | 0.4751959 | 0.4193006 | 1.1333060 | 0.2572526 |
| TreatmentChat Generate:race_combinedHispanic | 0.6279406 | 0.4928982 | 1.2739762 | 0.2028537 |
| TreatmentHint Control:race_combinedAsian | 0.3409974 | 0.3530125 | 0.9659640 | 0.3342057 |
| TreatmentOne-Click Generate:race_combinedAsian | 0.8801678 | 0.3702073 | 2.3774999 | 0.0175454 |
| TreatmentChat Generate:race_combinedAsian | 0.7132055 | 0.4199831 | 1.6981768 | 0.0896655 |
| TreatmentHint Control:race_combinedOther | -0.5849741 | 0.3284430 | -1.7810523 | 0.0750903 |
| TreatmentOne-Click Generate:race_combinedOther | -0.4491351 | 0.3139345 | -1.4306648 | 0.1527182 |
| TreatmentChat Generate:race_combinedOther | -0.6227573 | 0.3771381 | -1.6512714 | 0.0988760 |
polparty_combined
[1] “Values for this variable: Other, Republican, Democrat”
| Estimate | Std. Error | t value | Pr(>|t|) | |
|---|---|---|---|---|
| TreatmentHint Control | 0.2847961 | 0.1490462 | 1.9107902 | 0.0562062 |
| TreatmentOne-Click Generate | 0.3245722 | 0.1503267 | 2.1591127 | 0.0309864 |
| TreatmentChat Generate | 0.7808051 | 0.1718087 | 4.5446195 | 0.0000059 |
| polparty_combinedRepublican | 0.1894080 | 0.1600329 | 1.1835569 | 0.2367605 |
| polparty_combinedOther | 0.2734455 | 0.1550615 | 1.7634648 | 0.0780088 |
| TreatmentHint Control:polparty_combinedRepublican | -0.0338419 | 0.2269975 | -0.1490848 | 0.8815051 |
| TreatmentOne-Click Generate:polparty_combinedRepublican | -0.1502948 | 0.2279003 | -0.6594759 | 0.5096830 |
| TreatmentChat Generate:polparty_combinedRepublican | -0.4369696 | 0.2723475 | -1.6044559 | 0.1088066 |
| TreatmentHint Control:polparty_combinedOther | -0.1246941 | 0.2210988 | -0.5639745 | 0.5728488 |
| TreatmentOne-Click Generate:polparty_combinedOther | -0.2550246 | 0.2185917 | -1.1666710 | 0.2435133 |
| TreatmentChat Generate:polparty_combinedOther | -0.2931067 | 0.2591618 | -1.1309794 | 0.2582295 |
We specifically look at social media reply and review frequency where we split each into three groups.
subgroup_lm_valuesplit_smr <- lm(paste0("num_comment ~ Treatment * social_media_reply_numeric_valuesplit + ", paste(video_columns, collapse = " + ")), data = df_wide_all %>% filter(prolific_id %in% respondents_to_keep))
summary(subgroup_lm_valuesplit_smr)
##
## Call:
## lm(formula = paste0("num_comment ~ Treatment * social_media_reply_numeric_valuesplit + ",
## paste(video_columns, collapse = " + ")), data = df_wide_all %>%
## filter(prolific_id %in% respondents_to_keep))
##
## Residuals:
## Min 1Q Median 3Q Max
## -3.9288 -1.3927 0.4902 1.1932 7.5054
##
## Coefficients:
## Estimate
## (Intercept) 1.10432
## TreatmentHint Control 0.17316
## TreatmentOne-Click Generate 0.39807
## TreatmentChat Generate -0.15335
## social_media_reply_numeric_valuesplit3-4 -0.24635
## social_media_reply_numeric_valuesplit1-2 -0.82985
## video11 0.16339
## video13 0.15569
## video14 0.35265
## video15 0.30770
## video16 0.26666
## video17 0.12910
## video18 0.12533
## video19 0.36014
## video20 0.25601
## video21 0.26566
## video22 0.21399
## video23 0.39585
## TreatmentHint Control:social_media_reply_numeric_valuesplit3-4 0.06370
## TreatmentOne-Click Generate:social_media_reply_numeric_valuesplit3-4 -0.31941
## TreatmentChat Generate:social_media_reply_numeric_valuesplit3-4 0.92383
## TreatmentHint Control:social_media_reply_numeric_valuesplit1-2 0.13841
## TreatmentOne-Click Generate:social_media_reply_numeric_valuesplit1-2 -0.07105
## TreatmentChat Generate:social_media_reply_numeric_valuesplit1-2 1.13183
## Std. Error
## (Intercept) 0.18551
## TreatmentHint Control 0.17087
## TreatmentOne-Click Generate 0.17440
## TreatmentChat Generate 0.19881
## social_media_reply_numeric_valuesplit3-4 0.15033
## social_media_reply_numeric_valuesplit1-2 0.17506
## video11 0.08235
## video13 0.08261
## video14 0.09050
## video15 0.09621
## video16 0.08351
## video17 0.08484
## video18 0.08766
## video19 0.09335
## video20 0.09260
## video21 0.09658
## video22 0.09417
## video23 0.08408
## TreatmentHint Control:social_media_reply_numeric_valuesplit3-4 0.21579
## TreatmentOne-Click Generate:social_media_reply_numeric_valuesplit3-4 0.21861
## TreatmentChat Generate:social_media_reply_numeric_valuesplit3-4 0.25184
## TreatmentHint Control:social_media_reply_numeric_valuesplit1-2 0.24904
## TreatmentOne-Click Generate:social_media_reply_numeric_valuesplit1-2 0.24757
## TreatmentChat Generate:social_media_reply_numeric_valuesplit1-2 0.30218
## t value
## (Intercept) 5.953
## TreatmentHint Control 1.013
## TreatmentOne-Click Generate 2.283
## TreatmentChat Generate -0.771
## social_media_reply_numeric_valuesplit3-4 -1.639
## social_media_reply_numeric_valuesplit1-2 -4.740
## video11 1.984
## video13 1.885
## video14 3.896
## video15 3.198
## video16 3.193
## video17 1.522
## video18 1.430
## video19 3.858
## video20 2.765
## video21 2.751
## video22 2.272
## video23 4.708
## TreatmentHint Control:social_media_reply_numeric_valuesplit3-4 0.295
## TreatmentOne-Click Generate:social_media_reply_numeric_valuesplit3-4 -1.461
## TreatmentChat Generate:social_media_reply_numeric_valuesplit3-4 3.668
## TreatmentHint Control:social_media_reply_numeric_valuesplit1-2 0.556
## TreatmentOne-Click Generate:social_media_reply_numeric_valuesplit1-2 -0.287
## TreatmentChat Generate:social_media_reply_numeric_valuesplit1-2 3.746
## Pr(>|t|)
## (Intercept) 0.00000000322
## TreatmentHint Control 0.311030
## TreatmentOne-Click Generate 0.022586
## TreatmentChat Generate 0.440609
## social_media_reply_numeric_valuesplit3-4 0.101466
## social_media_reply_numeric_valuesplit1-2 0.00000231992
## video11 0.047407
## video13 0.059659
## video14 0.000102
## video15 0.001410
## video16 0.001434
## video17 0.128259
## video18 0.152975
## video19 0.000119
## video20 0.005762
## video21 0.006014
## video22 0.023191
## video23 0.00000271428
## TreatmentHint Control:social_media_reply_numeric_valuesplit3-4 0.767879
## TreatmentOne-Click Generate:social_media_reply_numeric_valuesplit3-4 0.144187
## TreatmentChat Generate:social_media_reply_numeric_valuesplit3-4 0.000252
## TreatmentHint Control:social_media_reply_numeric_valuesplit1-2 0.578455
## TreatmentOne-Click Generate:social_media_reply_numeric_valuesplit1-2 0.774143
## TreatmentChat Generate:social_media_reply_numeric_valuesplit1-2 0.000186
##
## (Intercept) ***
## TreatmentHint Control
## TreatmentOne-Click Generate *
## TreatmentChat Generate
## social_media_reply_numeric_valuesplit3-4
## social_media_reply_numeric_valuesplit1-2 ***
## video11 *
## video13 .
## video14 ***
## video15 **
## video16 **
## video17
## video18
## video19 ***
## video20 **
## video21 **
## video22 *
## video23 ***
## TreatmentHint Control:social_media_reply_numeric_valuesplit3-4
## TreatmentOne-Click Generate:social_media_reply_numeric_valuesplit3-4
## TreatmentChat Generate:social_media_reply_numeric_valuesplit3-4 ***
## TreatmentHint Control:social_media_reply_numeric_valuesplit1-2
## TreatmentOne-Click Generate:social_media_reply_numeric_valuesplit1-2
## TreatmentChat Generate:social_media_reply_numeric_valuesplit1-2 ***
## ---
## Signif. codes: 0 '***' 0.001 '**' 0.01 '*' 0.05 '.' 0.1 ' ' 1
##
## Residual standard error: 1.38 on 1636 degrees of freedom
## Multiple R-squared: 0.08567, Adjusted R-squared: 0.07281
## F-statistic: 6.664 on 23 and 1636 DF, p-value: < 0.00000000000000022
subgroup_lm_valuesplit_rf <- lm(paste0("num_comment ~ Treatment * review_freq_numeric_valuesplit + ", paste(video_columns, collapse = " + ")), data = df_wide_all %>% filter(prolific_id %in% respondents_to_keep))
summary(subgroup_lm_valuesplit_rf)
##
## Call:
## lm(formula = paste0("num_comment ~ Treatment * review_freq_numeric_valuesplit + ",
## paste(video_columns, collapse = " + ")), data = df_wide_all %>%
## filter(prolific_id %in% respondents_to_keep))
##
## Residuals:
## Min 1Q Median 3Q Max
## -3.8043 -1.3146 0.4883 1.1444 7.6097
##
## Coefficients:
## Estimate
## (Intercept) 1.18619
## TreatmentHint Control 0.15916
## TreatmentOne-Click Generate 0.41365
## TreatmentChat Generate -0.48850
## review_freq_numeric_valuesplit3-4 -0.23417
## review_freq_numeric_valuesplit1-2 -0.70391
## video11 0.15858
## video13 0.15263
## video14 0.34688
## video15 0.31790
## video16 0.25372
## video17 0.15427
## video18 0.10804
## video19 0.42355
## video20 0.28440
## video21 0.29202
## video22 0.18620
## video23 0.42267
## TreatmentHint Control:review_freq_numeric_valuesplit3-4 0.14160
## TreatmentOne-Click Generate:review_freq_numeric_valuesplit3-4 -0.07622
## TreatmentChat Generate:review_freq_numeric_valuesplit3-4 0.79473
## TreatmentHint Control:review_freq_numeric_valuesplit1-2 0.06200
## TreatmentOne-Click Generate:review_freq_numeric_valuesplit1-2 -0.30721
## TreatmentChat Generate:review_freq_numeric_valuesplit1-2 1.54753
## Std. Error
## (Intercept) 0.22703
## TreatmentHint Control 0.25437
## TreatmentOne-Click Generate 0.26116
## TreatmentChat Generate 0.31308
## review_freq_numeric_valuesplit3-4 0.19965
## review_freq_numeric_valuesplit1-2 0.19615
## video11 0.08219
## video13 0.08263
## video14 0.09034
## video15 0.09589
## video16 0.08371
## video17 0.08443
## video18 0.08767
## video19 0.09315
## video20 0.09246
## video21 0.09644
## video22 0.09381
## video23 0.08408
## TreatmentHint Control:review_freq_numeric_valuesplit3-4 0.29171
## TreatmentOne-Click Generate:review_freq_numeric_valuesplit3-4 0.29851
## TreatmentChat Generate:review_freq_numeric_valuesplit3-4 0.35360
## TreatmentHint Control:review_freq_numeric_valuesplit1-2 0.28574
## TreatmentOne-Click Generate:review_freq_numeric_valuesplit1-2 0.29081
## TreatmentChat Generate:review_freq_numeric_valuesplit1-2 0.35085
## t value
## (Intercept) 5.225
## TreatmentHint Control 0.626
## TreatmentOne-Click Generate 1.584
## TreatmentChat Generate -1.560
## review_freq_numeric_valuesplit3-4 -1.173
## review_freq_numeric_valuesplit1-2 -3.589
## video11 1.929
## video13 1.847
## video14 3.840
## video15 3.315
## video16 3.031
## video17 1.827
## video18 1.232
## video19 4.547
## video20 3.076
## video21 3.028
## video22 1.985
## video23 5.027
## TreatmentHint Control:review_freq_numeric_valuesplit3-4 0.485
## TreatmentOne-Click Generate:review_freq_numeric_valuesplit3-4 -0.255
## TreatmentChat Generate:review_freq_numeric_valuesplit3-4 2.248
## TreatmentHint Control:review_freq_numeric_valuesplit1-2 0.217
## TreatmentOne-Click Generate:review_freq_numeric_valuesplit1-2 -1.056
## TreatmentChat Generate:review_freq_numeric_valuesplit1-2 4.411
## Pr(>|t|)
## (Intercept) 0.000000197 ***
## TreatmentHint Control 0.531600
## TreatmentOne-Click Generate 0.113413
## TreatmentChat Generate 0.118883
## review_freq_numeric_valuesplit3-4 0.241000
## review_freq_numeric_valuesplit1-2 0.000342 ***
## video11 0.053858 .
## video13 0.064912 .
## video14 0.000128 ***
## video15 0.000935 ***
## video16 0.002477 **
## video17 0.067862 .
## video18 0.218004
## video19 0.000005840 ***
## video20 0.002133 **
## video21 0.002501 **
## video22 0.047329 *
## video23 0.000000553 ***
## TreatmentHint Control:review_freq_numeric_valuesplit3-4 0.627445
## TreatmentOne-Click Generate:review_freq_numeric_valuesplit3-4 0.798485
## TreatmentChat Generate:review_freq_numeric_valuesplit3-4 0.024737 *
## TreatmentHint Control:review_freq_numeric_valuesplit1-2 0.828263
## TreatmentOne-Click Generate:review_freq_numeric_valuesplit1-2 0.290955
## TreatmentChat Generate:review_freq_numeric_valuesplit1-2 0.000010969 ***
## ---
## Signif. codes: 0 '***' 0.001 '**' 0.01 '*' 0.05 '.' 0.1 ' ' 1
##
## Residual standard error: 1.377 on 1636 degrees of freedom
## Multiple R-squared: 0.08912, Adjusted R-squared: 0.07631
## F-statistic: 6.959 on 23 and 1636 DF, p-value: < 0.00000000000000022
We plot the number of comments by treatment and subgroup using group means.
subgroup_lm_valuesplit_smr_df <- df_wide_all %>% filter(prolific_id %in% respondents_to_keep) %>%
group_by(Treatment, social_media_reply_numeric_valuesplit) %>%
summarise(mean_comments = mean(num_comment, na.rm = T), se_comments = sd(num_comment, na.rm = T)/sqrt(n()), n = n())
## `summarise()` has grouped output by 'Treatment'. You can override using the
## `.groups` argument.
# rename valuesplit
subgroup_lm_valuesplit_smr_df$social_media_reply_numeric_valuesplit <- factor(subgroup_lm_valuesplit_smr_df$social_media_reply_numeric_valuesplit, levels = c("1-2", "3-4", "5-6"), labels = c("Low", "Medium", "High"))
subgroup_lm_valuesplit_rf_df <- df_wide_all %>% filter(prolific_id %in% respondents_to_keep) %>%
group_by(Treatment, review_freq_numeric_valuesplit) %>%
summarise(mean_comments = mean(num_comment, na.rm = T), se_comments = sd(num_comment, na.rm = T)/sqrt(n()), n = n())
## `summarise()` has grouped output by 'Treatment'. You can override using the
## `.groups` argument.
# rename valuesplit
subgroup_lm_valuesplit_rf_df$review_freq_numeric_valuesplit <- factor(subgroup_lm_valuesplit_rf_df$review_freq_numeric_valuesplit, levels = c("1-2", "3-4", "5-6"), labels = c("Low", "Medium", "High"))
ggplot(subgroup_lm_valuesplit_smr_df, aes(x = social_media_reply_numeric_valuesplit, y = mean_comments, fill = Treatment)) +
geom_bar(stat = "identity", position = "dodge") +
geom_errorbar(aes(ymin = mean_comments - 1.96*se_comments, ymax = mean_comments + 1.96*se_comments), width = 0.2, position = position_dodge(0.9)) +
labs(title = "Number of Comments by Social Media Reply Frequency", x = "Social Media Reply Frequency", y = "Number of Comments") +
scale_fill_manual(name = "Treatment",
values=c("Pure Control" = "yellowgreen", "Hint Control" = "turquoise2","One-Click Generate"="pink2","Chat Generate" = "orange2")) +
theme_minimal() +
theme(axis.text.x = element_text(hjust = 1),
# center title
title = element_text(face = "bold"))
ggplot(subgroup_lm_valuesplit_rf_df, aes(x = review_freq_numeric_valuesplit, y = mean_comments, fill = Treatment)) +
geom_bar(stat = "identity", position = "dodge") +
geom_errorbar(aes(ymin = mean_comments - 1.96*se_comments, ymax = mean_comments + 1.96*se_comments), width = 0.2, position = position_dodge(0.9)) +
labs(title = "Number of Comments by Review Frequency", x = "Frequency", y = "Number of Comments") +
scale_fill_manual(name = "Treatment",
values=c("Pure Control" = "yellowgreen", "Hint Control" = "turquoise2","One-Click Generate"="pink2","Chat Generate" = "orange2")) +
theme_minimal() +
theme(axis.text.x = element_text(hjust = 1),
# center title
title = element_text(face = "bold"))
social_media_use_numeric_median
[1] “Values for this variable: Below Median, Above Median”