Load packages and data

library(qualtRics)
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.4     ✔ tidyr     1.3.1
## ✔ purrr     1.0.4     
## ── 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
library(psych)      # for reliability
## 
## Attaching package: 'psych'
## 
## The following objects are masked from 'package:ggplot2':
## 
##     %+%, alpha
library(broom)      # for tidy model outputs

df <- read_survey("~/Google drive/My Drive/YEAR 3/PROJECTS/DANIEL/Belonging/belonging_pilot2.csv")
## 
## ── Column specification ────────────────────────────────────────────────────────
## cols(
##   .default = col_double(),
##   StartDate = col_character(),
##   EndDate = col_character(),
##   IPAddress = col_character(),
##   RecordedDate = col_character(),
##   ResponseId = col_character(),
##   RecipientLastName = col_logical(),
##   RecipientFirstName = col_logical(),
##   RecipientEmail = col_logical(),
##   ExternalReference = col_logical(),
##   DistributionChannel = col_character(),
##   UserLanguage = col_character(),
##   open_1 = col_character(),
##   open_2 = col_character(),
##   open_3 = col_character(),
##   industry = col_character(),
##   attn = col_character(),
##   attn_bots = col_character(),
##   gender_4_TEXT = col_logical(),
##   race = col_number(),
##   race_8_TEXT = col_logical()
##   # ... with 17 more columns
## )
## ℹ Use `spec()` for the full column specifications.
df_clean <- df %>%
  filter(attn == 24)

Demographic overview

Sample

table(df_clean$gender)
## 
##  1  2 
## 64 35
table(df_clean$race)
## 
##   1   2   3   4   5   8   9  14  15  17  23 156 
##  63  12   5   1   6   1   2   1   4   2   1   1
table(df_clean$ses)
## 
##  1  2  3  4  5  6 
##  2 10 47 13 25  2
table(df_clean$income_now)
## 
##  1  2  3  4  5  6  7 
##  1  8 16 30 16 21  7
table(df_clean$employment)
## 
##  1  2 
## 98  1
mean(df_clean$age, na.rm = T)
## [1] 40.09091

Team info

table(df_clean$team_info)
## 
##  1  2 
## 94  5

1 = current team 2 = past team

Current

mean(df_clean$team_size_current, na.rm = T)
## [1] 9.606383

Former

mean(df_clean$team_size_former, na.rm = T)
## [1] 7.8

Clean data

Reverse coding

df_clean <- df_clean %>%
  mutate(across(ends_with("R"),
                ~ 8 - .))   # overwrite directly (simpler)

Create composites

df_scales <- df_clean %>%
  mutate(
    interactional_justice = rowMeans(select(., starts_with("colquitt_")), na.rm = TRUE),
    personal_treatment = rowMeans(select(., starts_with("treat_")), na.rm = TRUE),
    idea_inclusion = rowMeans(select(., starts_with("idea_")), na.rm = TRUE),
    belonging = rowMeans(select(., starts_with("belong_")), na.rm = TRUE),
    intellectual_humility = rowMeans(select(., starts_with("hum_")), na.rm = TRUE),
    needtobelong = rowMeans(select(., starts_with("ntb_")), na.rm = TRUE),
    needforaffiliation = rowMeans(select(., starts_with("IOS_")), na.rm = TRUE)
  )

Check reliability

