Overview
This report presents the findings from the Lone Wolf experimental
study examining how experimental condition affects feelings of
uncertainty, and whether this effect is moderated by individual
difference variables.
Research Question: Does the experimental
manipulation affect feelings of uncertainty, and is this effect
moderated by narcissism, uncertainty aversion, attachment style,
self-control, or self-esteem?
Data Preparation
library(tidyverse)
library(psych)
library(car)
library(effsize)
library(interactions)
library(reghelper)
library(effectsize)
library(emmeans)
library(knitr)
library(kableExtra)
# Load process if available
if(file.exists("process.R")) {
source("process.R")
}
##
## **************** PROCESS Procedure for R Version 5.0 ******************
##
## Written by Andrew F. Hayes, Ph.D. www.afhayes.com
## Documentation available in Hayes (2022). www.guilford.com/p/hayes3
##
## ***********************************************************************
##
## PROCESS is now ready for use.
## Copyright 2013-2025 by Andrew F. Hayes ALL RIGHTS RESERVED
## Workshop schedule at haskayne.ucalgary.ca/CCRAM
## Information about PROCESS available at processmacro.org/faq.html
# Load data
the.data <- read.csv("lonewolfog.csv")
# Display sample size
cat("Total sample size:", nrow(the.data), "\n")
## Total sample size: 278
Main Effect: Condition on Feelings of Uncertainty
Descriptive Statistics
# Convert FelUn items to numeric
the.data <- the.data %>%
mutate(across(FelUn1:FelUn19, as.numeric))
# Calculate FelUn total
the.data <- the.data %>%
mutate(FelUn_total = rowMeans(across(FelUn1:FelUn19), na.rm = TRUE))
# Descriptive statistics by condition
desc_stats <- the.data %>%
group_by(Condition) %>%
summarise(
N = n(),
Mean = mean(FelUn_total, na.rm = TRUE),
SD = sd(FelUn_total, na.rm = TRUE),
SE = SD / sqrt(N),
.groups = "drop"
)
kable(desc_stats, digits = 3, caption = "Feelings of Uncertainty by Condition") %>%
kable_styling(bootstrap_options = c("striped", "hover"))
Feelings of Uncertainty by Condition
|
Condition
|
N
|
Mean
|
SD
|
SE
|
|
|
23
|
NaN
|
NA
|
NA
|
|
0
|
127
|
3.056
|
0.663
|
0.059
|
|
1
|
126
|
2.712
|
0.659
|
0.059
|
|
Condition
|
1
|
NaN
|
NA
|
NA
|
|
{“ImportId”:“Condition”}
|
1
|
NaN
|
NA
|
NA
|
Distribution
ggplot(the.data, aes(x = FelUn_total)) +
geom_histogram(bins = 30, fill = "steelblue", color = "black", alpha = 0.7) +
facet_wrap(~Condition, labeller = labeller(Condition = c("0" = "Control", "1" = "Treatment"))) +
labs(title = "Distribution of Feelings of Uncertainty by Condition",
x = "Feelings of Uncertainty (Mean Score)",
y = "Count") +
theme_minimal()

T-Test Results
# T-test
ttest_result <- t.test(FelUn_total ~ Condition, data = the.data)
cohen_d_result <- cohen.d(FelUn_total ~ Condition, data = the.data)
# Display results
cat("Independent Samples t-test\n")
## Independent Samples t-test
cat("=====================================\n")
## =====================================
cat(sprintf("t(%.2f) = %.3f, p = %.4f\n",
ttest_result$parameter,
ttest_result$statistic,
ttest_result$p.value))
## t(249.99) = 4.129, p = 0.0000
cat(sprintf("Cohen's d = %.3f\n", cohen_d_result$estimate))
## Cohen's d = 0.520
cat(sprintf("95%% CI: [%.3f, %.3f]\n",
ttest_result$conf.int[1],
ttest_result$conf.int[2]))
## 95% CI: [0.180, 0.508]
Assumptions Checks
# Normality tests
shapiro_0 <- shapiro.test(the.data$FelUn_total[the.data$Condition == "0"])
shapiro_1 <- shapiro.test(the.data$FelUn_total[the.data$Condition == "1"])
cat("Shapiro-Wilk Normality Tests\n")
## Shapiro-Wilk Normality Tests
cat("=====================================\n")
## =====================================
cat(sprintf("Condition 0: W = %.4f, p = %.4f\n", shapiro_0$statistic, shapiro_0$p.value))
## Condition 0: W = 0.9770, p = 0.0300
cat(sprintf("Condition 1: W = %.4f, p = %.4f\n", shapiro_1$statistic, shapiro_1$p.value))
## Condition 1: W = 0.9805, p = 0.0666
# Q-Q plot
par(mfrow = c(1, 2))
qqnorm(the.data$FelUn_total[the.data$Condition == "0"], main = "Q-Q Plot: Condition 0")
qqline(the.data$FelUn_total[the.data$Condition == "0"])
qqnorm(the.data$FelUn_total[the.data$Condition == "1"], main = "Q-Q Plot: Condition 1")
qqline(the.data$FelUn_total[the.data$Condition == "1"])

