library(tidyverse)
## ── Attaching core tidyverse packages ──────────────────────── tidyverse 2.0.0 ──
## ✔ dplyr 1.1.4 ✔ readr 2.1.5
## ✔ forcats 1.0.0 ✔ stringr 1.5.1
## ✔ ggplot2 3.5.1 ✔ tibble 3.2.1
## ✔ lubridate 1.9.3 ✔ tidyr 1.3.1
## ✔ purrr 1.0.2
## ── Conflicts ────────────────────────────────────────── tidyverse_conflicts() ──
## ✖ dplyr::filter() masks stats::filter()
## ✖ dplyr::lag() masks stats::lag()
## ℹ Use the conflicted package (<http://conflicted.r-lib.org/>) to force all conflicts to become errors
data <- read.csv("~/Google Drive/My Drive/YEAR 2/PROJECTS/DEREK/Assumptions of Deviants/conferring status study 1.csv") %>%
slice(-c(1:2)) %>%
mutate(pass = ifelse(((outlier == "man_late" | outlier == "man_early")
& (attn == "Brad" | attn == "BRAD" | attn == "brad")) |
((outlier == "woman_late" | outlier == "woman_early")
& (attn == "Claire" | attn == "claire" | attn == "CLAIRE")),
1, 0)) %>%
filter(pass == 1) %>%
rowwise() %>%
mutate(anderson_status = mean(inf_status:inf_inf, na.rm = T)) %>%
mutate(WSS_status = mean(WSS_1:WSS_5, na.rm = T)) %>%
ungroup()
ggplot(data = data,
aes(x = outlier, y = anderson_status)) +
geom_point(alpha = 0.1,
size = 2,
position = position_jitter(0.1)) +
stat_summary(fun.data = "mean_cl_boot",
size = 1,
geom = "linerange",
color = "grey50")+
stat_summary(fun = "mean",
size = 0.3)+
theme_bw()
## 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.
## Warning: Removed 4 rows containing missing values or values outside the scale range
## (`geom_segment()`).
ggplot(data = data,
aes(x = outlier, y = WSS_status)) +
geom_point(alpha = 0.1,
size = 2,
position = position_jitter(0.1)) +
stat_summary(fun.data = "mean_cl_boot",
size = 1,
geom = "linerange",
color = "grey50")+
stat_summary(fun = "mean",
size = 0.3)+
theme_bw()
## Warning: Removed 4 rows containing missing values or values outside the scale range
## (`geom_segment()`).
ggplot(data = data,
aes(x = outlier, y = as.numeric(threat))) +
geom_point(alpha = 0.1,
size = 2,
position = position_jitter(0.1)) +
stat_summary(fun.data = "mean_cl_boot",
size = 1,
geom = "linerange",
color = "grey50")+
stat_summary(fun = "mean",
size = 0.3)+
theme_bw()
## Warning: Removed 4 rows containing missing values or values outside the scale range
## (`geom_segment()`).
Doesn’t seem like threat varies…
negative_deviance <- data %>%
filter(outlier == "man_late" | outlier == "woman_late")
t.test(WSS_status ~ outlier, data = negative_deviance, var.equal = F)
##
## Welch Two Sample t-test
##
## data: WSS_status by outlier
## t = 1.3155, df = 95.859, p-value = 0.1915
## alternative hypothesis: true difference in means between group man_late and group woman_late is not equal to 0
## 95 percent confidence interval:
## -0.1109048 0.5467381
## sample estimates:
## mean in group man_late mean in group woman_late
## 2.270000 2.052083
Interpretation: No difference in workplace status attributions for negative deviants across genders
positive_deviance <- data %>%
filter(outlier == "man_early" | outlier == "woman_early")
t.test(WSS_status ~ outlier, data = positive_deviance, var.equal = F)
##
## Welch Two Sample t-test
##
## data: WSS_status by outlier
## t = -0.16568, df = 77.892, p-value = 0.8688
## alternative hypothesis: true difference in means between group man_early and group woman_early is not equal to 0
## 95 percent confidence interval:
## -0.4823362 0.4082255
## sample estimates:
## mean in group man_early mean in group woman_early
## 3.565217 3.602273
Interpretation: No difference in workplace status attributions for negative deviants across genders
t.test(anderson_status ~ outlier, data = negative_deviance, var.equal = F)
##
## Welch Two Sample t-test
##
## data: anderson_status by outlier
## t = 0.63939, df = 92.806, p-value = 0.5241
## alternative hypothesis: true difference in means between group man_late and group woman_late is not equal to 0
## 95 percent confidence interval:
## -0.2360318 0.4601984
## sample estimates:
## mean in group man_late mean in group woman_late
## 2.310000 2.197917
Interpretation: No difference in status attributions for negative deviants across genders
t.test(anderson_status ~ outlier, data = positive_deviance, var.equal = F)
##
## Welch Two Sample t-test
##
## data: anderson_status by outlier
## t = -0.297, df = 80.875, p-value = 0.7672
## alternative hypothesis: true difference in means between group man_early and group woman_early is not equal to 0
## 95 percent confidence interval:
## -0.4374655 0.3238292
## sample estimates:
## mean in group man_early mean in group woman_early
## 3.500000 3.556818
Interpretation: No difference in status attributions for negative deviants across genders
# Fit model
model <- data %>%
mutate(Condition = relevel(as.factor(outlier), ref = "man_early")) %>%
lm(anderson_status ~ Condition, .)
# Display model summary
summary(model)
##
## Call:
## lm(formula = anderson_status ~ Condition, data = .)
##
## Residuals:
## Min 1Q Median 3Q Max
## -2.55682 -0.50000 -0.05682 0.50000 2.30208
##
## Coefficients:
## Estimate Std. Error t value Pr(>|t|)
## (Intercept) 3.50000 0.13017 26.887 < 2e-16 ***
## Conditionman_late -1.19000 0.18037 -6.597 4.32e-10 ***
## Conditionwoman_early 0.05682 0.18617 0.305 0.761
## Conditionwoman_late -1.30208 0.18216 -7.148 2.00e-11 ***
## ---
## Signif. codes: 0 '***' 0.001 '**' 0.01 '*' 0.05 '.' 0.1 ' ' 1
##
## Residual standard error: 0.8829 on 184 degrees of freedom
## Multiple R-squared: 0.3475, Adjusted R-squared: 0.3368
## F-statistic: 32.66 on 3 and 184 DF, p-value: < 2.2e-16
library(emmeans)
## Welcome to emmeans.
## Caution: You lose important information if you filter this package's results.
## See '? untidy'
# Perform pairwise comparisons with emmeans
emmeans_results <- emmeans(model, pairwise ~ Condition)
# Display the pairwise comparisons
print(emmeans_results$contrasts)
## contrast estimate SE df t.ratio p.value
## man_early - man_late 1.1900 0.180 184 6.597 <.0001
## man_early - woman_early -0.0568 0.186 184 -0.305 0.9901
## man_early - woman_late 1.3021 0.182 184 7.148 <.0001
## man_late - woman_early -1.2468 0.182 184 -6.832 <.0001
## man_late - woman_late 0.1121 0.178 184 0.628 0.9229
## woman_early - woman_late 1.3589 0.184 184 7.375 <.0001
##
## P value adjustment: tukey method for comparing a family of 4 estimates
leadership <- data %>%
filter(grepl("manager| leader| boss | supervisor" , role))
table(leadership$outlier)
##
## man_early man_late woman_early woman_late
## 15 8 18 8
# I think our next step should be focusing on power not status. Maybe looking at attributions of just hierarchal rank with a more detailed vignette about what the violator does?