psych::alpha(df_scales %>% select(starts_with("colquitt_")))
## 
## Reliability analysis   
## Call: psych::alpha(x = df_scales %>% select(starts_with("colquitt_")))
## 
##   raw_alpha std.alpha G6(smc) average_r S/N   ase mean   sd median_r
##       0.86      0.87    0.86      0.63 6.8 0.023  5.8 0.97     0.63
## 
##     95% confidence boundaries 
##          lower alpha upper
## Feldt     0.81  0.86   0.9
## Duhachek  0.81  0.86   0.9
## 
##  Reliability if an item is dropped:
##            raw_alpha std.alpha G6(smc) average_r S/N alpha se var.r med.r
## colquitt_1      0.85      0.86    0.85      0.68 6.3    0.028 0.029  0.61
## colquitt_2      0.78      0.79    0.74      0.56 3.9    0.037 0.014  0.61
## colquitt_3      0.76      0.79    0.73      0.55 3.7    0.040 0.015  0.55
## colquitt_4      0.89      0.89    0.87      0.73 8.1    0.018 0.015  0.67
## 
##  Item statistics 
##             n raw.r std.r r.cor r.drop mean  sd
## colquitt_1 99  0.77  0.81  0.70   0.65  6.1 0.9
## colquitt_2 99  0.90  0.91  0.91   0.81  5.9 1.1
## colquitt_3 99  0.92  0.92  0.92   0.85  5.9 1.1
## colquitt_4 99  0.80  0.76  0.62   0.59  5.6 1.4
## 
## Non missing response frequency for each item
##               1    2    3    4    5    6    7 miss
## colquitt_1 0.01 0.00 0.00 0.02 0.16 0.51 0.30    0
## colquitt_2 0.01 0.02 0.00 0.07 0.15 0.44 0.30    0
## colquitt_3 0.01 0.01 0.03 0.03 0.17 0.46 0.28    0
## colquitt_4 0.02 0.04 0.04 0.04 0.23 0.37 0.25    0
psych::alpha(df_scales %>% select(starts_with("treat_")))
## 
## Reliability analysis   
## Call: psych::alpha(x = df_scales %>% select(starts_with("treat_")))
## 
##   raw_alpha std.alpha G6(smc) average_r S/N   ase mean   sd median_r
##       0.89       0.9    0.92      0.56 8.9 0.017  5.6 0.98     0.54
## 
##     95% confidence boundaries 
##          lower alpha upper
## Feldt     0.85  0.89  0.92
## Duhachek  0.85  0.89  0.92
## 
##  Reliability if an item is dropped:
##         raw_alpha std.alpha G6(smc) average_r S/N alpha se  var.r med.r
## treat_1      0.88      0.90    0.91      0.59 8.7    0.017 0.0083  0.57
## treat_2      0.86      0.88    0.89      0.55 7.3    0.020 0.0120  0.54
## treat_3      0.86      0.88    0.89      0.55 7.2    0.022 0.0149  0.53
## treat_4      0.86      0.88    0.89      0.55 7.3    0.020 0.0125  0.54
## treat_5      0.87      0.88    0.90      0.55 7.5    0.019 0.0111  0.53
## treat_6      0.87      0.88    0.90      0.56 7.7    0.019 0.0157  0.54
## treat_7      0.87      0.89    0.91      0.56 7.7    0.019 0.0128  0.57
## 
##  Item statistics 
##          n raw.r std.r r.cor r.drop mean   sd
## treat_1 99  0.75  0.70  0.65   0.62  5.1 1.63
## treat_2 99  0.81  0.81  0.80   0.73  5.6 1.31
## treat_3 99  0.86  0.83  0.80   0.77  5.2 1.60
## treat_4 99  0.82  0.81  0.79   0.74  5.6 1.24
## treat_5 99  0.75  0.80  0.78   0.69  6.1 0.81
## treat_6 99  0.76  0.78  0.75   0.68  6.1 1.04
## treat_7 99  0.74  0.78  0.74   0.66  5.8 1.05
## 
## Non missing response frequency for each item
##            1    2    3    4    5    6    7 miss
## treat_1 0.04 0.07 0.03 0.17 0.22 0.26 0.20    0
## treat_2 0.01 0.05 0.01 0.03 0.29 0.34 0.26    0
## treat_3 0.04 0.05 0.06 0.13 0.16 0.37 0.18    0
## treat_4 0.01 0.03 0.02 0.07 0.22 0.41 0.23    0
## treat_5 0.00 0.00 0.00 0.06 0.10 0.53 0.31    0
## treat_6 0.01 0.01 0.00 0.04 0.13 0.44 0.36    0
## treat_7 0.00 0.02 0.02 0.05 0.16 0.49 0.25    0
psych::alpha(df_scales %>% select(starts_with("idea_")))
## Number of categories should be increased  in order to count frequencies.
## Warning in cor.smooth(r): Matrix was not positive definite, smoothing was done
## In smc, smcs < 0 were set to .0
## In smc, smcs < 0 were set to .0
## 
## Reliability analysis   
## Call: psych::alpha(x = df_scales %>% select(starts_with("idea_")))
## 
##   raw_alpha std.alpha G6(smc) average_r S/N   ase mean sd median_r
##       0.93      0.94    0.93      0.64  16 0.011  5.6  1     0.68
## 
##     95% confidence boundaries 
##          lower alpha upper
## Feldt     0.91  0.93  0.95
## Duhachek  0.91  0.93  0.95
## 
##  Reliability if an item is dropped:
##                raw_alpha std.alpha G6(smc) average_r S/N alpha se var.r med.r
## idea_1              0.91      0.93    0.98      0.62  13   0.0137 0.033  0.66
## idea_2              0.92      0.94    0.97      0.65  15   0.0126 0.037  0.69
## idea_3              0.92      0.93    0.98      0.63  13   0.0133 0.037  0.67
## idea_4              0.92      0.93    0.98      0.63  14   0.0131 0.038  0.67
## idea_5              0.92      0.93    0.98      0.63  14   0.0131 0.035  0.67
## idea_6              0.92      0.93    0.98      0.63  14   0.0133 0.035  0.67
## idea_7              0.93      0.94    0.98      0.66  15   0.0122 0.037  0.70
## idea_8R             0.95      0.95    0.96      0.72  21   0.0074 0.010  0.71
## idea_inclusion      0.91      0.92    0.93      0.59  12   0.0143 0.030  0.66
## 
##  Item statistics 
##                 n raw.r std.r r.cor r.drop mean  sd
## idea_1         99  0.89  0.90  0.91   0.86  5.6 1.2
## idea_2         99  0.80  0.80  0.77   0.74  5.6 1.3
## idea_3         99  0.86  0.87  0.87   0.82  5.7 1.2
## idea_4         99  0.84  0.85  0.84   0.80  5.6 1.1
## idea_5         99  0.85  0.86  0.86   0.81  5.6 1.2
## idea_6         99  0.86  0.86  0.86   0.81  5.6 1.3
## idea_7         99  0.75  0.76  0.73   0.69  5.5 1.1
## idea_8R        99  0.55  0.52  0.42   0.40  5.3 1.7
## idea_inclusion 99  1.00  1.00  0.90   1.00  5.6 1.0
psych::alpha(df_scales %>% select(starts_with("belong_")))
## 
## Reliability analysis   
## Call: psych::alpha(x = df_scales %>% select(starts_with("belong_")))
## 
##   raw_alpha std.alpha G6(smc) average_r S/N    ase mean  sd median_r
##       0.97      0.97    0.97      0.81  35 0.0043  5.5 1.3     0.81
## 
##     95% confidence boundaries 
##          lower alpha upper
## Feldt     0.96  0.97  0.98
## Duhachek  0.96  0.97  0.98
## 
##  Reliability if an item is dropped:
##           raw_alpha std.alpha G6(smc) average_r S/N alpha se  var.r med.r
## belong_1       0.97      0.97    0.97      0.81  29   0.0052 0.0036  0.79
## belong_2R      0.97      0.97    0.97      0.83  34   0.0045 0.0033  0.84
## belong_3       0.97      0.97    0.97      0.81  31   0.0049 0.0040  0.83
## belong_4R      0.97      0.97    0.97      0.83  35   0.0044 0.0031  0.84
## belong_5       0.97      0.97    0.97      0.80  28   0.0053 0.0033  0.79
## belong_6R      0.97      0.97    0.97      0.81  29   0.0052 0.0038  0.79
## belong_7       0.97      0.97    0.97      0.81  29   0.0052 0.0030  0.79
## belong_8R      0.97      0.97    0.97      0.81  29   0.0053 0.0039  0.78
## 
##  Item statistics 
##            n raw.r std.r r.cor r.drop mean  sd
## belong_1  99  0.93  0.94  0.93   0.91  5.4 1.5
## belong_2R 99  0.87  0.87  0.84   0.83  5.6 1.5
## belong_3  99  0.90  0.91  0.89   0.88  5.7 1.3
## belong_4R 99  0.86  0.86  0.83   0.82  5.7 1.4
## belong_5  99  0.94  0.95  0.94   0.93  5.5 1.4
## belong_6R 99  0.93  0.93  0.93   0.91  5.4 1.5
## belong_7  99  0.93  0.93  0.93   0.91  5.4 1.4
## belong_8R 99  0.94  0.93  0.93   0.92  5.4 1.6
## 
## Non missing response frequency for each item
##              1    2    3    4    5    6    7 miss
## belong_1  0.03 0.04 0.04 0.07 0.23 0.35 0.23    0
## belong_2R 0.03 0.02 0.09 0.03 0.12 0.43 0.27    0
## belong_3  0.02 0.02 0.03 0.05 0.20 0.43 0.24    0
## belong_4R 0.03 0.01 0.07 0.04 0.15 0.39 0.30    0
## belong_5  0.02 0.03 0.06 0.03 0.29 0.33 0.23    0
## belong_6R 0.03 0.02 0.10 0.06 0.19 0.34 0.25    0
## belong_7  0.02 0.04 0.06 0.05 0.22 0.39 0.21    0
## belong_8R 0.03 0.05 0.07 0.06 0.12 0.41 0.25    0
psych::alpha(df_scales %>% select(starts_with("hum_")))
## 
## Reliability analysis   
## Call: psych::alpha(x = df_scales %>% select(starts_with("hum_")))
## 
##   raw_alpha std.alpha G6(smc) average_r S/N   ase mean   sd median_r
##       0.83      0.84    0.85      0.47 5.3 0.026  5.8 0.72     0.47
## 
##     95% confidence boundaries 
##          lower alpha upper
## Feldt     0.77  0.83  0.88
## Duhachek  0.78  0.83  0.88
## 
##  Reliability if an item is dropped:
##       raw_alpha std.alpha G6(smc) average_r S/N alpha se  var.r med.r
## hum_1      0.80      0.81    0.80      0.46 4.3    0.033 0.0219  0.51
## hum_2      0.81      0.81    0.79      0.46 4.3    0.030 0.0128  0.46
## hum_3      0.81      0.82    0.81      0.47 4.4    0.030 0.0180  0.46
## hum_4      0.78      0.80    0.79      0.45 4.0    0.034 0.0200  0.43
## hum_5      0.79      0.80    0.80      0.45 4.0    0.033 0.0222  0.43
## hum_6      0.84      0.85    0.84      0.54 5.8    0.025 0.0095  0.53
## 
##  Item statistics 
##        n raw.r std.r r.cor r.drop mean   sd
## hum_1 99  0.79  0.76  0.71   0.65  5.6 1.17
## hum_2 99  0.73  0.77  0.73   0.63  6.1 0.77
## hum_3 99  0.71  0.75  0.69   0.60  6.1 0.77
## hum_4 99  0.81  0.80  0.76   0.70  5.7 1.03
## hum_5 99  0.79  0.80  0.75   0.68  6.0 0.97
## hum_6 99  0.64  0.60  0.48   0.45  5.5 1.12
## 
## Non missing response frequency for each item
##          2    3    4    5    6    7 miss
## hum_1 0.03 0.03 0.07 0.24 0.41 0.21    0
## hum_2 0.00 0.00 0.02 0.19 0.47 0.31    0
## hum_3 0.00 0.00 0.02 0.18 0.45 0.34    0
## hum_4 0.02 0.00 0.08 0.25 0.42 0.22    0
## hum_5 0.02 0.01 0.01 0.17 0.48 0.30    0
## hum_6 0.03 0.01 0.13 0.24 0.43 0.15    0
psych::alpha(df_scales %>% select(starts_with("ntb_")))
## 
## Reliability analysis   
## Call: psych::alpha(x = df_scales %>% select(starts_with("ntb_")))
## 
##   raw_alpha std.alpha G6(smc) average_r S/N   ase mean  sd median_r
##       0.85      0.86    0.88      0.37 5.9 0.022    4 1.1     0.35
## 
##     95% confidence boundaries 
##          lower alpha upper
## Feldt     0.81  0.85  0.89
## Duhachek  0.81  0.85  0.90
## 
##  Reliability if an item is dropped:
##        raw_alpha std.alpha G6(smc) average_r S/N alpha se var.r med.r
## ntb_1R      0.84      0.84    0.86      0.37 5.2    0.024 0.019  0.34
## ntb_2       0.84      0.84    0.87      0.38 5.4    0.024 0.024  0.34
## ntb_3R      0.85      0.85    0.87      0.39 5.8    0.022 0.019  0.38
## ntb_4       0.85      0.85    0.86      0.38 5.5    0.023 0.020  0.38
## ntb_5       0.85      0.85    0.87      0.39 5.7    0.023 0.021  0.36
## ntb_6       0.84      0.84    0.86      0.38 5.4    0.024 0.022  0.38
## ntb_7R      0.85      0.85    0.87      0.39 5.9    0.022 0.021  0.39
## ntb_8       0.83      0.83    0.85      0.35 4.8    0.026 0.019  0.33
## ntb_9       0.82      0.83    0.85      0.34 4.7    0.027 0.017  0.32
## ntb_10      0.83      0.83    0.85      0.36 5.0    0.025 0.018  0.34
## 
##  Item statistics 
##         n raw.r std.r r.cor r.drop mean  sd
## ntb_1R 99  0.69  0.69  0.66   0.60  3.5 1.6
## ntb_2  99  0.64  0.64  0.58   0.54  4.6 1.7
## ntb_3R 99  0.57  0.56  0.49   0.45  3.8 1.7
## ntb_4  99  0.61  0.61  0.57   0.50  5.2 1.6
## ntb_5  99  0.55  0.58  0.52   0.46  5.2 1.2
## ntb_6  99  0.65  0.64  0.59   0.54  3.3 1.7
## ntb_7R 99  0.55  0.54  0.46   0.42  3.6 1.8
## ntb_8  99  0.78  0.78  0.77   0.71  3.6 1.6
## ntb_9  99  0.81  0.81  0.81   0.75  3.7 1.7
## ntb_10 99  0.73  0.74  0.72   0.65  3.5 1.7
## 
## Non missing response frequency for each item
##           1    2    3    4    5    6    7 miss
## ntb_1R 0.09 0.20 0.29 0.15 0.14 0.08 0.04    0
## ntb_2  0.06 0.07 0.11 0.19 0.20 0.25 0.11    0
## ntb_3R 0.07 0.19 0.21 0.17 0.16 0.12 0.07    0
## ntb_4  0.05 0.04 0.07 0.11 0.15 0.38 0.19    0
## ntb_5  0.02 0.01 0.05 0.14 0.29 0.37 0.11    0
## ntb_6  0.13 0.27 0.19 0.13 0.12 0.10 0.05    0
## ntb_7R 0.14 0.20 0.16 0.12 0.15 0.20 0.02    0
## ntb_8  0.09 0.17 0.24 0.19 0.16 0.08 0.06    0
## ntb_9  0.08 0.22 0.19 0.19 0.14 0.11 0.06    0
## ntb_10 0.12 0.17 0.25 0.15 0.19 0.04 0.07    0
psych::alpha(df_scales %>% select(starts_with("IOS_")))
## 
## Reliability analysis   
## Call: psych::alpha(x = df_scales %>% select(starts_with("IOS_")))
## 
##   raw_alpha std.alpha G6(smc) average_r S/N   ase mean  sd median_r
##       0.84      0.84    0.88      0.39 5.1 0.025  4.2 1.2     0.38
## 
##     95% confidence boundaries 
##          lower alpha upper
## Feldt     0.78  0.84  0.88
## Duhachek  0.79  0.84  0.89
## 
##  Reliability if an item is dropped:
##               raw_alpha std.alpha G6(smc) average_r S/N alpha se var.r med.r
## IOS_emo_1          0.82      0.82    0.86      0.39 4.4    0.029 0.036  0.38
## IOS_emo_2          0.80      0.80    0.84      0.36 4.0    0.031 0.036  0.33
## IOS_attn_1         0.80      0.80    0.85      0.36 3.9    0.032 0.036  0.37
## IOS_attn_2         0.82      0.82    0.87      0.39 4.5    0.028 0.037  0.38
## IOS_pos_1          0.83      0.83    0.85      0.41 5.0    0.026 0.024  0.41
## IOS_pos_2          0.83      0.82    0.85      0.40 4.7    0.027 0.032  0.38
## IOS_compare_1      0.82      0.82    0.87      0.39 4.6    0.028 0.036  0.38
## IOS_compare_2      0.83      0.83    0.86      0.40 4.7    0.027 0.027  0.38
## 
##  Item statistics 
##                n raw.r std.r r.cor r.drop mean  sd
## IOS_emo_1     99  0.71  0.69  0.65   0.58  4.1 1.9
## IOS_emo_2     99  0.79  0.78  0.76   0.70  3.8 1.8
## IOS_attn_1    99  0.80  0.80  0.78   0.72  3.8 1.8
## IOS_attn_2    99  0.67  0.67  0.62   0.55  4.4 1.6
## IOS_pos_1     99  0.57  0.58  0.55   0.44  4.9 1.6
## IOS_pos_2     99  0.63  0.64  0.61   0.51  4.6 1.6
## IOS_compare_1 99  0.66  0.66  0.60   0.54  3.8 1.7
## IOS_compare_2 99  0.63  0.63  0.58   0.50  4.1 1.7
## 
## Non missing response frequency for each item
##                  1    2    3    4    5    6    7 miss
## IOS_emo_1     0.12 0.15 0.10 0.17 0.20 0.12 0.13    0
## IOS_emo_2     0.15 0.14 0.14 0.17 0.19 0.14 0.06    0
## IOS_attn_1    0.12 0.20 0.09 0.15 0.24 0.15 0.04    0
## IOS_attn_2    0.07 0.10 0.06 0.22 0.23 0.25 0.06    0
## IOS_pos_1     0.05 0.07 0.07 0.12 0.27 0.28 0.13    0
## IOS_pos_2     0.07 0.07 0.09 0.16 0.29 0.23 0.08    0
## IOS_compare_1 0.13 0.17 0.10 0.19 0.25 0.11 0.04    0
## IOS_compare_2 0.09 0.12 0.18 0.13 0.26 0.13 0.08    0

