Code
library(lm.beta)
library(tidyverse)── Attaching core tidyverse packages ──────────────────────── tidyverse 2.0.0 ──
✔ forcats 1.0.1 ✔ tibble 3.3.0
✔ lubridate 1.9.4
── Conflicts ────────────────────────────────────────── tidyverse_conflicts() ──
✖ dplyr::filter() masks stats::filter()
✖ purrr::flatten() masks jsonlite::flatten()
✖ kableExtra::group_rows() masks dplyr::group_rows()
✖ dplyr::lag() masks stats::lag()
ℹ Use the conflicted package (<http://conflicted.r-lib.org/>) to force all conflicts to become errors
Code
library(emmeans)Welcome to emmeans.
Caution: You lose important information if you filter this package's results.
See '? untidy'
Code
library(gtsummary)Warning: package 'gtsummary' was built under R version 4.5.2
Code
library(dplyr)
# Update your dataframe before running lm()
df <- df %>%
mutate(
actual_participant_outcome = factor(actual_participant_outcome, levels = c("win", "tie", "lose")), #win is the reference group
info_condition = factor(info_condition, levels = c("none", "skill", "luck")) #none is the reference group
)
#table of averages
df %>%
select(
actual_participant_outcome,
bonus_belong_deviation, bonus_deserve_deviation,
attribution_self_scaled, attribution_other_scaled,
state_envy_composite, neg_affect_composite,
pos_affect_composite, tar_neg_composite, tar_pos_composite
) %>%
tbl_summary(
by = actual_participant_outcome,
statistic = list(all_continuous() ~ "{mean} ({sd})"),
digits = all_continuous() ~ 2,
label = list(
bonus_belong_deviation ~ "Belonging Deviation",
bonus_deserve_deviation ~ "Deservingness Deviation",
attribution_self_scaled ~ "Attribution (Self)",
attribution_other_scaled ~ "Attribution (Other)",
state_envy_composite ~ "State Envy",
neg_affect_composite ~ "Negative Affect",
pos_affect_composite ~ "Positive Affect",
tar_neg_composite ~ "Negative TAR",
tar_pos_composite ~ "Positive TAR"
)
) %>%
bold_labels() %>%
# Footnote 1: Deviation variables
modify_table_styling(
columns = label,
rows = variable %in% c("bonus_belong_deviation", "bonus_deserve_deviation"),
footnote = "Calculated as response minus earned amount. Positive values indicate believing one
should have/deserves more than received; negative values indicate the opposite."
) %>%
# Footnote 2: Scaled attribution variables
modify_table_styling(
columns = label,
rows = variable %in% c("attribution_self_scaled", "attribution_other_scaled"),
footnote = "Scaled as (variable - 50) / 50: -1 = skill, 0 = both, 1 = luck. More positive values
indicate greater attribution to luck."
)%>%
modify_caption("**Summary Statistics by Outcome**")| Characteristic | win N = 581 |
tie N = 291 |
lose N = 591 |
|---|---|---|---|
| Belonging Deviation2 | -0.05 (0.78) | 0.16 (0.76) | 0.81 (1.06) |
| Deservingness Deviation2 | -0.08 (0.73) | 0.14 (0.94) | 0.87 (1.08) |
| Attribution (Self)3 | 0.34 (0.57) | 0.25 (0.45) | 0.26 (0.51) |
| Attribution (Other)3 | 0.25 (0.52) | 0.26 (0.42) | 0.41 (0.47) |
| State Envy | 1.53 (1.03) | 1.73 (1.21) | 2.80 (1.48) |
| Negative Affect | 1.64 (0.93) | 1.85 (1.21) | 2.63 (1.34) |
| Positive Affect | 4.02 (1.13) | 4.24 (1.52) | 4.32 (1.33) |
| Negative TAR | 1.97 (1.13) | 2.28 (1.35) | 2.44 (1.30) |
| Positive TAR | 5.06 (0.91) | 4.63 (1.71) | 4.75 (1.33) |
| 1 Mean (SD) | |||
| 2 Calculated as response minus earned amount. Positive values indicate believing one should have/deserves more than received; negative values indicate the opposite. | |||
| 3 Scaled as (variable - 50) / 50: -1 = skill, 0 = both, 1 = luck. More positive values indicate greater attribution to luck. | |||
Code
df %>%
select(
info_condition,
bonus_belong_deviation, bonus_deserve_deviation,
attribution_self_scaled, attribution_other_scaled,
state_envy_composite, neg_affect_composite,
pos_affect_composite, tar_neg_composite, tar_pos_composite
) %>%
tbl_summary(
by = info_condition,
statistic = list(all_continuous() ~ "{mean} ({sd})"),
digits = all_continuous() ~ 2,
label = list(
bonus_belong_deviation ~ "Belonging Deviation",
bonus_deserve_deviation ~ "Deservingness Deviation",
attribution_self_scaled ~ "Attribution (Self)",
attribution_other_scaled ~ "Attribution (Other)",
state_envy_composite ~ "State Envy",
neg_affect_composite ~ "Negative Affect",
pos_affect_composite ~ "Positive Affect",
tar_neg_composite ~ "Negative TAR",
tar_pos_composite ~ "Positive TAR"
)
) %>%
bold_labels() %>%
# Footnote 1: Deviation variables
modify_table_styling(
columns = label,
rows = variable %in% c("bonus_belong_deviation", "bonus_deserve_deviation"),
footnote = "Calculated as response minus earned amount. Positive values indicate believing one
should have/deserves more than received; negative values indicate the opposite."
) %>%
# Footnote 2: Scaled attribution variables
modify_table_styling(
columns = label,
rows = variable %in% c("attribution_self_scaled", "attribution_other_scaled"),
footnote = "Scaled as (variable - 50) / 50: -1 = skill, 0 = both, 1 = luck. More positive values
indicate greater attribution to luck."
) %>%
modify_caption("**Summary Statistics by Outcome**")| Characteristic | none N = 531 |
skill N = 371 |
luck N = 561 |
|---|---|---|---|
| Belonging Deviation2 | 0.31 (0.90) | 0.32 (0.89) | 0.38 (1.11) |
| Deservingness Deviation2 | 0.35 (1.07) | 0.17 (1.00) | 0.46 (0.98) |
| Attribution (Self)3 | 0.32 (0.52) | 0.30 (0.53) | 0.25 (0.52) |
| Attribution (Other)3 | 0.40 (0.47) | 0.12 (0.47) | 0.37 (0.48) |
| State Envy | 1.87 (1.20) | 2.40 (1.56) | 2.08 (1.42) |
| Negative Affect | 1.92 (1.12) | 2.36 (1.37) | 2.05 (1.26) |
| Positive Affect | 4.04 (1.45) | 4.23 (1.25) | 4.30 (1.17) |
| Negative TAR | 2.14 (1.25) | 2.15 (1.02) | 2.33 (1.40) |
| Positive TAR | 4.89 (1.32) | 4.75 (1.23) | 4.88 (1.29) |
| 1 Mean (SD) | |||
| 2 Calculated as response minus earned amount. Positive values indicate believing one should have/deserves more than received; negative values indicate the opposite. | |||
| 3 Scaled as (variable - 50) / 50: -1 = skill, 0 = both, 1 = luck. More positive values indicate greater attribution to luck. | |||
Code
summary_table <- df %>%
select(
info_condition, actual_participant_outcome,
bonus_belong_deviation, bonus_deserve_deviation,
attribution_self_scaled, attribution_other_scaled,
state_envy_composite, neg_affect_composite,
pos_affect_composite, tar_neg_composite, tar_pos_composite
) %>%
tbl_strata(
strata = info_condition,
.header = "**Info Condition: {strata}**", # Custom header for each stratum
.tbl_fun = ~ .x %>%
tbl_summary(
by = actual_participant_outcome,
statistic = list(all_continuous() ~ "{mean} ({sd})"),
digits = all_continuous() ~ 2,
label = list(
bonus_belong_deviation ~ "Belonging Deviation",
bonus_deserve_deviation ~ "Deservingness Deviation",
attribution_self_scaled ~ "Attribution (Self)",
attribution_other_scaled ~ "Attribution (Other)",
state_envy_composite ~ "State Envy",
neg_affect_composite ~ "Negative Affect",
pos_affect_composite ~ "Positive Affect",
tar_neg_composite ~ "Negative TAR",
tar_pos_composite ~ "Positive TAR"
)
) %>%
bold_labels() %>%
# Footnote 1: Deviation variables
modify_table_styling(
columns = label,
rows = variable %in% c("bonus_belong_deviation", "bonus_deserve_deviation"),
footnote = "Calculated as response minus earned amount. Positive values indicate believing one
should have/deserves more than received; negative values indicate the opposite."
) %>%
# Footnote 2: Scaled attribution variables
modify_table_styling(
columns = label,
rows = variable %in% c("attribution_self_scaled", "attribution_other_scaled"),
footnote = "Scaled as (variable - 50) / 50: -1 = skill, 0 = both, 1 = luck. More positive values
indicate greater attribution to luck."
)
) %>%
# Overall Table Caption / Title
modify_caption("**Table 1. Summary Statistics by Info Condition and Participant Outcome**")
summary_table| Characteristic |
Info Condition: none
|
Info Condition: skill
|
Info Condition: luck
|
||||||
|---|---|---|---|---|---|---|---|---|---|
| win N = 201 |
tie N = 131 |
lose N = 201 |
win N = 151 |
tie N = 61 |
lose N = 161 |
win N = 231 |
tie N = 101 |
lose N = 231 |
|
| Belonging Deviation2 | -0.05 (0.89) | 0.31 (0.75) | 0.66 (0.90) | 0.00 (0.53) | -0.38 (0.79) | 0.89 (0.89) | -0.09 (0.85) | 0.29 (0.67) | 0.89 (1.30) |
| Deservingness Deviation2 | -0.06 (0.93) | 0.31 (1.11) | 0.80 (1.04) | -0.33 (0.49) | -0.46 (0.81) | 0.88 (1.00) | 0.07 (0.63) | 0.28 (0.65) | 0.92 (1.19) |
| Attribution (Self)3 | 0.46 (0.57) | 0.13 (0.49) | 0.31 (0.46) | 0.39 (0.61) | 0.42 (0.33) | 0.18 (0.50) | 0.21 (0.53) | 0.30 (0.44) | 0.26 (0.57) |
| Attribution (Other)3 | 0.44 (0.56) | 0.27 (0.42) | 0.45 (0.41) | -0.01 (0.49) | 0.17 (0.43) | 0.23 (0.46) | 0.26 (0.44) | 0.31 (0.45) | 0.51 (0.52) |
| State Envy | 1.51 (1.03) | 1.46 (0.68) | 2.50 (1.38) | 1.47 (0.92) | 2.42 (1.55) | 3.27 (1.62) | 1.60 (1.14) | 1.68 (1.48) | 2.74 (1.44) |
| Negative Affect | 1.67 (0.98) | 1.58 (0.70) | 2.41 (1.32) | 1.63 (0.77) | 2.54 (1.70) | 2.99 (1.42) | 1.64 (1.02) | 1.80 (1.37) | 2.57 (1.30) |
| Positive Affect | 3.78 (1.29) | 4.26 (1.65) | 4.15 (1.50) | 4.49 (0.95) | 3.33 (1.73) | 4.33 (1.24) | 3.93 (1.04) | 4.77 (1.02) | 4.46 (1.27) |
| Negative TAR | 1.88 (1.02) | 2.05 (1.25) | 2.45 (1.44) | 1.80 (0.66) | 2.39 (1.45) | 2.40 (1.08) | 2.14 (1.43) | 2.50 (1.53) | 2.45 (1.36) |
| Positive TAR | 5.15 (1.00) | 4.89 (1.90) | 4.64 (1.15) | 5.09 (0.96) | 4.23 (1.34) | 4.61 (1.39) | 4.96 (0.83) | 4.52 (1.76) | 4.95 (1.47) |
| 1 Mean (SD) | |||||||||
| 2 Calculated as response minus earned amount. Positive values indicate believing one should have/deserves more than received; negative values indicate the opposite. | |||||||||
| 3 Scaled as (variable - 50) / 50: -1 = skill, 0 = both, 1 = luck. More positive values indicate greater attribution to luck. | |||||||||
Code
# outcome on attribution
summary(lm.beta(lm(attribution_self ~ actual_participant_outcome * info_condition, data = df)))
Call:
lm(formula = attribution_self ~ actual_participant_outcome *
info_condition, data = df)
Residuals:
Min 1Q Median 3Q Max
-72.90 -17.30 0.70 20.07 43.54
Coefficients:
Estimate Standardized
(Intercept) 72.90000 NA
actual_participant_outcometie -16.43846 -0.25309
actual_participant_outcomelose -7.20000 -0.13635
info_conditionskill -3.30000 -0.05539
info_conditionluck -12.16087 -0.22819
actual_participant_outcometie:info_conditionskill 17.67179 0.13538
actual_participant_outcomelose:info_conditionskill -3.40000 -0.04099
actual_participant_outcometie:info_conditionluck 20.79933 0.20274
actual_participant_outcomelose:info_conditionluck 9.46087 0.13301
Std. Error t value Pr(>|t|)
(Intercept) 5.86537 12.429 <2e-16
actual_participant_outcometie 9.34503 -1.759 0.0808
actual_participant_outcomelose 8.29488 -0.868 0.3869
info_conditionskill 8.95950 -0.368 0.7132
info_conditionluck 8.01984 -1.516 0.1317
actual_participant_outcometie:info_conditionskill 15.74404 1.122 0.2636
actual_participant_outcomelose:info_conditionskill 12.55700 -0.271 0.7870
actual_participant_outcometie:info_conditionluck 13.64001 1.525 0.1296
actual_participant_outcomelose:info_conditionluck 11.34177 0.834 0.4056
(Intercept) ***
actual_participant_outcometie .
actual_participant_outcomelose
info_conditionskill
info_conditionluck
actual_participant_outcometie:info_conditionskill
actual_participant_outcomelose:info_conditionskill
actual_participant_outcometie:info_conditionluck
actual_participant_outcomelose:info_conditionluck
---
Signif. codes: 0 '***' 0.001 '**' 0.01 '*' 0.05 '.' 0.1 ' ' 1
Residual standard error: 26.23 on 137 degrees of freedom
Multiple R-squared: 0.03851, Adjusted R-squared: -0.01764
F-statistic: 0.6859 on 8 and 137 DF, p-value: 0.7034
Code
attribution_self_mod <- lm(attribution_self ~ actual_participant_outcome * info_condition, data = df) #main + int
emmeans(attribution_self_mod, pairwise ~ actual_participant_outcome, adjust = "tukey")NOTE: Results may be misleading due to involvement in interactions
$emmeans
actual_participant_outcome emmean SE df lower.CL upper.CL
win 67.7 3.50 137 60.8 74.7
tie 64.1 5.13 137 54.0 74.3
lose 62.6 3.45 137 55.7 69.4
Results are averaged over the levels of: info_condition
Confidence level used: 0.95
$contrasts
contrast estimate SE df t.ratio p.value
win - tie 3.61 6.21 137 0.582 0.8297
win - lose 5.18 4.92 137 1.054 0.5445
tie - lose 1.56 6.18 137 0.253 0.9653
Results are averaged over the levels of: info_condition
P value adjustment: tukey method for comparing a family of 3 estimates
Code
emmeans(attribution_self_mod, pairwise ~ actual_participant_outcome * info_condition, adjust = "tukey")$emmeans actual_participant_outcome info_condition emmean SE df lower.CL upper.CL
win none 72.9 5.87 137 61.3 84.5
tie none 56.5 7.28 137 42.1 70.8
lose none 65.7 5.87 137 54.1 77.3
win skill 69.6 6.77 137 56.2 83.0
tie skill 70.8 10.70 137 49.7 92.0
lose skill 59.0 6.56 137 46.0 72.0
win luck 60.7 5.47 137 49.9 71.6
tie luck 65.1 8.29 137 48.7 81.5
lose luck 63.0 5.47 137 52.2 73.8
Confidence level used: 0.95
Code
summary(lm.beta(lm(attribution_other ~ actual_participant_outcome * info_condition, data = df)))
Call:
lm(formula = attribution_other ~ actual_participant_outcome *
info_condition, data = df)
Residuals:
Min 1Q Median 3Q Max
-67.478 -15.400 -2.478 20.302 50.733
Coefficients:
Estimate Standardized
(Intercept) 71.7500 NA
actual_participant_outcometie -8.1346 -0.1343
actual_participant_outcomelose 0.6500 0.0132
info_conditionskill -22.4833 -0.4047
info_conditionluck -8.7065 -0.1752
actual_participant_outcometie:info_conditionskill 17.3680 0.1427
actual_participant_outcomelose:info_conditionskill 11.5208 0.1489
actual_participant_outcometie:info_conditionluck 10.4911 0.1096
actual_participant_outcomelose:info_conditionluck 11.7848 0.1777
Std. Error t value Pr(>|t|)
(Intercept) 5.2866 13.572 < 2e-16
actual_participant_outcometie 8.4229 -0.966 0.33586
actual_participant_outcomelose 7.4763 0.087 0.93085
info_conditionskill 8.0754 -2.784 0.00613
info_conditionluck 7.2284 -1.204 0.23048
actual_participant_outcometie:info_conditionskill 14.1904 1.224 0.22308
actual_participant_outcomelose:info_conditionskill 11.3179 1.018 0.31050
actual_participant_outcometie:info_conditionluck 12.2940 0.853 0.39495
actual_participant_outcomelose:info_conditionluck 10.2226 1.153 0.25099
(Intercept) ***
actual_participant_outcometie
actual_participant_outcomelose
info_conditionskill **
info_conditionluck
actual_participant_outcometie:info_conditionskill
actual_participant_outcomelose:info_conditionskill
actual_participant_outcometie:info_conditionluck
actual_participant_outcomelose:info_conditionluck
---
Signif. codes: 0 '***' 0.001 '**' 0.01 '*' 0.05 '.' 0.1 ' ' 1
Residual standard error: 23.64 on 137 degrees of freedom
Multiple R-squared: 0.102, Adjusted R-squared: 0.04953
F-statistic: 1.944 on 8 and 137 DF, p-value: 0.05815
Code
attribution_other_mod <- lm(attribution_other ~ actual_participant_outcome * info_condition, data = df) #main + int
emmeans(attribution_other_mod, pairwise ~ actual_participant_outcome, adjust = "tukey")NOTE: Results may be misleading due to involvement in interactions
$emmeans
actual_participant_outcome emmean SE df lower.CL upper.CL
win 61.4 3.15 137 55.1 67.6
tie 62.5 4.62 137 53.4 71.6
lose 69.8 3.11 137 63.6 75.9
Results are averaged over the levels of: info_condition
Confidence level used: 0.95
$contrasts
contrast estimate SE df t.ratio p.value
win - tie -1.15 5.59 137 -0.206 0.9769
win - lose -8.42 4.43 137 -1.900 0.1426
tie - lose -7.27 5.57 137 -1.305 0.3951
Results are averaged over the levels of: info_condition
P value adjustment: tukey method for comparing a family of 3 estimates
Code
emmeans(attribution_other_mod, pairwise ~ actual_participant_outcome * info_condition, adjust = "tukey")$emmeans actual_participant_outcome info_condition emmean SE df lower.CL upper.CL
win none 71.8 5.29 137 61.3 82.2
tie none 63.6 6.56 137 50.6 76.6
lose none 72.4 5.29 137 61.9 82.9
win skill 49.3 6.10 137 37.2 61.3
tie skill 58.5 9.65 137 39.4 77.6
lose skill 61.4 5.91 137 49.7 73.1
win luck 63.0 4.93 137 53.3 72.8
tie luck 65.4 7.48 137 50.6 80.2
lose luck 75.5 4.93 137 65.7 85.2
Confidence level used: 0.95
Code
#==========================
# bonus appraisals
##How much of the bonus should belong to you?
summary(lm.beta(lm(bonus_belong_deviation ~ actual_participant_outcome * info_condition, data = df)))
Call:
lm(formula = bonus_belong_deviation ~ actual_participant_outcome *
info_condition, data = df)
Residuals:
Min 1Q Median 3Q Max
-2.9500 -0.6615 0.0500 0.3135 2.3360
Coefficients:
Estimate Standardized
(Intercept) -0.05000 NA
actual_participant_outcometie 0.35692 0.14590
actual_participant_outcomelose 0.71400 0.35898
info_conditionskill 0.05333 0.02377
info_conditionluck -0.04391 -0.02188
actual_participant_outcometie:info_conditionskill -0.74359 -0.15124
actual_participant_outcomelose:info_conditionskill 0.17204 0.05506
actual_participant_outcometie:info_conditionluck 0.03099 0.00802
actual_participant_outcomelose:info_conditionluck 0.27078 0.10107
Std. Error t value Pr(>|t|)
(Intercept) 0.20301 -0.246 0.8058
actual_participant_outcometie 0.32345 1.103 0.2718
actual_participant_outcomelose 0.28710 2.487 0.0141
info_conditionskill 0.31011 0.172 0.8637
info_conditionluck 0.27758 -0.158 0.8745
actual_participant_outcometie:info_conditionskill 0.54493 -1.365 0.1746
actual_participant_outcomelose:info_conditionskill 0.43462 0.396 0.6928
actual_participant_outcometie:info_conditionluck 0.47211 0.066 0.9478
actual_participant_outcomelose:info_conditionluck 0.39256 0.690 0.4915
(Intercept)
actual_participant_outcometie
actual_participant_outcomelose *
info_conditionskill
info_conditionluck
actual_participant_outcometie:info_conditionskill
actual_participant_outcomelose:info_conditionskill
actual_participant_outcometie:info_conditionluck
actual_participant_outcomelose:info_conditionluck
---
Signif. codes: 0 '***' 0.001 '**' 0.01 '*' 0.05 '.' 0.1 ' ' 1
Residual standard error: 0.9079 on 137 degrees of freedom
Multiple R-squared: 0.1881, Adjusted R-squared: 0.1406
F-statistic: 3.966 on 8 and 137 DF, p-value: 0.0002984
Code
bonus_belong_mod <- lm(bonus_belong_deviation ~ actual_participant_outcome * info_condition, data = df)
emmeans(bonus_belong_mod, pairwise ~ actual_participant_outcome, adjust = "tukey")NOTE: Results may be misleading due to involvement in interactions
$emmeans
actual_participant_outcome emmean SE df lower.CL upper.CL
win -0.0469 0.121 137 -0.286 0.193
tie 0.0725 0.177 137 -0.278 0.423
lose 0.8147 0.120 137 0.578 1.051
Results are averaged over the levels of: info_condition
Confidence level used: 0.95
$contrasts
contrast estimate SE df t.ratio p.value
win - tie -0.119 0.215 137 -0.556 0.8437
win - lose -0.862 0.170 137 -5.064 <.0001
tie - lose -0.742 0.214 137 -3.470 0.0020
Results are averaged over the levels of: info_condition
P value adjustment: tukey method for comparing a family of 3 estimates
Code
emmeans(bonus_belong_mod, pairwise ~ actual_participant_outcome * info_condition, adjust = "tukey")$emmeans actual_participant_outcome info_condition emmean SE df lower.CL upper.CL
win none -0.05000 0.203 137 -0.451 0.351
tie none 0.30692 0.252 137 -0.191 0.805
lose none 0.66400 0.203 137 0.263 1.065
win skill 0.00333 0.234 137 -0.460 0.467
tie skill -0.38333 0.371 137 -1.116 0.350
lose skill 0.88938 0.227 137 0.441 1.338
win luck -0.09391 0.189 137 -0.468 0.280
tie luck 0.29400 0.287 137 -0.274 0.862
lose luck 0.89087 0.189 137 0.517 1.265
Confidence level used: 0.95
Code
#How much of the bonus do you deserve?
summary(lm.beta(lm(bonus_deserve_deviation ~ actual_participant_outcome * info_condition, data = df)))
Call:
lm(formula = bonus_deserve_deviation ~ actual_participant_outcome *
info_condition, data = df)
Residuals:
Min 1Q Median 3Q Max
-2.9415 -0.6817 -0.0285 0.3783 2.2030
Coefficients:
Estimate Standardized
(Intercept) -0.058500 NA
actual_participant_outcometie 0.366192 0.144262
actual_participant_outcomelose 0.855500 0.414531
info_conditionskill -0.274833 -0.118042
info_conditionluck 0.128500 0.061698
actual_participant_outcometie:info_conditionskill -0.487859 -0.095628
actual_participant_outcomelose:info_conditionskill 0.357208 0.110180
actual_participant_outcometie:info_conditionluck -0.158192 -0.039455
actual_participant_outcomelose:info_conditionluck -0.004630 -0.001666
Std. Error t value Pr(>|t|)
(Intercept) 0.207223 -0.282 0.7781
actual_participant_outcometie 0.330160 1.109 0.2693
actual_participant_outcomelose 0.293058 2.919 0.0041
info_conditionskill 0.316539 -0.868 0.3868
info_conditionluck 0.283341 0.454 0.6509
actual_participant_outcometie:info_conditionskill 0.556237 -0.877 0.3820
actual_participant_outcomelose:info_conditionskill 0.443639 0.805 0.4221
actual_participant_outcometie:info_conditionluck 0.481901 -0.328 0.7432
actual_participant_outcomelose:info_conditionluck 0.400704 -0.012 0.9908
(Intercept)
actual_participant_outcometie
actual_participant_outcomelose **
info_conditionskill
info_conditionluck
actual_participant_outcometie:info_conditionskill
actual_participant_outcomelose:info_conditionskill
actual_participant_outcometie:info_conditionluck
actual_participant_outcomelose:info_conditionluck
---
Signif. codes: 0 '***' 0.001 '**' 0.01 '*' 0.05 '.' 0.1 ' ' 1
Residual standard error: 0.9267 on 137 degrees of freedom
Multiple R-squared: 0.2143, Adjusted R-squared: 0.1684
F-statistic: 4.669 on 8 and 137 DF, p-value: 4.532e-05
Code
bonus_deserve_mod <- lm(bonus_deserve_deviation ~ actual_participant_outcome * info_condition, data = df)
emmeans(bonus_deserve_mod, pairwise ~ actual_participant_outcome, adjust = "tukey")NOTE: Results may be misleading due to involvement in interactions
$emmeans
actual_participant_outcome emmean SE df lower.CL upper.CL
win -0.1073 0.124 137 -0.352 0.137
tie 0.0436 0.181 137 -0.314 0.402
lose 0.8657 0.122 137 0.624 1.107
Results are averaged over the levels of: info_condition
Confidence level used: 0.95
$contrasts
contrast estimate SE df t.ratio p.value
win - tie -0.151 0.219 137 -0.688 0.7709
win - lose -0.973 0.174 137 -5.602 <.0001
tie - lose -0.822 0.218 137 -3.766 0.0007
Results are averaged over the levels of: info_condition
P value adjustment: tukey method for comparing a family of 3 estimates
Code
emmeans(bonus_deserve_mod, pairwise ~ actual_participant_outcome * info_condition, adjust = "tukey")$emmeans actual_participant_outcome info_condition emmean SE df lower.CL upper.CL
win none -0.0585 0.207 137 -0.468 0.351
tie none 0.3077 0.257 137 -0.201 0.816
lose none 0.7970 0.207 137 0.387 1.207
win skill -0.3333 0.239 137 -0.806 0.140
tie skill -0.4550 0.378 137 -1.203 0.293
lose skill 0.8794 0.232 137 0.421 1.338
win luck 0.0700 0.193 137 -0.312 0.452
tie luck 0.2780 0.293 137 -0.302 0.858
lose luck 0.9209 0.193 137 0.539 1.303
Confidence level used: 0.95
Code
#============
# emotions
## envy
summary(lm.beta(lm(state_envy_composite ~ actual_participant_outcome * info_condition, data = df))) #main + int
Call:
lm(formula = state_envy_composite ~ actual_participant_outcome *
info_condition, data = df)
Residuals:
Min 1Q Median 3Q Max
-2.2656 -0.5978 -0.4615 0.6958 4.0750
Coefficients:
Estimate Standardized
(Intercept) 1.51250 NA
actual_participant_outcometie -0.05096 -0.01468
actual_participant_outcomelose 0.98750 0.34996
info_conditionskill -0.04583 -0.01440
info_conditionluck 0.08533 0.02996
actual_participant_outcometie:info_conditionskill 1.00096 0.14350
actual_participant_outcomelose:info_conditionskill 0.81146 0.18306
actual_participant_outcometie:info_conditionluck 0.12814 0.02337
actual_participant_outcomelose:info_conditionluck 0.15380 0.04047
Std. Error t value Pr(>|t|)
(Intercept) 0.28284 5.348 3.64e-07
actual_participant_outcometie 0.45064 -0.113 0.9101
actual_participant_outcomelose 0.40000 2.469 0.0148
info_conditionskill 0.43205 -0.106 0.9157
info_conditionluck 0.38674 0.221 0.8257
actual_participant_outcometie:info_conditionskill 0.75921 1.318 0.1896
actual_participant_outcomelose:info_conditionskill 0.60553 1.340 0.1824
actual_participant_outcometie:info_conditionluck 0.65775 0.195 0.8458
actual_participant_outcomelose:info_conditionluck 0.54693 0.281 0.7790
(Intercept) ***
actual_participant_outcometie
actual_participant_outcomelose *
info_conditionskill
info_conditionluck
actual_participant_outcometie:info_conditionskill
actual_participant_outcomelose:info_conditionskill
actual_participant_outcometie:info_conditionluck
actual_participant_outcomelose:info_conditionluck
---
Signif. codes: 0 '***' 0.001 '**' 0.01 '*' 0.05 '.' 0.1 ' ' 1
Residual standard error: 1.265 on 137 degrees of freedom
Multiple R-squared: 0.217, Adjusted R-squared: 0.1712
F-statistic: 4.745 on 8 and 137 DF, p-value: 3.708e-05
Code
envy_mod <- lm(state_envy_composite ~ actual_participant_outcome * info_condition, data = df)
emmeans(envy_mod, pairwise ~ actual_participant_outcome, adjust = "tukey") NOTE: Results may be misleading due to involvement in interactions
$emmeans
actual_participant_outcome emmean SE df lower.CL upper.CL
win 1.53 0.169 137 1.19 1.86
tie 1.85 0.247 137 1.36 2.34
lose 2.83 0.167 137 2.51 3.16
Results are averaged over the levels of: info_condition
Confidence level used: 0.95
$contrasts
contrast estimate SE df t.ratio p.value
win - tie -0.325 0.299 137 -1.087 0.5235
win - lose -1.309 0.237 137 -5.523 <.0001
tie - lose -0.984 0.298 137 -3.301 0.0035
Results are averaged over the levels of: info_condition
P value adjustment: tukey method for comparing a family of 3 estimates
Code
emmeans(envy_mod, pairwise ~ actual_participant_outcome*info_condition, adjust = "tukey")$emmeans actual_participant_outcome info_condition emmean SE df lower.CL upper.CL
win none 1.51 0.283 137 0.953 2.07
tie none 1.46 0.351 137 0.768 2.16
lose none 2.50 0.283 137 1.941 3.06
win skill 1.47 0.327 137 0.821 2.11
tie skill 2.42 0.516 137 1.396 3.44
lose skill 3.27 0.316 137 2.640 3.89
win luck 1.60 0.264 137 1.076 2.12
tie luck 1.68 0.400 137 0.884 2.47
lose luck 2.74 0.264 137 2.218 3.26
Confidence level used: 0.95
Code
## negative affect
summary(lm.beta(lm(neg_affect_composite ~ actual_participant_outcome * info_condition, data = df))) #main + int
Call:
lm(formula = neg_affect_composite ~ actual_participant_outcome *
info_condition, data = df)
Residuals:
Min 1Q Median 3Q Max
-1.9922 -0.6359 -0.2221 0.6611 3.7000
Coefficients:
Estimate Standardized
(Intercept) 1.66875 NA
actual_participant_outcometie -0.09183 -0.02953
actual_participant_outcomelose 0.73750 0.29168
info_conditionskill -0.04375 -0.01534
info_conditionluck -0.03288 -0.01289
actual_participant_outcometie:info_conditionskill 1.00849 0.16135
actual_participant_outcomelose:info_conditionskill 0.62969 0.15853
actual_participant_outcometie:info_conditionluck 0.25596 0.05211
actual_participant_outcomelose:info_conditionluck 0.19185 0.05633
Std. Error t value Pr(>|t|)
(Intercept) 0.26161 6.379 2.55e-09
actual_participant_outcometie 0.41681 -0.220 0.8260
actual_participant_outcomelose 0.36997 1.993 0.0482
info_conditionskill 0.39962 -0.109 0.9130
info_conditionluck 0.35770 -0.092 0.9269
actual_participant_outcometie:info_conditionskill 0.70222 1.436 0.1532
actual_participant_outcomelose:info_conditionskill 0.56007 1.124 0.2629
actual_participant_outcometie:info_conditionluck 0.60838 0.421 0.6746
actual_participant_outcomelose:info_conditionluck 0.50587 0.379 0.7051
(Intercept) ***
actual_participant_outcometie
actual_participant_outcomelose *
info_conditionskill
info_conditionluck
actual_participant_outcometie:info_conditionskill
actual_participant_outcomelose:info_conditionskill
actual_participant_outcometie:info_conditionluck
actual_participant_outcomelose:info_conditionluck
---
Signif. codes: 0 '***' 0.001 '**' 0.01 '*' 0.05 '.' 0.1 ' ' 1
Residual standard error: 1.17 on 137 degrees of freedom
Multiple R-squared: 0.1657, Adjusted R-squared: 0.1169
F-statistic: 3.4 on 8 and 137 DF, p-value: 0.001359
Code
NA_mod <- lm(neg_affect_composite ~ actual_participant_outcome * info_condition, data = df)
emmeans(NA_mod, pairwise ~ actual_participant_outcome, adjust = "tukey") NOTE: Results may be misleading due to involvement in interactions
$emmeans
actual_participant_outcome emmean SE df lower.CL upper.CL
win 1.64 0.156 137 1.33 1.95
tie 1.97 0.229 137 1.52 2.42
lose 2.65 0.154 137 2.35 2.96
Results are averaged over the levels of: info_condition
Confidence level used: 0.95
$contrasts
contrast estimate SE df t.ratio p.value
win - tie -0.330 0.277 137 -1.191 0.4605
win - lose -1.011 0.219 137 -4.612 <.0001
tie - lose -0.682 0.276 137 -2.473 0.0386
Results are averaged over the levels of: info_condition
P value adjustment: tukey method for comparing a family of 3 estimates
Code
emmeans(NA_mod, pairwise ~ actual_participant_outcome*info_condition, adjust = "tukey")$emmeans actual_participant_outcome info_condition emmean SE df lower.CL upper.CL
win none 1.67 0.262 137 1.151 2.19
tie none 1.58 0.324 137 0.935 2.22
lose none 2.41 0.262 137 1.889 2.92
win skill 1.62 0.302 137 1.028 2.22
tie skill 2.54 0.478 137 1.597 3.49
lose skill 2.99 0.292 137 2.414 3.57
win luck 1.64 0.244 137 1.153 2.12
tie luck 1.80 0.370 137 1.068 2.53
lose luck 2.57 0.244 137 2.083 3.05
Confidence level used: 0.95
Code
## positive affect
summary(lm.beta(lm(pos_affect_composite ~ actual_participant_outcome * info_condition, data = df))) #main + int
Call:
lm(formula = pos_affect_composite ~ actual_participant_outcome *
info_condition, data = df)
Residuals:
Min 1Q Median 3Q Max
-3.4638 -0.7417 0.2167 0.8647 2.6667
Coefficients:
Estimate Standardized
(Intercept) 3.78333 NA
actual_participant_outcometie 0.47308 0.14634
actual_participant_outcomelose 0.36667 0.13950
info_conditionskill 0.70556 0.23794
info_conditionluck 0.14420 0.05436
actual_participant_outcometie:info_conditionskill -1.62863 -0.25066
actual_participant_outcomelose:info_conditionskill -0.52222 -0.12648
actual_participant_outcometie:info_conditionluck 0.36605 0.07169
actual_participant_outcomelose:info_conditionluck 0.16957 0.04789
Std. Error t value Pr(>|t|)
(Intercept) 0.28769 13.151 <2e-16
actual_participant_outcometie 0.45837 1.032 0.3038
actual_participant_outcomelose 0.40686 0.901 0.3691
info_conditionskill 0.43946 1.606 0.1107
info_conditionluck 0.39337 0.367 0.7145
actual_participant_outcometie:info_conditionskill 0.77223 -2.109 0.0368
actual_participant_outcomelose:info_conditionskill 0.61591 -0.848 0.3980
actual_participant_outcometie:info_conditionluck 0.66903 0.547 0.5852
actual_participant_outcomelose:info_conditionluck 0.55631 0.305 0.7610
(Intercept) ***
actual_participant_outcometie
actual_participant_outcomelose
info_conditionskill
info_conditionluck
actual_participant_outcometie:info_conditionskill *
actual_participant_outcomelose:info_conditionskill
actual_participant_outcometie:info_conditionluck
actual_participant_outcomelose:info_conditionluck
---
Signif. codes: 0 '***' 0.001 '**' 0.01 '*' 0.05 '.' 0.1 ' ' 1
Residual standard error: 1.287 on 137 degrees of freedom
Multiple R-squared: 0.06629, Adjusted R-squared: 0.01177
F-statistic: 1.216 on 8 and 137 DF, p-value: 0.2942
Code
PA_mod <- lm(pos_affect_composite ~ actual_participant_outcome * info_condition, data = df)
emmeans(PA_mod, pairwise ~ actual_participant_outcome, adjust = "tukey") NOTE: Results may be misleading due to involvement in interactions
$emmeans
actual_participant_outcome emmean SE df lower.CL upper.CL
win 4.07 0.172 137 3.73 4.41
tie 4.12 0.251 137 3.62 4.62
lose 4.32 0.169 137 3.98 4.65
Results are averaged over the levels of: info_condition
Confidence level used: 0.95
$contrasts
contrast estimate SE df t.ratio p.value
win - tie -0.0522 0.304 137 -0.172 0.9839
win - lose -0.2491 0.241 137 -1.033 0.5573
tie - lose -0.1969 0.303 137 -0.650 0.7929
Results are averaged over the levels of: info_condition
P value adjustment: tukey method for comparing a family of 3 estimates
Code
emmeans(PA_mod, pairwise ~ actual_participant_outcome*info_condition, adjust = "tukey")$emmeans actual_participant_outcome info_condition emmean SE df lower.CL upper.CL
win none 3.78 0.288 137 3.21 4.35
tie none 4.26 0.357 137 3.55 4.96
lose none 4.15 0.288 137 3.58 4.72
win skill 4.49 0.332 137 3.83 5.15
tie skill 3.33 0.525 137 2.29 4.37
lose skill 4.33 0.322 137 3.70 4.97
win luck 3.93 0.268 137 3.40 4.46
tie luck 4.77 0.407 137 3.96 5.57
lose luck 4.46 0.268 137 3.93 4.99
Confidence level used: 0.95
Code
#==================
# TAR
## negative
summary(lm.beta(lm(tar_neg_composite ~ actual_participant_outcome * info_condition, data = df))) #main + int
Call:
lm(formula = tar_neg_composite ~ actual_participant_outcome *
info_condition, data = df)
Residuals:
Min 1Q Median 3Q Max
-1.5000 -0.8833 -0.3958 0.6154 3.8551
Coefficients:
Estimate Standardized
(Intercept) 1.883333 NA
actual_participant_outcometie 0.167949 0.053657
actual_participant_outcomelose 0.566667 0.222673
info_conditionskill -0.083333 -0.029026
info_conditionluck 0.261594 0.101859
actual_participant_outcometie:info_conditionskill 0.420940 0.066914
actual_participant_outcomelose:info_conditionskill 0.029167 0.007296
actual_participant_outcometie:info_conditionluck 0.187124 0.037849
actual_participant_outcomelose:info_conditionluck -0.262319 -0.076524
Std. Error t value Pr(>|t|)
(Intercept) 0.282429 6.668 5.84e-10
actual_participant_outcometie 0.449981 0.373 0.710
actual_participant_outcomelose 0.399415 1.419 0.158
info_conditionskill 0.431417 -0.193 0.847
info_conditionluck 0.386171 0.677 0.499
actual_participant_outcometie:info_conditionskill 0.758106 0.555 0.580
actual_participant_outcomelose:info_conditionskill 0.604644 0.048 0.962
actual_participant_outcometie:info_conditionluck 0.656793 0.285 0.776
actual_participant_outcomelose:info_conditionluck 0.546128 -0.480 0.632
(Intercept) ***
actual_participant_outcometie
actual_participant_outcomelose
info_conditionskill
info_conditionluck
actual_participant_outcometie:info_conditionskill
actual_participant_outcomelose:info_conditionskill
actual_participant_outcometie:info_conditionluck
actual_participant_outcomelose:info_conditionluck
---
Signif. codes: 0 '***' 0.001 '**' 0.01 '*' 0.05 '.' 0.1 ' ' 1
Residual standard error: 1.263 on 137 degrees of freedom
Multiple R-squared: 0.04009, Adjusted R-squared: -0.01596
F-statistic: 0.7152 on 8 and 137 DF, p-value: 0.6778
Code
tar_neg_mod <- lm(tar_neg_composite ~ actual_participant_outcome * info_condition, data = df)
emmeans(tar_neg_mod, pairwise ~ actual_participant_outcome, adjustment = "tukey")NOTE: Results may be misleading due to involvement in interactions
$emmeans
actual_participant_outcome emmean SE df lower.CL upper.CL
win 1.94 0.168 137 1.61 2.28
tie 2.31 0.247 137 1.83 2.80
lose 2.43 0.166 137 2.10 2.76
Results are averaged over the levels of: info_condition
Confidence level used: 0.95
$contrasts
contrast estimate SE df t.ratio p.value
win - tie -0.371 0.299 137 -1.240 0.4316
win - lose -0.489 0.237 137 -2.066 0.1009
tie - lose -0.118 0.298 137 -0.398 0.9166
Results are averaged over the levels of: info_condition
P value adjustment: tukey method for comparing a family of 3 estimates
Code
emmeans(tar_neg_mod, pairwise ~ actual_participant_outcome*info_condition, adjust = "tukey")$emmeans actual_participant_outcome info_condition emmean SE df lower.CL upper.CL
win none 1.88 0.282 137 1.32 2.44
tie none 2.05 0.350 137 1.36 2.74
lose none 2.45 0.282 137 1.89 3.01
win skill 1.80 0.326 137 1.16 2.44
tie skill 2.39 0.516 137 1.37 3.41
lose skill 2.40 0.316 137 1.77 3.02
win luck 2.14 0.263 137 1.62 2.67
tie luck 2.50 0.399 137 1.71 3.29
lose luck 2.45 0.263 137 1.93 2.97
Confidence level used: 0.95
Code
## positive
summary(lm.beta(lm(tar_pos_composite ~ actual_participant_outcome * info_condition, data = df))) #main + int
Call:
lm(formula = tar_pos_composite ~ actual_participant_outcome *
info_condition, data = df)
Residuals:
Min 1Q Median 3Q Max
-3.8923 -0.6400 0.0522 0.8500 2.3600
Coefficients:
Estimate Standardized
(Intercept) 5.150000 NA
actual_participant_outcometie -0.257692 -0.080585
actual_participant_outcomelose -0.510000 -0.196162
info_conditionskill -0.056667 -0.019320
info_conditionluck -0.193478 -0.073741
actual_participant_outcometie:info_conditionskill -0.602308 -0.093717
actual_participant_outcomelose:info_conditionskill 0.029167 0.007141
actual_participant_outcometie:info_conditionluck -0.178829 -0.035405
actual_participant_outcomelose:info_conditionluck 0.501304 0.143145
Std. Error t value Pr(>|t|)
(Intercept) 0.289284 17.803 <2e-16
actual_participant_outcometie 0.460903 -0.559 0.577
actual_participant_outcomelose 0.409109 -1.247 0.215
info_conditionskill 0.441888 -0.128 0.898
info_conditionluck 0.395544 -0.489 0.626
actual_participant_outcometie:info_conditionskill 0.776506 -0.776 0.439
actual_participant_outcomelose:info_conditionskill 0.619320 0.047 0.963
actual_participant_outcometie:info_conditionluck 0.672734 -0.266 0.791
actual_participant_outcomelose:info_conditionluck 0.559383 0.896 0.372
(Intercept) ***
actual_participant_outcometie
actual_participant_outcomelose
info_conditionskill
info_conditionluck
actual_participant_outcometie:info_conditionskill
actual_participant_outcomelose:info_conditionskill
actual_participant_outcometie:info_conditionluck
actual_participant_outcomelose:info_conditionluck
---
Signif. codes: 0 '***' 0.001 '**' 0.01 '*' 0.05 '.' 0.1 ' ' 1
Residual standard error: 1.294 on 137 degrees of freedom
Multiple R-squared: 0.03513, Adjusted R-squared: -0.02122
F-statistic: 0.6234 on 8 and 137 DF, p-value: 0.757
Code
tar_pos_mod <- lm(tar_pos_composite ~ actual_participant_outcome * info_condition, data = df)
emmeans(tar_pos_mod, pairwise ~ actual_participant_outcome, adjustment = "tukey")NOTE: Results may be misleading due to involvement in interactions
$emmeans
actual_participant_outcome emmean SE df lower.CL upper.CL
win 5.07 0.173 137 4.73 5.41
tie 4.55 0.253 137 4.05 5.05
lose 4.73 0.170 137 4.40 5.07
Results are averaged over the levels of: info_condition
Confidence level used: 0.95
$contrasts
contrast estimate SE df t.ratio p.value
win - tie 0.518 0.306 137 1.693 0.2117
win - lose 0.333 0.242 137 1.374 0.3573
tie - lose -0.185 0.305 137 -0.607 0.8168
Results are averaged over the levels of: info_condition
P value adjustment: tukey method for comparing a family of 3 estimates
Code
emmeans(tar_pos_mod, pairwise ~ actual_participant_outcome*info_condition, adjust = "tukey")$emmeans actual_participant_outcome info_condition emmean SE df lower.CL upper.CL
win none 5.15 0.289 137 4.58 5.72
tie none 4.89 0.359 137 4.18 5.60
lose none 4.64 0.289 137 4.07 5.21
win skill 5.09 0.334 137 4.43 5.75
tie skill 4.23 0.528 137 3.19 5.28
lose skill 4.61 0.323 137 3.97 5.25
win luck 4.96 0.270 137 4.42 5.49
tie luck 4.52 0.409 137 3.71 5.33
lose luck 4.95 0.270 137 4.41 5.48
Confidence level used: 0.95