posterior_draws: Extract Posterior Draws or Bootstrap Resamples from...

View source: R/posterior_draws.R

posterior_drawsR Documentation

Extract Posterior Draws or Bootstrap Resamples from marginaleffects Objects

Description

Extract Posterior Draws or Bootstrap Resamples from marginaleffects Objects

Usage

posterior_draws(x, shape = "long")

Arguments

x

An object produced by a marginaleffects package function, such as predictions(), avg_slopes(), hypotheses(), etc.

shape

string indicating the shape of the output format:

  • "long": long format data frame

  • "DxP": Matrix with draws as rows and parameters as columns

  • "PxD": Matrix with draws as rows and parameters as columns

  • "rvar": Random variable datatype (see posterior package documentation).

Value

A data.frame with drawid and draw columns.


marginaleffects documentation built on Oct. 5, 2024, 5:06 p.m.