par(mfrow = c(1, 1))
# Levene's test
levene_result <- leveneTest(FelUn_total ~ Condition, data = the.data)
cat("\nLevene's Test for Equality of Variances\n")
##
## Levene's Test for Equality of Variances
cat("=====================================\n")
## =====================================
print(levene_result)
## Levene's Test for Homogeneity of Variance (center = median)
## Df F value Pr(>F)
## group 1 0.0627 0.8025
## 250
Moderator 1: Narcissistic Personality Inventory (NPI)
Scale Reliability
# Define NPI items
authority_items <- paste0("NarcisAuthority", 1:8)
exhibitionism_items <- paste0("NarcisExhib", 1:7)
superiority_items <- c("NarcisSuper1", "NarcisSuper2", "NarcisSuper3",
"NarcisSuper4x", "NarcisSuper5")
entitlement_items <- paste0("NarcisEnti", 1:6)
exploitativeness_items <- c("NarcisExpl1", "NarcisExpl2", "NarcisExpl3",
"NarcisExpl4", "NarcisExpl6")
vanity_items <- paste0("NarcisVan", 1:3)
selfsuff_items <- paste0("NarcisSelfSuff", 1:6)
all_npi_items <- c(authority_items, exhibitionism_items, superiority_items,
entitlement_items, exploitativeness_items, vanity_items,
selfsuff_items)
# Convert to numeric and calculate scores
the.data <- the.data %>%
mutate(across(all_of(all_npi_items), as.numeric)) %>%
mutate(NPI_Total_mean = rowMeans(select(., all_of(all_npi_items)), na.rm = TRUE))
# Reliability
alpha_npi <- psych::alpha(the.data[, all_npi_items])
cat(sprintf("NPI Total Scale: Cronbach's α = %.3f\n", alpha_npi$total$raw_alpha))
## NPI Total Scale: Cronbach's α = 0.914
Distribution
ggplot(the.data, aes(x = NPI_Total_mean)) +
geom_histogram(bins = 30, fill = "coral", color = "black", alpha = 0.7) +
labs(title = "Distribution of Narcissistic Personality Inventory Scores",
x = "NPI Mean Score",
y = "Count") +
theme_minimal()

Moderation Analysis
# Mean-center narcissism
the.data <- the.data %>%
mutate(Condition = as.numeric(Condition),
NPI_centered = NPI_Total_mean - mean(NPI_Total_mean, na.rm = TRUE))
# Regression model
mod_npi <- lm(FelUn_total ~ Condition * NPI_centered, data = the.data)
summary(mod_npi)
##
## Call:
## lm(formula = FelUn_total ~ Condition * NPI_centered, data = the.data)
##
## Residuals:
## Min 1Q Median 3Q Max
## -2.06370 -0.40706 0.09275 0.51530 1.47225
##
## Coefficients:
## Estimate Std. Error t value Pr(>|t|)
## (Intercept) 3.05848 0.05964 51.281 < 2e-16 ***
## Condition -0.33769 0.08418 -4.012 8.02e-05 ***
## NPI_centered -0.01938 0.12359 -0.157 0.876
## Condition:NPI_centered -0.12018 0.17076 -0.704 0.482
## ---
## Signif. codes: 0 '***' 0.001 '**' 0.01 '*' 0.05 '.' 0.1 ' ' 1
##
## Residual standard error: 0.6635 on 245 degrees of freedom
## (29 observations deleted due to missingness)
## Multiple R-squared: 0.06811, Adjusted R-squared: 0.0567
## F-statistic: 5.968 on 3 and 245 DF, p-value: 0.0006084
# Effect sizes
cat("\nPartial Eta-Squared:\n")
##
## Partial Eta-Squared:
print(eta_squared(mod_npi, partial = TRUE))
## # Effect Size for ANOVA (Type I)
##
## Parameter | Eta2 (partial) | 95% CI
## ------------------------------------------------------
## Condition | 0.06 | [0.02, 1.00]
## NPI_centered | 3.79e-03 | [0.00, 1.00]
## Condition:NPI_centered | 2.02e-03 | [0.00, 1.00]
##
## - One-sided CIs: upper bound fixed at [1.00].
Interaction Plot
interact_plot(mod_npi,
pred = Condition,
modx = NPI_centered,
interval = TRUE,
int.width = 0.95,
x.label = "Condition",
y.label = "Feelings of Uncertainty",
legend.main = "Narcissism (Centered)") +
theme_minimal() +
ggtitle("Condition × Narcissism Interaction")

