Skip to content

Commit

Permalink
Add final item-level interaction plot. Correct passage-level plot axi…
Browse files Browse the repository at this point in the history
…s label
  • Loading branch information
l-acs committed Dec 14, 2024
1 parent b430949 commit 1e1ed91
Show file tree
Hide file tree
Showing 2 changed files with 21 additions and 14 deletions.
9 changes: 5 additions & 4 deletions code/analysisReadAloudBeta.R
Original file line number Diff line number Diff line change
Expand Up @@ -587,7 +587,7 @@ summary(f_model1_z_scored)

plot_lmer(f_model1_z_scored,
predictor = 'scaaredSoc_z',
outcome = 'Average comprehension accuracy\n(z-scored)',
outcome = 'Average comprehension accuracy',
xlab = 'SCAARED-Social Score\n(z-scored)',
main = 'Social Anxiety Severity and Comprehension Accuracy')

Expand Down Expand Up @@ -631,7 +631,7 @@ summary(f_model5_z_scored)

plot_lmer(f_model5_z_scored,
predictor = 'words_with_hes_rate_z',
outcome = 'Average comprehension accuracy\n(z-scored)',
outcome = 'Average comprehension accuracy',
xlab = 'Rate of hesitations per word\n(z-scored)',
main = 'Rate of Hesitation and Comprehension Accuracy')

Expand Down Expand Up @@ -672,8 +672,9 @@ interact_plot(model = f_model9_z_scored,
interval = TRUE,
x.label = expression(
atop("Rate of hesitations per word", "(z-scored)")),
y.label = expression(
atop("Average comprehension accuracy", "(z-scored)")),
y.label = #expression(
#atop(
"Average comprehension accuracy",# "(z-scored)")),
legend.main = "SCAARED-Social score",
main.title = "Rate of Hesitation, Social Anxiety Severity, and Comprehension Accuracy")

Expand Down
26 changes: 16 additions & 10 deletions code/analysisWordLevelReadAloudBeta.R
Original file line number Diff line number Diff line change
Expand Up @@ -985,6 +985,7 @@ interact_plot(model = wordfreq_model_with_absents_as_median_4,
# modx = hesitation, mod2 = scaaredSoc_gmc,
# interval = TRUE)

# fixed versions:
interact_plot(model = wordfreq_model_with_absents_as_median_5_z_scored,
pred = log10frequency_with_absents_as_median_z,
modx = hesitation_predictor,
Expand All @@ -999,16 +1000,21 @@ interact_plot(model = wordfreq_model_with_absents_as_median_5_z_scored,
main.title = "Item-Level Word Frequency, Hesitations, and Misproductions") #+
# theme(plot.title = element_text(hjust = 0.5))

# fixed versions:
interact_plot(model = wordfreq_model_with_absents_as_median_5,
pred = log10frequency_with_absents_as_median_gmc, modx = hesitation_predictor, interval = TRUE)

# TODO this one is incomplete -- got to here,,
# model on the above? maybe? but nb also mod2 here
interact_plot(model = wordfreq_model_with_absents_as_median_6,
pred = log10frequency_with_absents_as_median_gmc,
modx = hesitation_predictor, mod2 = scaaredSoc_gmc,
interval = TRUE)
interact_plot(model = wordfreq_model_with_absents_as_median_6_z_scored,
pred = log10frequency_with_absents_as_median_z,
modx = hesitation_predictor,
mod2 = scaaredSoc_z,
interval = TRUE,
x.label = expression(
atop("log"['10']*" word frequency",
"(lower = rarer)")), #'testerx',
y.label = expression('Probability of misproduction on a given word'),
legend.main = "Hesitation presence/absence",#\n(z-scored)",
modx.values = factor(c(-1, 1)), # implicit, but specifying s.t. labels are guaranteed to align with the right value
modx.labels = c("no hesitation", "hesitation"),
mod2.values = "mean-plus-minus",
mod2.labels = c("Mean SCAARED-Social score - 1 SD", "Mean SCAARED-Social score", "Mean SCAARED-Social score + 1 SD"),
main.title = "Social Anxiety Severity and Item-Level Word Frequency, Hesitations, and Misproductions")

# summary(errorDat$log10frequency_with_absents_as_median)

0 comments on commit 1e1ed91

Please sign in to comment.