All alphas are above 0.80. Looks good to me!

Summary stats

df_scales %>%
  summarise(
    across(c(interactional_justice,
             personal_treatment,
             idea_inclusion,
             belonging,
             intellectual_humility,
             needtobelong,
             needforaffiliation),
           list(mean = ~mean(.x, na.rm = TRUE),
                sd   = ~sd(.x, na.rm = TRUE)))
  )
## # A tibble: 1 × 14
##   interactional_justice_mean interactional_justice_sd personal_treatment_mean
##                        <dbl>                    <dbl>                   <dbl>
## 1                       5.84                    0.970                    5.64
## # ℹ 11 more variables: personal_treatment_sd <dbl>, idea_inclusion_mean <dbl>,
## #   idea_inclusion_sd <dbl>, belonging_mean <dbl>, belonging_sd <dbl>,
## #   intellectual_humility_mean <dbl>, intellectual_humility_sd <dbl>,
## #   needtobelong_mean <dbl>, needtobelong_sd <dbl>,
## #   needforaffiliation_mean <dbl>, needforaffiliation_sd <dbl>

Correl matrix

df_scales %>%
  select(interactional_justice,
         personal_treatment,
         idea_inclusion,
         belonging,
         intellectual_humility,
         needtobelong,
         needforaffiliation
         ) %>%
  cor(use = "pairwise.complete.obs")