Johnson-Neyman Regions of Significance
johnson_neyman(mod_npi, pred = Condition, modx = NPI_centered, alpha = 0.05)
## JOHNSON-NEYMAN INTERVAL
##
## When NPI_centered is INSIDE the interval [-0.61, 1.43], the slope of
## Condition is p < .05.
##
## Note: The range of observed values of NPI_centered is [-1.49, 1.88]

Moderator 2: Uncertainty Aversion
Scale Reliability
uncert_items <- paste0("UncerAver", 1:15)
# Convert and calculate
the.data <- the.data %>%
mutate(across(all_of(uncert_items), as.numeric)) %>%
mutate(UncertAver_mean = rowMeans(select(., all_of(uncert_items)), na.rm = TRUE))
# Reliability
alpha_uncert <- psych::alpha(the.data[, uncert_items])
cat(sprintf("Uncertainty Aversion: Cronbach's α = %.3f\n", alpha_uncert$total$raw_alpha))
## Uncertainty Aversion: Cronbach's α = 0.911
Distribution
ggplot(the.data, aes(x = UncertAver_mean)) +
geom_histogram(bins = 30, fill = "purple", color = "black", alpha = 0.7) +
labs(title = "Distribution of Uncertainty Aversion Scores",
x = "Uncertainty Aversion Mean Score",
y = "Count") +
theme_minimal()

Moderation Analysis
# Center the moderator
the.data <- the.data %>%
mutate(UncertAver_centered = UncertAver_mean - mean(UncertAver_mean, na.rm = TRUE))
# Regression model
mod_uncert <- lm(FelUn_total ~ Condition * UncertAver_centered, data = the.data)
summary(mod_uncert)
##
## Call:
## lm(formula = FelUn_total ~ Condition * UncertAver_centered, data = the.data)
##
## Residuals:
## Min 1Q Median 3Q Max
## -2.02916 -0.39894 0.04897 0.45206 1.52211
##
## Coefficients:
## Estimate Std. Error t value Pr(>|t|)
## (Intercept) 3.05017 0.05781 52.759 < 2e-16 ***
## Condition -0.30626 0.08180 -3.744 0.000225 ***
## UncertAver_centered 0.11390 0.07998 1.424 0.155648
## Condition:UncertAver_centered 0.19864 0.11394 1.743 0.082513 .
## ---
## Signif. codes: 0 '***' 0.001 '**' 0.01 '*' 0.05 '.' 0.1 ' ' 1
##
## Residual standard error: 0.6424 on 246 degrees of freedom
## (28 observations deleted due to missingness)
## Multiple R-squared: 0.1231, Adjusted R-squared: 0.1124
## F-statistic: 11.52 on 3 and 246 DF, p-value: 4.328e-07
# Effect sizes
cat("\nPartial Eta-Squared:\n")
##
## Partial Eta-Squared:
print(eta_squared(mod_uncert, partial = TRUE))
## # Effect Size for ANOVA (Type I)
##
## Parameter | Eta2 (partial) | 95% CI
## -------------------------------------------------------------
## Condition | 0.07 | [0.03, 1.00]
## UncertAver_centered | 0.05 | [0.02, 1.00]
## Condition:UncertAver_centered | 0.01 | [0.00, 1.00]
##
## - One-sided CIs: upper bound fixed at [1.00].
Interaction Plot
interact_plot(mod_uncert,
pred = Condition,
modx = UncertAver_centered,
interval = TRUE,
int.width = 0.95,
x.label = "Condition",
y.label = "Feelings of Uncertainty",
legend.main = "Uncertainty Aversion",
colors = c("darkgreen", "blue", "darkred")) +
theme_minimal() +
ggtitle("Condition × Uncertainty Aversion Interaction")

Johnson-Neyman Analysis
johnson_neyman(mod_uncert, pred = Condition, modx = UncertAver_centered, alpha = 0.05)
## JOHNSON-NEYMAN INTERVAL
##
## When UncertAver_centered is INSIDE the interval [-11.72, 0.53], the slope
## of Condition is p < .05.
##
## Note: The range of observed values of UncertAver_centered is [-2.32, 1.68]

