Skip to content

Commit

Permalink
interaction subplots share common scale
Browse files Browse the repository at this point in the history
  • Loading branch information
phelps-sg committed Dec 26, 2023
1 parent bd1a563 commit 58c351e
Showing 1 changed file with 3 additions and 6 deletions.
9 changes: 3 additions & 6 deletions jupyter-book/R-MixedModel.py
Original file line number Diff line number Diff line change
Expand Up @@ -229,16 +229,13 @@
model.term <- sprintf("Model [%s]", model)
participant.group.term <- sprintf("Participant_group [%s]", participant.group)

predicted <- ggpredict(model.pd, c("Partner_condition", model.term, participant.group.term))
predicted <- ggpredict(model.pd.1, c("Partner_condition", model.term, participant.group.term))

p <- plot(predicted) + geom_line(aes(x = x, y = predicted), color = "blue") +
geom_point(aes(x = x, y = predicted), color = "red") +
geom_point(aes(x = x, y = predicted), color = "red") +
scale_y_continuous(limits = c(0, 1)) +
labs(title=participant.group)

# pdf(sprintf("figs/glmm-interaction-%s-%s.pdf", model, participant.group))
# print(p)
# dev.off()

return(p)
}

Expand Down

0 comments on commit 58c351e

Please sign in to comment.