marginaleffects
ObjectsExtract Posterior Draws or Bootstrap Resamples from marginaleffects
Objects
get_draws(x, shape = "long")
A data.frame with drawid
and draw
columns.
An object produced by a marginaleffects
package function, such as predictions()
, avg_slopes()
, hypotheses()
, etc.
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).
If DxP and PxD and the names returned by coef(x)
are unique, marginaleffects
sets parameter names to those names. Otherwise, it sets them to b1
, b2
, etc.