Moderator 3: Attachment Style (ECR-R)
Scale Reliability
# Define items
ecr_anx_items <- paste0("ECR.anx_", 1:18)
ecr_avoi_items <- paste0("ECR.avoi_", 1:18)
all_ecr_items <- c(ecr_anx_items, ecr_avoi_items)
# Convert to numeric
the.data <- the.data %>%
mutate(across(all_of(all_ecr_items), as.numeric))
# Reverse code identified items
anx_reverse_items <- c("ECR.anx_9", "ECR.anx_11")
avoi_reverse_items <- c("ECR.avoi_1", "ECR.avoi_3", "ECR.avoi_5",
"ECR.avoi_6", "ECR.avoi_7", "ECR.avoi_14")
the.data <- the.data %>%
mutate(
across(all_of(anx_reverse_items), ~ 6 - .),
across(all_of(avoi_reverse_items), ~ 6 - .)
)
# Calculate subscales
the.data <- the.data %>%
mutate(
ECR_Anxiety_mean = rowMeans(select(., all_of(ecr_anx_items)), na.rm = TRUE),
ECR_Avoidance_mean = rowMeans(select(., all_of(ecr_avoi_items)), na.rm = TRUE)
)
# Reliability
alpha_anx <- psych::alpha(the.data[, ecr_anx_items])
alpha_avoi <- psych::alpha(the.data[, ecr_avoi_items])
cat(sprintf("Attachment Anxiety: Cronbach's α = %.3f\n", alpha_anx$total$raw_alpha))
## Attachment Anxiety: Cronbach's α = 0.923
cat(sprintf("Attachment Avoidance: Cronbach's α = %.3f\n", alpha_avoi$total$raw_alpha))
## Attachment Avoidance: Cronbach's α = 0.934
Distribution
par(mfrow = c(1, 2))
hist(the.data$ECR_Anxiety_mean, main = "Attachment Anxiety",
xlab = "Mean Score", col = "coral", breaks = 20)
hist(the.data$ECR_Avoidance_mean, main = "Attachment Avoidance",
xlab = "Mean Score", col = "steelblue", breaks = 20)

par(mfrow = c(1, 1))
Attachment Anxiety Moderation
# Center
the.data <- the.data %>%
mutate(ECR_Anxiety_centered = ECR_Anxiety_mean - mean(ECR_Anxiety_mean, na.rm = TRUE))
# Model
mod_anxiety <- lm(FelUn_total ~ Condition * ECR_Anxiety_centered, data = the.data)
summary(mod_anxiety)
##
## Call:
## lm(formula = FelUn_total ~ Condition * ECR_Anxiety_centered,
## data = the.data)
##
## Residuals:
## Min 1Q Median 3Q Max
## -2.02881 -0.43135 0.05666 0.46610 1.40393
##
## Coefficients:
## Estimate Std. Error t value Pr(>|t|)
## (Intercept) 3.05305 0.05978 51.072 < 2e-16 ***
## Condition -0.33217 0.08451 -3.931 0.00011 ***
## ECR_Anxiety_centered 0.05912 0.07668 0.771 0.44145
## Condition:ECR_Anxiety_centered 0.02293 0.11438 0.201 0.84125
## ---
## Signif. codes: 0 '***' 0.001 '**' 0.01 '*' 0.05 '.' 0.1 ' ' 1
##
## Residual standard error: 0.6622 on 247 degrees of freedom
## (27 observations deleted due to missingness)
## Multiple R-squared: 0.07073, Adjusted R-squared: 0.05944
## F-statistic: 6.267 on 3 and 247 DF, p-value: 0.0004085
Interaction Plot: Anxiety
interact_plot(mod_anxiety,
pred = Condition,
modx = ECR_Anxiety_centered,
interval = TRUE,
int.width = 0.95,
x.label = "Condition",
y.label = "Feelings of Uncertainty",
legend.main = "Attachment Anxiety") +
theme_minimal() +
ggtitle("Condition × Attachment Anxiety Interaction")

