Extract Posterior Draws or Bootstrap Resamples from marginaleffects Objects
Source: R/get_draws.R
get_draws.RdExtract Posterior Draws or Bootstrap Resamples from marginaleffects Objects
Arguments
- x
An object produced by a
marginaleffectspackage function, such aspredictions(),avg_slopes(),hypotheses(), etc.- shape
string indicating the shape of the output format:
"long" (default): long format data frame
"PxD" (fastest): Matrix with parameters as rows and draws as columns
"DxP": Matrix with draws as rows and parameters as columns
"rvar": Random variable datatype (see
posteriorpackage documentation).