Description Usage Arguments Value Examples
predict log-odds of /p/ responses based on just the fixed effects of the fitted model, and plot.
1 | predict_and_plot(dat, fit, show_se = FALSE, ...)
|
dat |
Data suitable for calling lme4::predict.merMod (e.g. output of make_prediction_data). |
fit |
glmer fitted model. |
show_se |
(default: FALSE) whether or not to draw the confidence intervals (based on the standard error of the fixed effects). |
The ggplot2 plot object.
1 2 3 4 5 6 7 8 9 10 | ## Not run:
data_mod <- mutate_for_lmer(data_inc)
fit <- glmer(respP ~ vot_rel.s * bvotCond.s * supervised * trial.s +
(vot_rel.s * trial.s | subject),
data=data_mod, family='binomial',
control= glmerControl(optimizer='bobyqa'))
data_pred <- make_prediction(data_inc, data_mod)
predict_and_plot(data_pred, fit, show_se=TRUE)
## End(Not run)
|
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.