plot_predictive: Posterior predictive checks

View source: R/output.R

plot_predictiveR Documentation

Posterior predictive checks

Description

Compares the data with responses simulated from the fitted model. For every saved draw, LDDMM() simulates one response of every subject to every stimulus in every block (pred_ans_ind and pred_time_ind).

  • type = "response": proportion of each decision, by stimulus and block. Lines are the posterior predictive mean of the proportion; bands are the 90% interval of the proportion among the simulated responses of one draw (one per participant), so they also contain the sampling variability of that many responses. Points are the observed proportions.

  • type = "rt": 10%, 50% and 90% quantiles of the response times, by stimulus and block. Lines are the posterior predictive quantiles (pooled over subjects and draws); points are the observed quantiles.

Usage

plot_predictive(data, fit, type = c("response", "rt"))

Arguments

data

the data frame used to fit the model (see LDDMM()).

fit

fit from the LDDMM() function

type

which check to plot: "response" or "rt".

Details

Censored trials are left out of the observed data.

Value

A ggplot object.


lddmm documentation built on Oct. 23, 2026, 5:07 p.m.