Learn R Programming

marginaleffects (version 0.17.0)

posteriordraws: posteriordraws() is an alias to posterior_draws()

Description

This alias is kept for backward compatibility and because some users may prefer that name.

Usage

posteriordraws(x, shape = "long")

Value

A data.frame with drawid and draw columns.

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).