##                       interactional_justice personal_treatment idea_inclusion
## interactional_justice            1.00000000         0.69440223     0.72573686
## personal_treatment               0.69440223         1.00000000     0.80359876
## idea_inclusion                   0.72573686         0.80359876     1.00000000
## belonging                        0.62771833         0.82079792     0.69866017
## intellectual_humility            0.05601992         0.20639112     0.14192196
## needtobelong                     0.07353745         0.01681903     0.02358824
## needforaffiliation               0.25004916         0.30477319     0.26119501
##                         belonging intellectual_humility needtobelong
## interactional_justice  0.62771833            0.05601992   0.07353745
## personal_treatment     0.82079792            0.20639112   0.01681903
## idea_inclusion         0.69866017            0.14192196   0.02358824
## belonging              1.00000000            0.10849534  -0.02775247
## intellectual_humility  0.10849534            1.00000000  -0.04171387
## needtobelong          -0.02775247           -0.04171387   1.00000000
## needforaffiliation     0.28073499           -0.07640614   0.51223861
##                       needforaffiliation
## interactional_justice         0.25004916
## personal_treatment            0.30477319
## idea_inclusion                0.26119501
## belonging                     0.28073499
## intellectual_humility        -0.07640614
## needtobelong                  0.51223861
## needforaffiliation            1.00000000

