Main reported analyses - as reported
Distribution of credibility scores within each occupation indicated that globally, participants thought the descriptions were credible, with the lowest credibility being in the nurse condition, M = 4.9, SD = 1.69 (see SOM, for details including influential cases analyses, model diagnostics, and exploratory analyses).
#Fi <- subset(Set, Set$Job == "F") # Firef subset
#N <- subset(Set, Set$Job == "N") # Nurses subset
#P <- subset(Set, Set$Job == "P") # Police subset
#Ps <- subset(Set, Set$Job == "Ps") # Psych subset
#W <- subset(Set, Set$Job == "W") # Welders subset
#paste0("Firefighter condition mean credibility:")
#mean(Fi$Credibility)
#paste0("Firefighter condition sd credibility:")
#sd(Fi$Credibility)
#
#paste0("Nurses condition mean credibility:")
#mean(N$Credibility)
#paste0("Nurses condition sd credibility:")
#sd(N$Credibility)
#
#paste0("Police officer condition mean credibility:")
#mean(P$Credibility)
#paste0("Police officer condition sd credibility:")
#sd(P$Credibility)
#
#paste0("Psychiatrists condition mean credibility:")
#mean(Ps$Credibility)
#paste0("Psychiatrists condition sd credibility:")
#sd(Ps$Credibility)
#
#paste0("Welders condition mean credibility:")
#mean(W$Credibility)
#paste0("Welders condition sd credibility:")
#sd(W$Credibility)
credibility_data <- tibble::tribble(
~Condition, ~Mean, ~SD,
"Firefighter", 5.274725, 1.595485,
"Nurse", 4.900369, 1.686888,
"Police officer", 5.080882, 1.328402,
"Psychiatrist", 4.992593, 1.532771,
"Welder", 5.240876, 1.422094
)
# Create gt table
credibility_data %>%
mutate(
Mean = round(Mean, 2),
SD = round(SD, 2)
) %>%
gt() %>%
tab_header(
title = "Credibility Ratings by Occupation"
) %>%
cols_label(
Condition = "Occupation",
Mean = "Mean Credibility",
SD = "SD Credibility"
) %>%
fmt_number(
columns = c(Mean, SD),
decimals = 2
) %>%
tab_options(
table.border.top.width = px(2),
table.border.bottom.width = px(2),
table.font.size = px(14)
)| Credibility Ratings by Occupation | ||
| Occupation | Mean Credibility | SD Credibility |
|---|---|---|
| Firefighter | 5.27 | 1.60 |
| Nurse | 4.90 | 1.69 |
| Police officer | 5.08 | 1.33 |
| Psychiatrist | 4.99 | 1.53 |
| Welder | 5.24 | 1.42 |
Finer grained Credibility analyses: Credibility by Occupations x experimental condition
Set$Credibility <- as.numeric(Set$Credibility)
df_long <- Set %>%
pivot_longer(
cols = c(Heroism, Danger, Helpfulness, Selfless, Brave, Attitude, Credibility),
names_to = "Variable",
values_to = "Score"
)
# 2. Compute summary statistics by Job and Variable
df_long2<- subset(df_long, df_long$Variable != "Credibility")
df_summary <- df_long %>%
group_by(Job, Variable) %>%
summarize(
mean_score = mean(Score, na.rm = TRUE),
sd_score = sd(Score, na.rm = TRUE),
.groups = "drop"
)
df_summary2 <- df_long2 %>%
group_by(Job, Variable) %>%
summarize(
mean_score = mean(Score, na.rm = TRUE),
sd_score = sd(Score, na.rm = TRUE),
.groups = "drop"
)
# 3. Create the ggplot using the long format data
ggplot(df_long2, aes(x = Score)) +
geom_histogram(aes(fill = after_stat(count)),
binwidth = 1,
color = "black", show.legend = FALSE) +
facet_grid(Variable ~ Job, scales = "free") +
scale_fill_gradientn(
colours = brewer.pal(9, "YlOrBr"),
name = "Count"
) +
labs(
title = "Histograms of Variable by Occupation",
x = "Score",
y = "Count"
) +
# Annotate each facet with the mean and standard deviation
geom_text(data = df_summary2,
aes(x = 7, y = Inf,
label = paste0("Mean = ", round(mean_score, 2),
"\nSD = ", round(sd_score, 2))),
vjust = 1.5, hjust = 1.1, size = 3) +
theme_classic() +
theme(
panel.grid.major.y = element_line(linewidth = 0.5),
panel.grid.minor.y = element_line(linewidth = 0.5)
)Using Welch t-test, our manipulations did successfully influence character-based manipulation checks. Participants in the boredom condition were associated with lower perceived bravery (M = 5.62, SD = 1.28) than participants in the risk condition (M = 5.98, SD = 1.26), and this difference reached significance in a Welch two sample t-test, t(1357.02) = -5.21, p < .001, Cohen’s d = 0.28, 95% CI [0.18, 0.39].
##
## Welch Two Sample t-test
##
## data: Set$Brave by Set$Risk
## t = -5.206, df = 1357, p-value = 2.227e-07
## alternative hypothesis: true difference in means between group B and group R is not equal to 0
## 95 percent confidence interval:
## -0.4931945 -0.2232317
## sample estimates:
## mean in group B mean in group R
## 5.622781 5.980994
my_sum <- Set %>%
group_by(Risk) %>%
summarise(
n=n(),
mean=mean(Brave),
sd=sd(Brave)
) %>%
mutate( se=sd/sqrt(n))
# Standard deviation
ggplot(my_sum) +
geom_bar( aes(x=Risk, y=mean), stat="identity", fill="forestgreen", alpha=0.5) +
geom_errorbar( aes(x=Risk, ymin=mean-se, ymax=mean+se), width=0.4, colour="orange", alpha=0.9, size=1.5) +
ggtitle("Brave ~ Risk type (B = Boredom; R = High risk); bars are SE")## Warning: Using `size` aesthetic for lines was deprecated in ggplot2 3.4.0.
## ℹ Please use `linewidth` instead.
## This warning is displayed once every 8 hours.
## Call `lifecycle::last_lifecycle_warnings()` to see where this warning was
## generated.
## Set$Risk: B
## [1] 1.278198
## ------------------------------------------------------------
## Set$Risk: R
## [1] 1.259083
## [1] 1.280748
Similarly, participants in the altruistic motivation condition rated target occupation as more selfless (M = 5.67, SD = 1.24) than participants in the self-improvement condition (M = 5.33, SD = 1.40), and this difference also reached significance, t(1336.56) = 4.80, p < .001, d = 0.26, 95% CI [0.15, 0.37].
##
## Welch Two Sample t-test
##
## data: Set$Selfless by Set$Help
## t = 4.7993, df = 1336.6, p-value = 1.771e-06
## alternative hypothesis: true difference in means between group H and group S is not equal to 0
## 95 percent confidence interval:
## 0.2034586 0.4847767
## sample estimates:
## mean in group H mean in group S
## 5.669118 5.325000
## Set$Help: H
## [1] 5.669118
## ------------------------------------------------------------
## Set$Help: S
## [1] 5.325
## Set$Help: H
## [1] 1.235551
## ------------------------------------------------------------
## Set$Help: S
## [1] 1.403328
my_sum <- Set %>%
group_by(Help) %>%
summarise(
n=n(),
mean=mean(Brave),
sd=sd(Brave)
) %>%
mutate( se=sd/sqrt(n))
# Standard deviation
ggplot(my_sum) +
geom_bar( aes(x=Help, y=mean), stat="identity", fill="forestgreen", alpha=0.5) +
geom_errorbar( aes(x=Help, ymin=mean-se, ymax=mean+se), width=0.4, colour="orange", alpha=0.9, size=1.5) +
ggtitle("Selfless ~ Help type (H = Helping; S = Self improve); bars are SE")For objective assessments also, our manipulations were successful: participants in the risk condition evaluated the target occupation as significantly more exposed to risk (M = 6.28, SD = 0.95) than participants in the boredom condition (M = 5.11, SD = 1.38), t(1190.54) = 18.15, p < .001; Cohen’s d = 0.99, 95% CI [0.87, 1.10].
##
## Welch Two Sample t-test
##
## data: Set$Danger by Set$Risk
## t = -18.15, df = 1190.5, p-value < 2.2e-16
## alternative hypothesis: true difference in means between group B and group R is not equal to 0
## 95 percent confidence interval:
## -1.294546 -1.041971
## sample estimates:
## mean in group B mean in group R
## 5.113905 6.282164
## Set$Risk: B
## [1] 5.113905
## ------------------------------------------------------------
## Set$Risk: R
## [1] 6.282164
## Set$Risk: B
## [1] 1.384694
## ------------------------------------------------------------
## Set$Risk: R
## [1] 0.9454696
my_sum <- Set %>%
group_by(Risk) %>%
summarise(
n=n(),
mean=mean(Danger),
sd=sd(Danger)
) %>%
mutate( se=sd/sqrt(n))
# Standard deviation
ggplot(my_sum) +
geom_bar( aes(x=Risk, y=mean), stat="identity", fill="forestgreen", alpha=0.5) +
geom_errorbar( aes(x=Risk, ymin=mean-se, ymax=mean+se), width=0.4, colour="orange", alpha=0.9, size=1.5) +
ggtitle("Danger ~ Risk type (B = Boredom; R = High risk); bars are SE")Participants in the altrustic motivation condition indicated that the target occupation was more helping others (M = 6.11, SD = 0.98) than participants in the self-improvement motivation condition (M = 5.80, SD = 1.24), t(1289.51) = 5.01, p < .001; Cohen’s d = 0.27, 95% CI [0.16, 0.38].
##
## Welch Two Sample t-test
##
## data: Set$Helpfulness by Set$Help
## t = 5.0127, df = 1289.5, p-value = 6.113e-07
## alternative hypothesis: true difference in means between group H and group S is not equal to 0
## 95 percent confidence interval:
## 0.1852758 0.4235477
## sample estimates:
## mean in group H mean in group S
## 6.107353 5.802941
## Set$Help: H
## [1] 6.107353
## ------------------------------------------------------------
## Set$Help: S
## [1] 5.802941
## Set$Help: H
## [1] 0.9822903
## ------------------------------------------------------------
## Set$Help: S
## [1] 1.242115
my_sum <- Set %>%
group_by(Help) %>%
summarise(
n=n(),
mean=mean(Helpfulness),
sd=sd(Helpfulness)
) %>%
mutate( se=sd/sqrt(n))
# Standard deviation
ggplot(my_sum) +
geom_bar( aes(x=Help, y=mean), stat="identity", fill="forestgreen", alpha=0.5) +
geom_errorbar( aes(x=Help, ymin=mean-se, ymax=mean+se), width=0.4, colour="orange", alpha=0.9, size=1.5) +
ggtitle("Helpfulness ~ Motivation type (H = Helping; S = Self-improve); bars are SE")As registered, we evaluated the effects of our manipulations using Ordinary Least Square (OLS) linear models. To assess the normative influence of occupational category on heroism perception, we compared a model that included occupation as a moderator to one that did not. The model with the occupation covariate showed a significantly better fit (RSS = 2378.1) than the model without it (RSS = 2906.4), F(16, 1340) = 18.603, p < .001, indicating that the effects were significantly driven by normative evaluations of each occupation.
mod <-lm(Heroism ~ Risk_dummy * Help_dummy, data = Set)
mod_cov<-lm(Heroism ~ Risk_dummy * Help_dummy * Job, data = Set)
anova(mod, mod_cov)Importantly, risk and helping motivation had independent effects on perceived heroism across both models. In our main model (excluding occupation), the risk manipulation significantly increased heroism ratings, t(1356) = 6.02, p < .001, std. b = 0.16, 95% CI [0.11, 0.21]. Altruistic motivation also had a statistically significant, albeit appreciably smaller, effect, t(1356) = 2.32, p = .021, b = 0.06, 95% CI [0.0095, 0.11]. However, their interaction was not significant, std.b = -0.11, 95% CI [-0.42, 0.21], t(1356) = -0.66, p = .508, b = -0.02, 95% CI [-0.07, 0.03].
##
## Call:
## lm(formula = Heroism ~ Risk_dummy * Help_dummy, data = Set)
##
## Residuals:
## Min 1Q Median 3Q Max
## -4.3246 -0.8994 0.1006 1.1006 2.3373
##
## Coefficients:
## Estimate Std. Error t value Pr(>|t|)
## (Intercept) 5.0199 0.0397 126.448 < 2e-16 ***
## Risk_dummy 0.4777 0.0794 6.017 2.29e-09 ***
## Help_dummy 0.1841 0.0794 2.319 0.0205 *
## Risk_dummy:Help_dummy -0.1051 0.1588 -0.662 0.5082
## ---
## Signif. codes: 0 '***' 0.001 '**' 0.01 '*' 0.05 '.' 0.1 ' ' 1
##
## Residual standard error: 1.464 on 1356 degrees of freedom
## Multiple R-squared: 0.03004, Adjusted R-squared: 0.0279
## F-statistic: 14 on 3 and 1356 DF, p-value: 5.444e-09
## We fitted a linear model (estimated using OLS) to predict Heroism with
## Risk_dummy and Help_dummy (formula: Heroism ~ Risk_dummy * Help_dummy). The
## model explains a statistically significant and weak proportion of variance (R2
## = 0.03, F(3, 1356) = 14.00, p < .001, adj. R2 = 0.03). The model's intercept,
## corresponding to Risk_dummy = 0 and Help_dummy = 0, is at 5.02 (95% CI [4.94,
## 5.10], t(1356) = 126.45, p < .001). Within this model:
##
## - The effect of Risk dummy is statistically significant and positive (beta =
## 0.48, 95% CI [0.32, 0.63], t(1356) = 6.02, p < .001; Std. beta = 0.16, 95% CI
## [0.11, 0.21])
## - The effect of Help dummy is statistically significant and positive (beta =
## 0.18, 95% CI [0.03, 0.34], t(1356) = 2.32, p = 0.021; Std. beta = 0.06, 95% CI
## [9.45e-03, 0.11])
## - The effect of Risk dummy × Help dummy is statistically non-significant and
## negative (beta = -0.11, 95% CI [-0.42, 0.21], t(1356) = -0.66, p = 0.508; Std.
## beta = -0.02, 95% CI [-0.07, 0.03])
##
## Standardized parameters were obtained by fitting the model on a standardized
## version of the dataset. 95% Confidence Intervals (CIs) and p-values were
## computed using a Wald t-distribution approximation.
FOOTNOTE: about the model using job as a moderator
As shown in table 1, manipulations of risk (vs boredom) was effective for firefighters, psychiatrists and underwater welders; but not for nurses and police officers. On the other hand, our manipulation of altruistic motivation failed to predict heroism perception, with the only exception of underwater welders. Across all occupations, our predictors failed to interact to predict perceived heroism (all ps > .1). Table 2 displays the standardized effect sizes when comparing means between experimental conditions within each target occupations.
Nurses <- subset(Set, Set$Job == "N")
Pol <- subset(Set, Set$Job == "P")
Firef <- subset(Set, Set$Job == "F")
Psych <- subset(Set, Set$Job == "Ps")
Weld <- subset(Set, Set$Job == "W")
paste0("NURSES")## [1] "NURSES"
## We fitted a linear model (estimated using OLS) to predict Heroism with
## Risk_dummy and Help_dummy (formula: Heroism ~ Risk_dummy * Help_dummy). The
## model explains a statistically not significant and very weak proportion of
## variance (R2 = 0.01, F(3, 267) = 1.15, p = 0.330, adj. R2 = 1.63e-03). The
## model's intercept, corresponding to Risk_dummy = 0 and Help_dummy = 0, is at
## 5.48 (95% CI [5.31, 5.66], t(267) = 62.64, p < .001). Within this model:
##
## - The effect of Risk dummy is statistically non-significant and positive (beta
## = 0.20, 95% CI [-0.15, 0.54], t(267) = 1.12, p = 0.264; Std. beta = 0.07, 95%
## CI [-0.05, 0.19])
## - The effect of Help dummy is statistically non-significant and positive (beta
## = 0.05, 95% CI [-0.30, 0.39], t(267) = 0.27, p = 0.789; Std. beta = 0.02, 95%
## CI [-0.10, 0.14])
## - The effect of Risk dummy × Help dummy is statistically non-significant and
## negative (beta = -0.51, 95% CI [-1.20, 0.18], t(267) = -1.46, p = 0.146; Std.
## beta = -0.09, 95% CI [-0.21, 0.03])
##
## Standardized parameters were obtained by fitting the model on a standardized
## version of the dataset. 95% Confidence Intervals (CIs) and p-values were
## computed using a Wald t-distribution approximation.
## [1] "Police"
## We fitted a linear model (estimated using OLS) to predict Heroism with
## Risk_dummy and Help_dummy (formula: Heroism ~ Risk_dummy * Help_dummy). The
## model explains a statistically not significant and very weak proportion of
## variance (R2 = 0.01, F(3, 268) = 0.94, p = 0.421, adj. R2 = -6.52e-04). The
## model's intercept, corresponding to Risk_dummy = 0 and Help_dummy = 0, is at
## 4.52 (95% CI [4.36, 4.68], t(268) = 55.82, p < .001). Within this model:
##
## - The effect of Risk dummy is statistically non-significant and positive (beta
## = 0.24, 95% CI [-0.08, 0.56], t(268) = 1.49, p = 0.137; Std. beta = 0.09, 95%
## CI [-0.03, 0.21])
## - The effect of Help dummy is statistically non-significant and positive (beta
## = 0.12, 95% CI [-0.19, 0.44], t(268) = 0.77, p = 0.442; Std. beta = 0.05, 95%
## CI [-0.07, 0.17])
## - The effect of Risk dummy × Help dummy is statistically non-significant and
## positive (beta = 0.01, 95% CI [-0.63, 0.65], t(268) = 0.03, p = 0.973; Std.
## beta = 2.07e-03, 95% CI [-0.12, 0.12])
##
## Standardized parameters were obtained by fitting the model on a standardized
## version of the dataset. 95% Confidence Intervals (CIs) and p-values were
## computed using a Wald t-distribution approximation.
## [1] "FIREF"
## We fitted a linear model (estimated using OLS) to predict Heroism with
## Risk_dummy and Help_dummy (formula: Heroism ~ Risk_dummy * Help_dummy). The
## model explains a statistically not significant and very weak proportion of
## variance (R2 = 0.02, F(3, 269) = 1.39, p = 0.246, adj. R2 = 4.30e-03). The
## model's intercept, corresponding to Risk_dummy = 0 and Help_dummy = 0, is at
## 5.94 (95% CI [5.80, 6.08], t(269) = 85.00, p < .001). Within this model:
##
## - The effect of Risk dummy is statistically significant and positive (beta =
## 0.29, 95% CI [0.01, 0.56], t(269) = 2.04, p = 0.042; Std. beta = 0.12, 95% CI
## [4.40e-03, 0.24])
## - The effect of Help dummy is statistically non-significant and positive (beta
## = 5.86e-03, 95% CI [-0.27, 0.28], t(269) = 0.04, p = 0.967; Std. beta =
## 2.52e-03, 95% CI [-0.12, 0.12])
## - The effect of Risk dummy × Help dummy is statistically non-significant and
## positive (beta = 0.02, 95% CI [-0.53, 0.57], t(269) = 0.06, p = 0.950; Std.
## beta = 3.84e-03, 95% CI [-0.12, 0.12])
##
## Standardized parameters were obtained by fitting the model on a standardized
## version of the dataset. 95% Confidence Intervals (CIs) and p-values were
## computed using a Wald t-distribution approximation.
## [1] "PSYCH"
## We fitted a linear model (estimated using OLS) to predict Heroism with
## Risk_dummy and Help_dummy (formula: Heroism ~ Risk_dummy * Help_dummy). The
## model explains a statistically significant and weak proportion of variance (R2
## = 0.05, F(3, 266) = 4.79, p = 0.003, adj. R2 = 0.04). The model's intercept,
## corresponding to Risk_dummy = 0 and Help_dummy = 0, is at 4.47 (95% CI [4.30,
## 4.64], t(266) = 52.27, p < .001). Within this model:
##
## - The effect of Risk dummy is statistically significant and positive (beta =
## 0.52, 95% CI [0.19, 0.86], t(266) = 3.05, p = 0.002; Std. beta = 0.18, 95% CI
## [0.06, 0.30])
## - The effect of Help dummy is statistically significant and positive (beta =
## 0.36, 95% CI [0.02, 0.70], t(266) = 2.11, p = 0.035; Std. beta = 0.13, 95% CI
## [7.95e-03, 0.24])
## - The effect of Risk dummy × Help dummy is statistically non-significant and
## negative (beta = -0.29, 95% CI [-0.97, 0.38], t(266) = -0.86, p = 0.392; Std.
## beta = -0.05, 95% CI [-0.17, 0.07])
##
## Standardized parameters were obtained by fitting the model on a standardized
## version of the dataset. 95% Confidence Intervals (CIs) and p-values were
## computed using a Wald t-distribution approximation.
## [1] "WELDERS"
## We fitted a linear model (estimated using OLS) to predict Heroism with
## Risk_dummy and Help_dummy (formula: Heroism ~ Risk_dummy * Help_dummy). The
## model explains a statistically significant and moderate proportion of variance
## (R2 = 0.19, F(3, 270) = 20.65, p < .001, adj. R2 = 0.18). The model's
## intercept, corresponding to Risk_dummy = 0 and Help_dummy = 0, is at 4.68 (95%
## CI [4.53, 4.84], t(270) = 59.29, p < .001). Within this model:
##
## - The effect of Risk dummy is statistically significant and positive (beta =
## 1.18, 95% CI [0.87, 1.49], t(270) = 7.46, p < .001; Std. beta = 0.41, 95% CI
## [0.30, 0.52])
## - The effect of Help dummy is statistically significant and positive (beta =
## 0.40, 95% CI [0.08, 0.71], t(270) = 2.50, p = 0.013; Std. beta = 0.14, 95% CI
## [0.03, 0.25])
## - The effect of Risk dummy × Help dummy is statistically non-significant and
## positive (beta = 0.18, 95% CI [-0.44, 0.80], t(270) = 0.57, p = 0.568; Std.
## beta = 0.03, 95% CI [-0.08, 0.14])
##
## Standardized parameters were obtained by fitting the model on a standardized
## version of the dataset. 95% Confidence Intervals (CIs) and p-values were
## computed using a Wald t-distribution approximation.
# Regression results data frame
regression_results <- data.frame(
Group = rep(c("Nurses", "Police", "Firefighters", "Psychiatrists", "Welders"), each = 3),
Effect = rep(c("Risk dummy", "Help dummy", "Risk dummy × Help dummy"), times = 5),
Beta = c(0.20, 0.05, -0.51,
0.24, 0.12, 0.01,
0.29, 0.00586, 0.02,
0.52, 0.36, -0.29,
1.18, 0.40, 0.18),
CI = c("[-0.15, 0.54]", "[-0.30, 0.39]", "[-1.20, 0.18]",
"[-0.08, 0.56]", "[-0.19, 0.44]", "[-0.63, 0.65]",
"[0.01, 0.56]", "[-0.27, 0.28]", "[-0.53, 0.57]",
"[0.19, 0.86]", "[0.02, 0.70]", "[-0.97, 0.38]",
"[0.87, 1.49]", "[0.08, 0.71]", "[-0.44, 0.80]"),
t_value = c(1.12, 0.27, -1.46,
1.49, 0.77, 0.03,
2.04, 0.04, 0.06,
3.05, 2.11, -0.86,
7.46, 2.50, 0.57),
p_value = c(0.264, 0.789, 0.146,
0.137, 0.442, 0.973,
0.042, 0.967, 0.950,
0.002, 0.035, 0.392,
"<0.001", 0.013, 0.568),
Std_Beta = c(0.07, 0.02, -0.09,
0.09, 0.05, 0.00207,
0.12, 0.00252, 0.00384,
0.18, 0.13, -0.05,
0.41, 0.14, 0.03),
Std_CI = c("[-0.05, 0.19]", "[-0.10, 0.14]", "[-0.21, 0.03]",
"[-0.03, 0.21]", "[-0.07, 0.17]", "[-0.12, 0.12]",
"[4.40e-03, 0.24]", "[-0.12, 0.12]", "[-0.12, 0.12]",
"[0.06, 0.30]", "[7.95e-03, 0.24]", "[-0.17, 0.07]",
"[0.30, 0.52]", "[0.03, 0.25]", "[-0.08, 0.14]"),
stringsAsFactors = FALSE
)
# Create the effect sizes data frame
effect_sizes <- data.frame(
Group = rep(c("Nurses", "Police", "Firefighters", "Psychiatrists", "Welders"), each = 2),
Effect = rep(c("Risk", "Motivation"), times = 5),
Cohen_d = c(0.14, 0.03,
0.18, 0.09,
0.25, 0.00593,
0.37, 0.25,
0.89, 0.27),
CI = c("[-0.10, 0.37]", "[-0.20, 0.27]",
"[-0.06, 0.42]", "[-0.14, 0.33]",
"[0.01, 0.49]", "[-0.23, 0.24]",
"[0.13, 0.61]", "[0.01, 0.49]",
"[0.64, 1.14]", "[0.03, 0.51]"),
stringsAsFactors = FALSE
)
regression_results_gt <- regression_results %>%
gt(groupname_col = "Group") %>% # automatically groups rows by the Group column
fmt_number(
columns = c("Beta", "t_value", "Std_Beta"),
decimals = 2
) %>%
tab_header(title = "Regression Results Summary")
## Create the gt table for effect sizes:
effect_sizes_gt <- effect_sizes %>%
gt(groupname_col = "Group") %>%
# Format numeric columns to display 2 decimals
fmt_number(
columns = c("Cohen_d"), # add any other numeric columns you want to format
decimals = 2
) %>%
tab_header(
title = "Effect Sizes (Cohen's d)"
) %>%
cols_label(
Effect = "Effect",
Cohen_d = "Cohen's d",
CI = "95% CI"
)
# Display the tables in an HTML document (in R Markdown, simply putting the table object in a code chunk will render it)
regression_results_gt| Regression Results Summary | ||||||
| Effect | Beta | CI | t_value | p_value | Std_Beta | Std_CI |
|---|---|---|---|---|---|---|
| Nurses | ||||||
| Risk dummy | 0.20 | [-0.15, 0.54] | 1.12 | 0.264 | 0.07 | [-0.05, 0.19] |
| Help dummy | 0.05 | [-0.30, 0.39] | 0.27 | 0.789 | 0.02 | [-0.10, 0.14] |
| Risk dummy × Help dummy | −0.51 | [-1.20, 0.18] | −1.46 | 0.146 | −0.09 | [-0.21, 0.03] |
| Police | ||||||
| Risk dummy | 0.24 | [-0.08, 0.56] | 1.49 | 0.137 | 0.09 | [-0.03, 0.21] |
| Help dummy | 0.12 | [-0.19, 0.44] | 0.77 | 0.442 | 0.05 | [-0.07, 0.17] |
| Risk dummy × Help dummy | 0.01 | [-0.63, 0.65] | 0.03 | 0.973 | 0.00 | [-0.12, 0.12] |
| Firefighters | ||||||
| Risk dummy | 0.29 | [0.01, 0.56] | 2.04 | 0.042 | 0.12 | [4.40e-03, 0.24] |
| Help dummy | 0.01 | [-0.27, 0.28] | 0.04 | 0.967 | 0.00 | [-0.12, 0.12] |
| Risk dummy × Help dummy | 0.02 | [-0.53, 0.57] | 0.06 | 0.95 | 0.00 | [-0.12, 0.12] |
| Psychiatrists | ||||||
| Risk dummy | 0.52 | [0.19, 0.86] | 3.05 | 0.002 | 0.18 | [0.06, 0.30] |
| Help dummy | 0.36 | [0.02, 0.70] | 2.11 | 0.035 | 0.13 | [7.95e-03, 0.24] |
| Risk dummy × Help dummy | −0.29 | [-0.97, 0.38] | −0.86 | 0.392 | −0.05 | [-0.17, 0.07] |
| Welders | ||||||
| Risk dummy | 1.18 | [0.87, 1.49] | 7.46 | <0.001 | 0.41 | [0.30, 0.52] |
| Help dummy | 0.40 | [0.08, 0.71] | 2.50 | 0.013 | 0.14 | [0.03, 0.25] |
| Risk dummy × Help dummy | 0.18 | [-0.44, 0.80] | 0.57 | 0.568 | 0.03 | [-0.08, 0.14] |
As predicted, both the character attributions (perceived bravery and perceived selflessness) and the occupations’ descriptors (perceived danger and perceived helpfulness) were strong predictors of perceived heroism (see correlation matrix, Table 3).
Character attribution main model
Set$Selfless_scale <- scale(Set$Selfless)
Set$Brave_scale <- scale(Set$Brave)
Set$Danger_scale <- scale(Set$Danger)
Set$Helpful_scale <- scale(Set$Helpfulness)
Set$Attitude_scale <- scale(Set$Attitude)
summary(mod<-lm(Heroism ~ Selfless_scale * Brave_scale , data = Set))##
## Call:
## lm(formula = Heroism ~ Selfless_scale * Brave_scale, data = Set)
##
## Residuals:
## Min 1Q Median 3Q Max
## -5.2958 -0.4015 0.2531 0.7042 4.1631
##
## Coefficients:
## Estimate Std. Error t value Pr(>|t|)
## (Intercept) 4.88313 0.03448 141.62 <2e-16 ***
## Selfless_scale 0.57453 0.04157 13.82 <2e-16 ***
## Brave_scale 0.58440 0.04483 13.04 <2e-16 ***
## Selfless_scale:Brave_scale 0.20734 0.02281 9.09 <2e-16 ***
## ---
## Signif. codes: 0 '***' 0.001 '**' 0.01 '*' 0.05 '.' 0.1 ' ' 1
##
## Residual standard error: 1.141 on 1356 degrees of freedom
## Multiple R-squared: 0.4105, Adjusted R-squared: 0.4092
## F-statistic: 314.8 on 3 and 1356 DF, p-value: < 2.2e-16
Situation attribution model
Set$Danger_scale <- scale(Set$Danger)
Set$Helpfulness_scale <- scale(Set$Helpfulness)
summary(mod<-lm(Heroism ~ Helpfulness_scale * Danger_scale , data = Set))##
## Call:
## lm(formula = Heroism ~ Helpfulness_scale * Danger_scale, data = Set)
##
## Residuals:
## Min 1Q Median 3Q Max
## -5.0765 -0.5704 0.1585 0.8965 3.6948
##
## Coefficients:
## Estimate Std. Error t value Pr(>|t|)
## (Intercept) 5.00226 0.03344 149.575 <2e-16 ***
## Helpfulness_scale 0.74007 0.03610 20.502 <2e-16 ***
## Danger_scale 0.35615 0.03533 10.082 <2e-16 ***
## Helpfulness_scale:Danger_scale 0.04330 0.02647 1.636 0.102
## ---
## Signif. codes: 0 '***' 0.001 '**' 0.01 '*' 0.05 '.' 0.1 ' ' 1
##
## Residual standard error: 1.156 on 1356 degrees of freedom
## Multiple R-squared: 0.3952, Adjusted R-squared: 0.3938
## F-statistic: 295.3 on 3 and 1356 DF, p-value: < 2.2e-16
PerformanceAnalytics::chart.Correlation(Set[, c("Heroism", "Selfless", "Brave", "Danger", "Helpfulness", "Attitude")], method = "spearman")
## Additional Unreported analyses