Attachment Avoidance Moderation
# Center
the.data <- the.data %>%
mutate(ECR_Avoidance_centered = ECR_Avoidance_mean - mean(ECR_Avoidance_mean, na.rm = TRUE))
# Model
mod_avoidance <- lm(FelUn_total ~ Condition * ECR_Avoidance_centered, data = the.data)
summary(mod_avoidance)
##
## Call:
## lm(formula = FelUn_total ~ Condition * ECR_Avoidance_centered,
## data = the.data)
##
## Residuals:
## Min 1Q Median 3Q Max
## -2.10838 -0.41215 0.04433 0.49307 1.41134
##
## Coefficients:
## Estimate Std. Error t value Pr(>|t|)
## (Intercept) 3.06685 0.05983 51.263 <2e-16 ***
## Condition -0.36679 0.08429 -4.351 2e-05 ***
## ECR_Avoidance_centered -0.09638 0.08225 -1.172 0.242
## Condition:ECR_Avoidance_centered 0.10664 0.11894 0.897 0.371
## ---
## Signif. codes: 0 '***' 0.001 '**' 0.01 '*' 0.05 '.' 0.1 ' ' 1
##
## Residual standard error: 0.6572 on 242 degrees of freedom
## (32 observations deleted due to missingness)
## Multiple R-squared: 0.08063, Adjusted R-squared: 0.06923
## F-statistic: 7.074 on 3 and 242 DF, p-value: 0.0001413
Interaction Plot: Avoidance
interact_plot(mod_avoidance,
pred = Condition,
modx = ECR_Avoidance_centered,
interval = TRUE,
int.width = 0.95,
x.label = "Condition",
y.label = "Feelings of Uncertainty",
legend.main = "Attachment Avoidance") +
theme_minimal() +
ggtitle("Condition × Attachment Avoidance Interaction")

Categorical Attachment Styles
# Create attachment style categories
the.data <- the.data %>%
mutate(
Attachment_Style = case_when(
ECR_Anxiety_mean < median(ECR_Anxiety_mean, na.rm = TRUE) &
ECR_Avoidance_mean < median(ECR_Avoidance_mean, na.rm = TRUE) ~ "Secure",
ECR_Anxiety_mean >= median(ECR_Anxiety_mean, na.rm = TRUE) &
ECR_Avoidance_mean < median(ECR_Avoidance_mean, na.rm = TRUE) ~ "Preoccupied",
ECR_Anxiety_mean < median(ECR_Anxiety_mean, na.rm = TRUE) &
ECR_Avoidance_mean >= median(ECR_Avoidance_mean, na.rm = TRUE) ~ "Dismissing",
ECR_Anxiety_mean >= median(ECR_Anxiety_mean, na.rm = TRUE) &
ECR_Avoidance_mean >= median(ECR_Avoidance_mean, na.rm = TRUE) ~ "Fearful-Avoidant"
)
)
# Distribution
attach_table <- table(the.data$Attachment_Style)
kable(as.data.frame(attach_table),
col.names = c("Attachment Style", "N"),
caption = "Distribution of Attachment Styles") %>%
kable_styling(bootstrap_options = c("striped", "hover"))
Distribution of Attachment Styles
|
Attachment Style
|
N
|
|
Dismissing
|
84
|
|
Fearful-Avoidant
|
44
|
|
Preoccupied
|
79
|
|
Secure
|
40
|
ANOVA: Attachment Style
aov_attachment <- aov(FelUn_total ~ Condition * Attachment_Style, data = the.data)
summary(aov_attachment)
## Df Sum Sq Mean Sq F value Pr(>F)
## Condition 1 8.57 8.568 19.926 1.24e-05 ***
## Attachment_Style 3 1.16 0.387 0.900 0.442
## Condition:Attachment_Style 3 1.64 0.546 1.269 0.286
## Residuals 238 102.34 0.430
## ---
## Signif. codes: 0 '***' 0.001 '**' 0.01 '*' 0.05 '.' 0.1 ' ' 1
## 32 observations deleted due to missingness
# Effect sizes
cat("\nPartial Eta-Squared:\n")
##
## Partial Eta-Squared:
print(eta_squared(aov_attachment, partial = TRUE))
## # Effect Size for ANOVA (Type I)
##
## Parameter | Eta2 (partial) | 95% CI
## ----------------------------------------------------------
## Condition | 0.08 | [0.03, 1.00]
## Attachment_Style | 0.01 | [0.00, 1.00]
## Condition:Attachment_Style | 0.02 | [0.00, 1.00]
##
## - One-sided CIs: upper bound fixed at [1.00].
Visualization
ggplot(the.data %>% filter(!is.na(Attachment_Style)),
aes(x = factor(Condition), y = FelUn_total, fill = Attachment_Style)) +
stat_summary(fun = mean, geom = "bar", position = position_dodge(0.9)) +
stat_summary(fun.data = mean_se, geom = "errorbar",
position = position_dodge(0.9), width = 0.2) +
scale_fill_manual(values = c("Secure" = "darkgreen",
"Preoccupied" = "red",
"Dismissing" = "blue",
"Fearful-Avoidant" = "purple")) +
labs(x = "Condition",
y = "Feelings of Uncertainty",
fill = "Attachment Style",
title = "Condition Effect by Attachment Style") +
theme_minimal()

