Learn R Programming

qbrms (version 1.0.1)

conditional_effects_slices: Discrete-slice conditional effects (brms-style) for qbrms

Description

Build point/interval summaries at a few values of a numeric moderator, plotted against the factor on the x-axis.

Usage

conditional_effects_slices(
  object,
  effects,
  slices = NULL,
  nslices = 3L,
  prob = 0.95,
  ndraws = 200L,
  at = list(),
  seed = NULL,
  ...
)

Value

An object of class "qbrms_conditional_effects" containing a list with one element per effect. Each element is a data frame with columns for the predictor values, estimates, and credible intervals.

Arguments

object

A qbrms_fit object.

effects

Character vector specifying effects to plot. If NULL, all numeric predictors are used.

slices

Named list of variables and values at which to slice the data.

nslices

Number of slices to use for each slicing variable.

prob

Probability mass to include in uncertainty intervals (default 0.95).

ndraws

Number of posterior draws to use for predictions.

at

Named list of values at which to fix other predictors.

seed

Random seed for reproducibility.

...

Additional arguments passed to prediction functions.