Testing our model

Path 1: Personal treatment → Belonging

model1 <- lm(belonging ~ interactional_justice + personal_treatment,
             data = df_scales)

summary(model1)
## 
## Call:
## lm(formula = belonging ~ interactional_justice + personal_treatment, 
##     data = df_scales)
## 
## Residuals:
##     Min      1Q  Median      3Q     Max 
## -3.2370 -0.1752  0.0997  0.4509  1.8965 
## 
## Coefficients:
##                       Estimate Std. Error t value Pr(>|t|)    
## (Intercept)            -1.0827     0.4985  -2.172   0.0323 *  
## interactional_justice   0.1532     0.1102   1.390   0.1676    
## personal_treatment      1.0107     0.1091   9.267 5.59e-15 ***
## ---
## Signif. codes:  0 '***' 0.001 '**' 0.01 '*' 0.05 '.' 0.1 ' ' 1
## 
## Residual standard error: 0.7616 on 96 degrees of freedom
## Multiple R-squared:  0.6802, Adjusted R-squared:  0.6735 
## F-statistic: 102.1 on 2 and 96 DF,  p-value: < 2.2e-16
library(ggplot2)

ggplot(df_scales, aes(x = personal_treatment, y = belonging)) +
  geom_point(alpha = .6) +
  geom_smooth(method = "lm", se = TRUE) +
  labs(
    x = "Personal Treatment",
    y = "Belonging",
    title = "Path 1: Personal Treatment → Belonging"
  ) +
  theme_minimal()