Moderator 4: Self-Control
Scale Reliability
# Define items
selfcon_items <- c("SelfCon1x", "SelfCon2x", "SelfCon3x", "SelfCon4x", "SelfCon5",
"SelfCon6x", "SelfCon7", "SelfCon8", "SelfCon9x", "SelfCon10",
"SelfCon11x", "SelfCon12x", "SelfCon13x")
# Convert to numeric
the.data <- the.data %>%
mutate(across(all_of(selfcon_items), as.numeric))
# Reverse code items with 'x' suffix
selfcon_reverse <- c("SelfCon1x", "SelfCon2x", "SelfCon3x", "SelfCon4x",
"SelfCon6x", "SelfCon9x", "SelfCon11x", "SelfCon12x", "SelfCon13x")
the.data <- the.data %>%
mutate(across(all_of(selfcon_reverse), ~ 6 - .))
# Calculate scores
the.data <- the.data %>%
mutate(SelfCon_mean = rowMeans(select(., all_of(selfcon_items)), na.rm = TRUE))
# Reliability
alpha_selfcon <- psych::alpha(the.data[, selfcon_items])
cat(sprintf("Self-Control: Cronbach's α = %.3f\n", alpha_selfcon$total$raw_alpha))
## Self-Control: Cronbach's α = 0.826
Distribution
ggplot(the.data, aes(x = SelfCon_mean)) +
geom_histogram(bins = 30, fill = "steelblue", color = "black", alpha = 0.7) +
labs(title = "Distribution of Self-Control Scores",
x = "Self-Control Mean Score",
y = "Count") +
theme_minimal()

Moderation Analysis
# Center
the.data <- the.data %>%
mutate(SelfCon_centered = SelfCon_mean - mean(SelfCon_mean, na.rm = TRUE))
# Model
mod_selfcon <- lm(FelUn_total ~ Condition * SelfCon_centered, data = the.data)
summary(mod_selfcon)
##
## Call:
## lm(formula = FelUn_total ~ Condition * SelfCon_centered, data = the.data)
##
## Residuals:
## Min 1Q Median 3Q Max
## -2.11584 -0.42853 0.07154 0.45520 1.46431
##
## Coefficients:
## Estimate Std. Error t value Pr(>|t|)
## (Intercept) 3.05858 0.05846 52.323 < 2e-16 ***
## Condition -0.34332 0.08251 -4.161 4.38e-05 ***
## SelfCon_centered -0.11862 0.09132 -1.299 0.195
## Condition:SelfCon_centered -0.12677 0.13268 -0.955 0.340
## ---
## Signif. codes: 0 '***' 0.001 '**' 0.01 '*' 0.05 '.' 0.1 ' ' 1
##
## Residual standard error: 0.6535 on 247 degrees of freedom
## (27 observations deleted due to missingness)
## Multiple R-squared: 0.09497, Adjusted R-squared: 0.08398
## F-statistic: 8.64 on 3 and 247 DF, p-value: 1.786e-05
# Effect sizes
cat("\nPartial Eta-Squared:\n")
##
## Partial Eta-Squared:
print(eta_squared(mod_selfcon, partial = TRUE))
## # Effect Size for ANOVA (Type I)
##
## Parameter | Eta2 (partial) | 95% CI
## ----------------------------------------------------------
## Condition | 0.07 | [0.03, 1.00]
## SelfCon_centered | 0.03 | [0.00, 1.00]
## Condition:SelfCon_centered | 3.68e-03 | [0.00, 1.00]
##
## - One-sided CIs: upper bound fixed at [1.00].
Interaction Plot
interact_plot(mod_selfcon,
pred = Condition,
modx = SelfCon_centered,
interval = TRUE,
int.width = 0.95,
x.label = "Condition",
y.label = "Feelings of Uncertainty",
legend.main = "Self-Control") +
theme_minimal() +
ggtitle("Condition × Self-Control Interaction")

Johnson-Neyman Analysis
johnson_neyman(mod_selfcon, pred = Condition, modx = SelfCon_centered, alpha = 0.05)
## JOHNSON-NEYMAN INTERVAL
##
## When SelfCon_centered is INSIDE the interval [-0.73, 2.41], the slope of
## Condition is p < .05.
##
## Note: The range of observed values of SelfCon_centered is [-1.56, 1.82]

