Learn R Programming

marginaleffects (version 0.8.1)

posteriordraws: Extract posterior draws from a predictions, comparisons, or marginaleffects object derived from Bayesian models.

Description

Extract posterior draws from a predictions, comparisons, or marginaleffects object derived from Bayesian models.

Usage

posteriordraws(x, shape = "long")

Value

A data.frame with drawid and draw columns.

Arguments

x

An object produced by the marginaleffects, comparisons, or predictions functions

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