## `geom_smooth()` using formula = 'y ~ x'

ggplot(df_scales, aes(x = interactional_justice, y = belonging)) +
  geom_point(alpha = .6) +
  geom_smooth(method = "lm", se = TRUE) +
  labs(
    x = "Interactional Justice",
    y = "Belonging",
    title = "Interactional Justice → Belonging"
  ) +
  theme_minimal()
## `geom_smooth()` using formula = 'y ~ x'

Path 2: Felt idea inclusion → Belonging

model2 <- lm(belonging ~ idea_inclusion,
             data = df_scales)

summary(model2)
## 
## Call:
## lm(formula = belonging ~ idea_inclusion, data = df_scales)
## 
## Residuals:
##     Min      1Q  Median      3Q     Max 
## -3.7567 -0.3120  0.0814  0.4841  4.0366 
## 
## Coefficients:
##                Estimate Std. Error t value Pr(>|t|)    
## (Intercept)     0.36088    0.54438   0.663    0.509    
## idea_inclusion  0.92628    0.09631   9.618 8.98e-16 ***
## ---
## Signif. codes:  0 '***' 0.001 '**' 0.01 '*' 0.05 '.' 0.1 ' ' 1
## 
## Residual standard error: 0.9585 on 97 degrees of freedom
## Multiple R-squared:  0.4881, Adjusted R-squared:  0.4828 
## F-statistic:  92.5 on 1 and 97 DF,  p-value: 8.976e-16
ggplot(df_scales, aes(x = idea_inclusion, y = belonging)) +
  geom_point(alpha = .6) +
  geom_smooth(method = "lm", se = TRUE) +
  labs(
    x = "Felt Idea Inclusion",
    y = "Belonging",
    title = "Path 2: Idea Inclusion → Belonging"
  ) +
  theme_minimal()