Moderator 5: Self-Esteem (Rosenberg)
Scale Reliability
# Define items
selfest_items <- c("SelfEst1", "SelfEst2", "SelfEst3x", "SelfEst4", "SelfEst5x",
"SelfEst6", "SelfEst7", "SelfEst8x", "SelfEst9x", "SelfEst10x")
# Convert to numeric
the.data <- the.data %>%
mutate(across(all_of(selfest_items), as.numeric))
# Reverse code items with 'x' suffix
selfest_reverse <- c("SelfEst3x", "SelfEst5x", "SelfEst8x", "SelfEst9x", "SelfEst10x")
the.data <- the.data %>%
mutate(across(all_of(selfest_reverse), ~ 6 - .))
# Calculate scores
the.data <- the.data %>%
mutate(SelfEst_mean = rowMeans(select(., all_of(selfest_items)), na.rm = TRUE))
# Reliability
alpha_selfest <- psych::alpha(the.data[, selfest_items])
cat(sprintf("Self-Esteem (Rosenberg): Cronbach's α = %.3f\n", alpha_selfest$total$raw_alpha))
## Self-Esteem (Rosenberg): Cronbach's α = 0.908
Distribution
ggplot(the.data, aes(x = SelfEst_mean)) +
geom_histogram(bins = 30, fill = "darkseagreen", color = "black", alpha = 0.7) +
labs(title = "Distribution of Self-Esteem Scores",
x = "Self-Esteem Mean Score",
y = "Count") +
theme_minimal()

Moderation Analysis
# Center
the.data <- the.data %>%
mutate(SelfEst_centered = SelfEst_mean - mean(SelfEst_mean, na.rm = TRUE))
# Model
mod_selfest <- lm(FelUn_total ~ Condition * SelfEst_centered, data = the.data)
summary(mod_selfest)
##
## Call:
## lm(formula = FelUn_total ~ Condition * SelfEst_centered, data = the.data)
##
## Residuals:
## Min 1Q Median 3Q Max
## -2.08021 -0.39647 0.06019 0.45562 1.48461
##
## Coefficients:
## Estimate Std. Error t value Pr(>|t|)
## (Intercept) 3.04720 0.05825 52.315 < 2e-16 ***
## Condition -0.30416 0.08246 -3.689 0.000278 ***
## SelfEst_centered -0.12637 0.07240 -1.745 0.082160 .
## Condition:SelfEst_centered -0.11504 0.10412 -1.105 0.270308
## ---
## Signif. codes: 0 '***' 0.001 '**' 0.01 '*' 0.05 '.' 0.1 ' ' 1
##
## Residual standard error: 0.6466 on 246 degrees of freedom
## (28 observations deleted due to missingness)
## Multiple R-squared: 0.1116, Adjusted R-squared: 0.1008
## F-statistic: 10.3 on 3 and 246 DF, p-value: 2.057e-06
# Effect sizes
cat("\nPartial Eta-Squared:\n")
##
## Partial Eta-Squared:
print(eta_squared(mod_selfest, partial = TRUE))
## # Effect Size for ANOVA (Type I)
##
## Parameter | Eta2 (partial) | 95% CI
## ----------------------------------------------------------
## Condition | 0.07 | [0.02, 1.00]
## SelfEst_centered | 0.05 | [0.01, 1.00]
## Condition:SelfEst_centered | 4.94e-03 | [0.00, 1.00]
##
## - One-sided CIs: upper bound fixed at [1.00].
Interaction Plot
interact_plot(mod_selfest,
pred = Condition,
modx = SelfEst_centered,
interval = TRUE,
int.width = 0.95,
x.label = "Condition",
y.label = "Feelings of Uncertainty",
legend.main = "Self-Esteem") +
theme_minimal() +
ggtitle("Condition × Self-Esteem Interaction")

Johnson-Neyman Analysis
johnson_neyman(mod_selfest, pred = Condition, modx = SelfEst_centered, alpha = 0.05)
## JOHNSON-NEYMAN INTERVAL
##
## When SelfEst_centered is INSIDE the interval [-0.72, 3.17], the slope of
## Condition is p < .05.
##
## Note: The range of observed values of SelfEst_centered is [-2.16, 1.74]

