Skip to content

Commit

Permalink
Add plots for word-level comprehension models
Browse files Browse the repository at this point in the history
word_level_comprehension_model_0_logistic
word_level_comprehension_model_1_logistic
word_level_comprehension_model_2_logistic
word_level_comprehension_model_3_logistic
word_level_comprehension_model_4_logistic
  • Loading branch information
l-acs committed Jan 3, 2025
1 parent 80ed1c3 commit 770ec46
Show file tree
Hide file tree
Showing 8 changed files with 67 additions and 0 deletions.
67 changes: 67 additions & 0 deletions code/analysisWordLevelReadAloudBeta.R
Original file line number Diff line number Diff line change
Expand Up @@ -976,6 +976,15 @@ word_level_comprehension_model_0_logistic <-
data=errorDat, family = "binomial")
summary(word_level_comprehension_model_0_logistic)

plot_glmer(
word_level_comprehension_model_0_logistic,
predictor = 'scaaredSoc_z',
outcome = 'Probability of accurate comprehension\n(word-level)',
xlab = 'SCAARED-Social score\n(z-scored)',
main = 'Social Anxiety Severity and Item-Level Comprehension Accuracy'
)


# Misproduction to predict comprehension accuracy
# n.s.
# misprod_predictor1 0.009751 0.023084 0.422 0.673
Expand All @@ -984,6 +993,14 @@ word_level_comprehension_model_1_logistic <-
data=errorDat, family = "binomial")
summary(word_level_comprehension_model_1_logistic)

plot_glmer(
word_level_comprehension_model_1_logistic,
predictor = 'misprod_predictor',
outcome = 'Probability of accurate comprehension\n(word-level)',
xlab = 'Presence/absence of misproduction (word-level)',
main = 'Item-Level Misproductions and Comprehension Accuracy'
)

# Hesitation to predict comprehension accuracy
# n.s.
# hesitation_predictor1 0.03030 0.02167 1.398 0.162
Expand All @@ -992,6 +1009,14 @@ word_level_comprehension_model_2_logistic <-
data=errorDat, family = "binomial")
summary(word_level_comprehension_model_2_logistic)

plot_glmer(
word_level_comprehension_model_2_logistic,
predictor = 'hesitation_predictor',
outcome = 'Probability of accurate comprehension\n(word-level)',
xlab = 'Presence/absence of hesitation (word-level)',
main = 'Item-Level Hesitations and Comprehension Accuracy'
)

# Interaction between misproduction and social anxiety to predict comprehension accuracy
# n.s.
# misprod_predictor1 0.00975 0.02309 0.422 0.673
Expand All @@ -1002,6 +1027,28 @@ word_level_comprehension_model_3_logistic <-
data=errorDat, family = "binomial")
summary(word_level_comprehension_model_3_logistic)

interact_plot(model = word_level_comprehension_model_3_logistic,
pred = misprod_predictor,
modx = scaaredSoc_z,
interval = TRUE,
x.label = 'Presence/absence of misproduction (word-level)',
y.label = 'Probability of accurate comprehension\n(word-level)',
legend.main = "SCAARED-Social score\n(z-scored)",
main.title = "Item-Level Misproductions, Comprehension Accuracy, and Social Anxiety Severity") +
theme(plot.title = element_text(hjust = 0.5))

# alternative version
interact_plot(model = word_level_comprehension_model_3_logistic,
pred = scaaredSoc_z,
modx = misprod_predictor,
interval = TRUE,
x.label = 'SCAARED-Social score\n(z-scored)',
y.label = 'Probability of accurate comprehension\n(word-level)',
legend.main = "Presence/absence of misproduction (word-level)",
main.title = "Item-Level Misproductions, Comprehension Accuracy, and Social Anxiety Severity") +
theme(plot.title = element_text(hjust = 0.5))


# Interaction between hesitation and social anxiety to predict comprehension accuracy
# n.s.
# hesitation_predictor1 0.031587 0.022160 1.425 0.154
Expand All @@ -1012,6 +1059,26 @@ word_level_comprehension_model_4_logistic <-
data=errorDat, family = "binomial")
summary(word_level_comprehension_model_4_logistic)

interact_plot(model = word_level_comprehension_model_4_logistic,
pred = hesitation_predictor,
modx = scaaredSoc_z,
interval = TRUE,
x.label = 'Presence/absence of hesitation (word-level)',
y.label = 'Probability of accurate comprehension\n(word-level)',
legend.main = "SCAARED-Social score\n(z-scored)",
main.title = "Item-Level Hesitations, Comprehension Accuracy, and Social Anxiety Severity") +
theme(plot.title = element_text(hjust = 0.5))

# alternative version
interact_plot(model = word_level_comprehension_model_4_logistic,
pred = scaaredSoc_z,
modx = hesitation_predictor,
interval = TRUE,
x.label = 'SCAARED-Social score\n(z-scored)',
y.label = 'Probability of accurate comprehension\n(word-level)',
legend.main = "Presence/absence of hesitation (word-level)",
main.title = "Item-Level Hesitations, Comprehension Accuracy, and Social Anxiety Severity") +
theme(plot.title = element_text(hjust = 0.5))


# hesitation ~ wf x SA
Expand Down
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.

0 comments on commit 770ec46

Please sign in to comment.