## `geom_smooth()` using formula = 'y ~ x'

What about both personal treatment and idea inclusion in the same model?

model_full <- lm(belonging ~ interactional_justice +
                               personal_treatment +
                               idea_inclusion,
                 data = df_scales)

summary(model_full)
## 
## Call:
## lm(formula = belonging ~ interactional_justice + personal_treatment + 
##     idea_inclusion, data = df_scales)
## 
## Residuals:
##     Min      1Q  Median      3Q     Max 
## -3.3049 -0.2150  0.0956  0.4301  2.0821 
## 
## Coefficients:
##                       Estimate Std. Error t value Pr(>|t|)    
## (Intercept)           -1.10577    0.50136  -2.206   0.0298 *  
## interactional_justice  0.12299    0.12010   1.024   0.3084    
## personal_treatment     0.95724    0.13743   6.965 4.25e-10 ***
## idea_inclusion         0.09001    0.14017   0.642   0.5223    
## ---
## Signif. codes:  0 '***' 0.001 '**' 0.01 '*' 0.05 '.' 0.1 ' ' 1
## 
## Residual standard error: 0.7639 on 95 degrees of freedom
## Multiple R-squared:  0.6815, Adjusted R-squared:  0.6715 
## F-statistic: 67.77 on 3 and 95 DF,  p-value: < 2.2e-16

Personal treatment is a stronger predictor of belonging. In our first pilot, both came out as significant…