Summary of All Moderations
# Create summary table
moderation_summary <- data.frame(
Moderator = c("Narcissism (NPI)", "Uncertainty Aversion", "Attachment Anxiety",
"Attachment Avoidance", "Self-Control", "Self-Esteem"),
Interaction_Beta = c(
coef(mod_npi)["Condition:NPI_centered"],
coef(mod_uncert)["Condition:UncertAver_centered"],
coef(mod_anxiety)["Condition:ECR_Anxiety_centered"],
coef(mod_avoidance)["Condition:ECR_Avoidance_centered"],
coef(mod_selfcon)["Condition:SelfCon_centered"],
coef(mod_selfest)["Condition:SelfEst_centered"]
),
P_value = c(
summary(mod_npi)$coefficients["Condition:NPI_centered", "Pr(>|t|)"],
summary(mod_uncert)$coefficients["Condition:UncertAver_centered", "Pr(>|t|)"],
summary(mod_anxiety)$coefficients["Condition:ECR_Anxiety_centered", "Pr(>|t|)"],
summary(mod_avoidance)$coefficients["Condition:ECR_Avoidance_centered", "Pr(>|t|)"],
summary(mod_selfcon)$coefficients["Condition:SelfCon_centered", "Pr(>|t|)"],
summary(mod_selfest)$coefficients["Condition:SelfEst_centered", "Pr(>|t|)"]
),
Significant = c(
summary(mod_npi)$coefficients["Condition:NPI_centered", "Pr(>|t|)"] < 0.05,
summary(mod_uncert)$coefficients["Condition:UncertAver_centered", "Pr(>|t|)"] < 0.05,
summary(mod_anxiety)$coefficients["Condition:ECR_Anxiety_centered", "Pr(>|t|)"] < 0.05,
summary(mod_avoidance)$coefficients["Condition:ECR_Avoidance_centered", "Pr(>|t|)"] < 0.05,
summary(mod_selfcon)$coefficients["Condition:SelfCon_centered", "Pr(>|t|)"] < 0.05,
summary(mod_selfest)$coefficients["Condition:SelfEst_centered", "Pr(>|t|)"] < 0.05
)
)
kable(moderation_summary,
digits = 4,
col.names = c("Moderator", "Interaction β", "p-value", "Significant (p < .05)"),
caption = "Summary of Moderation Analyses") %>%
kable_styling(bootstrap_options = c("striped", "hover")) %>%
row_spec(which(moderation_summary$Significant), bold = TRUE, color = "white", background = "#3498db")
Summary of Moderation Analyses
|
|
Moderator
|
Interaction β
|
p-value
|
Significant (p < .05)
|
|
Condition:NPI_centered
|
Narcissism (NPI)
|
-0.1202
|
0.4822
|
FALSE
|
|
Condition:UncertAver_centered
|
Uncertainty Aversion
|
0.1986
|
0.0825
|
FALSE
|
|
Condition:ECR_Anxiety_centered
|
Attachment Anxiety
|
0.0229
|
0.8412
|
FALSE
|
|
Condition:ECR_Avoidance_centered
|
Attachment Avoidance
|
0.1066
|
0.3708
|
FALSE
|
|
Condition:SelfCon_centered
|
Self-Control
|
-0.1268
|
0.3403
|
FALSE
|
|
Condition:SelfEst_centered
|
Self-Esteem
|
-0.1150
|
0.2703
|
FALSE
|
Correlation Matrix
# Create correlation matrix of all key variables
cor_vars <- the.data %>%
select(FelUn_total, NPI_Total_mean, UncertAver_mean,
ECR_Anxiety_mean, ECR_Avoidance_mean, SelfCon_mean, SelfEst_mean) %>%
rename(
`Feelings of Uncertainty` = FelUn_total,
`Narcissism` = NPI_Total_mean,
`Uncertainty Aversion` = UncertAver_mean,
`Attachment Anxiety` = ECR_Anxiety_mean,
`Attachment Avoidance` = ECR_Avoidance_mean,
`Self-Control` = SelfCon_mean,
`Self-Esteem` = SelfEst_mean
)
cor_matrix <- cor(cor_vars, use = "pairwise.complete.obs")
kable(cor_matrix, digits = 3, caption = "Correlation Matrix of All Variables") %>%
kable_styling(bootstrap_options = c("striped", "hover"))
Correlation Matrix of All Variables
|
|
Feelings of Uncertainty
|
Narcissism
|
Uncertainty Aversion
|
Attachment Anxiety
|
Attachment Avoidance
|
Self-Control
|
Self-Esteem
|
|
Feelings of Uncertainty
|
1.000
|
-0.071
|
0.249
|
0.111
|
-0.076
|
-0.167
|
-0.240
|
|
Narcissism
|
-0.071
|
1.000
|
-0.259
|
-0.221
|
0.214
|
0.124
|
0.405
|
|
Uncertainty Aversion
|
0.249
|
-0.259
|
1.000
|
0.486
|
-0.168
|
-0.387
|
-0.504
|
|
Attachment Anxiety
|
0.111
|
-0.221
|
0.486
|
1.000
|
-0.440
|
-0.356
|
-0.561
|
|
Attachment Avoidance
|
-0.076
|
0.214
|
-0.168
|
-0.440
|
1.000
|
0.225
|
0.388
|
|
Self-Control
|
-0.167
|
0.124
|
-0.387
|
-0.356
|
0.225
|
1.000
|
0.464
|
|
Self-Esteem
|
-0.240
|
0.405
|
-0.504
|
-0.561
|
0.388
|
0.464
|
1.000
|