Skip to content

Commit

Permalink
correct model for pd and compute contrast
Browse files Browse the repository at this point in the history
  • Loading branch information
phelps-sg committed Jan 21, 2024
1 parent 773923e commit 850efce
Showing 1 changed file with 19 additions and 3 deletions.
22 changes: 19 additions & 3 deletions jupyter-book/R-MixedModel.R
Original file line number Diff line number Diff line change
Expand Up @@ -435,8 +435,24 @@ model_pd_2 <- glmmTMB(
data = results_pd,
family = betabinomial
)

# %%
summary(model_pd_2)

# %%
posthoc_pd_by_model <-
emmeans(model_pd_2, ~ Participant_group * Partner_condition * Model)
summary(posthoc_pd_by_model)

# %%
contrast(posthoc_pd_by_model)

# %%
posthoc_pd <-
emmeans(model_pd_2, ~ Participant_group * Partner_condition)

# %%
contrast(posthoc_pd)

# %%
texreg(
Expand Down Expand Up @@ -471,14 +487,14 @@ dev.off()
xtable(lme4::formatVC(summary(model_pd)$varcor$cond))

# %%
as_odds(model_pd_1)
as_odds(model_pd_2)

# %%

odds_ratios_significant(model_pd_1)
odds_ratios_significant(model_pd_2)

# %%
print(odds_ratios_significant(model_pd_1), type = "latex")
print(odds_ratios_significant(model_pd_2), type = "latex")

# %%
xtable(coef(summary(model_pd))$cond, digits = 3)
Expand Down

0 comments on commit 850efce

Please sign in to comment.