Skip to content

Commit

Permalink
shorter level names for partner condition and wider interaction plots
Browse files Browse the repository at this point in the history
  • Loading branch information
phelps-sg committed Dec 26, 2023
1 parent 58c351e commit 4190051
Showing 1 changed file with 5 additions and 2 deletions.
7 changes: 5 additions & 2 deletions jupyter-book/R-MixedModel.py
Original file line number Diff line number Diff line change
Expand Up @@ -91,6 +91,9 @@
# %%
levels(results.clean$Partner_condition)

# %%
levels(results.clean$Partner_condition) <- c('T4TC', 'T4TD', 'C', 'D')

# %%
levels(results.clean$Participant_label)

Expand All @@ -99,7 +102,7 @@

# %%
results.clean$Participant_group <- relevel(results.clean$Participant_group, ref='Control')
results.clean$Partner_condition <- relevel(results.clean$Partner_condition, ref='tit for tat D')
results.clean$Partner_condition <- relevel(results.clean$Partner_condition, ref='T4TD')
results.clean$Model <- relevel(results.clean$Model, ref='gpt-3.5-turbo-0613')
results.clean$Participant_pronoun <- relevel(results.clean$Participant_pronoun, ref='they')
results.clean$Participant_case <- relevel(results.clean$Participant_case, ref='standard')
Expand Down Expand Up @@ -250,7 +253,7 @@
}

pdf.interaction.plots <- function(model) {
pdf(sprintf("figs/interaction-plots-%s", model))
pdf(sprintf("figs/interaction-plots-%s", model), width=12, height=6)
result <- interaction.plots(model)
print(result)
dev.off()
Expand Down

0 comments on commit 4190051

Please sign in to comment.