R/predictions_plan_bayesian.R

Defines functions prediction_plan_build_bayesian

prediction_plan_build_bayesian <- function(
    out,
    draws,
    newdata,
    mfx,
    by = NULL,
    hypothesis = NULL,
    verbose = TRUE,
    ...) {
    out <- get_by(
        out,
        draws = draws,
        newdata = newdata,
        by = by,
        verbose = verbose,
        ...
    )
    draws <- attr(out, "posterior_draws")
    out <- get_hypothesis(
        out,
        hypothesis = hypothesis,
        by = by,
        newdata = newdata,
        draws = draws,
        mfx = mfx
    )

    list(cmp = out, plan = NULL)
}

Try the marginaleffects package in your browser

Any scripts or data that you put into this service are public.

marginaleffects documentation built on Sept. 3, 2026, 9:08 a.m.