Moderation analyses

Intellectual humility

model3 <- lm(belonging ~ idea_inclusion * intellectual_humility,
             data = df_scales)

summary(model3)
## 
## Call:
## lm(formula = belonging ~ idea_inclusion * intellectual_humility, 
##     data = df_scales)
## 
## Residuals:
##     Min      1Q  Median      3Q     Max 
## -3.6951 -0.3601  0.0997  0.5663  3.1666 
## 
## Coefficients:
##                                      Estimate Std. Error t value Pr(>|t|)   
## (Intercept)                           -8.5720     4.5305  -1.892  0.06153 . 
## idea_inclusion                         2.5251     0.8101   3.117  0.00242 **
## intellectual_humility                  1.4670     0.7406   1.981  0.05050 . 
## idea_inclusion:intellectual_humility  -0.2617     0.1315  -1.990  0.04948 * 
## ---
## Signif. codes:  0 '***' 0.001 '**' 0.01 '*' 0.05 '.' 0.1 ' ' 1
## 
## Residual standard error: 0.9489 on 95 degrees of freedom
## Multiple R-squared:  0.5087, Adjusted R-squared:  0.4932 
## F-statistic: 32.79 on 3 and 95 DF,  p-value: 1.233e-14
library(interactions)

model3 <- lm(belonging ~ idea_inclusion * intellectual_humility, data = df_scales)
interact_plot(model3,
              pred = idea_inclusion,
              modx = intellectual_humility,
              modx.values = c(-1, 1),  # ±1 SD
              plot.points = TRUE)

Need to belong

model4 <- lm(belonging ~ idea_inclusion * needtobelong,
             data = df_scales)

summary(model4)
## 
## Call:
## lm(formula = belonging ~ idea_inclusion * needtobelong, data = df_scales)
## 
## Residuals:
##     Min      1Q  Median      3Q     Max 
## -3.7370 -0.3586  0.0981  0.4766  4.0250 
## 
## Coefficients:
##                             Estimate Std. Error t value Pr(>|t|)
## (Intercept)                  2.84719    1.87383   1.519    0.132
## idea_inclusion               0.52230    0.32787   1.593    0.114
## needtobelong                -0.63347    0.45650  -1.388    0.168
## idea_inclusion:needtobelong  0.10304    0.07967   1.293    0.199
## 
## Residual standard error: 0.9583 on 95 degrees of freedom
## Multiple R-squared:  0.4989, Adjusted R-squared:  0.4831 
## F-statistic: 31.53 on 3 and 95 DF,  p-value: 3.117e-14
library(interactions)

model4 <- lm(belonging ~ idea_inclusion * needtobelong, data = df_scales)
interact_plot(model4,
              pred = idea_inclusion,
              modx = needtobelong,
              modx.values = c(-1, 1),  # ±1 SD
              plot.points = TRUE)

Need for affiliation

model5 <- lm(belonging ~ idea_inclusion * needforaffiliation,
             data = df_scales)

summary(model5)
## 
## Call:
## lm(formula = belonging ~ idea_inclusion * needforaffiliation, 
##     data = df_scales)
## 
## Residuals:
##     Min      1Q  Median      3Q     Max 
## -3.5394 -0.3790  0.0977  0.4979  3.8451 
## 
## Coefficients:
##                                   Estimate Std. Error t value Pr(>|t|)  
## (Intercept)                        1.56795    1.42670   1.099   0.2745  
## idea_inclusion                     0.62449    0.25174   2.481   0.0149 *
## needforaffiliation                -0.31768    0.38900  -0.817   0.4162  
## idea_inclusion:needforaffiliation  0.07643    0.06667   1.146   0.2545  
## ---
## Signif. codes:  0 '***' 0.001 '**' 0.01 '*' 0.05 '.' 0.1 ' ' 1
## 
## Residual standard error: 0.9521 on 95 degrees of freedom
## Multiple R-squared:  0.5053, Adjusted R-squared:  0.4897 
## F-statistic: 32.35 on 3 and 95 DF,  p-value: 1.7e-14
library(interactions)

model5 <- lm(belonging ~ idea_inclusion * needforaffiliation, data = df_scales)
interact_plot(model5,
              pred = idea_inclusion,
              modx = needforaffiliation,
              modx.values = c(-1, 1),  # ±1 SD
              plot.points = TRUE)