Summarize Marginal Effects Object
summary.marginal_effects.Rd
Computes posterior means and quantiles from the draws stored in a
marginal_effects
object.
Value
A list object of class "summary.marginal_effects"
containing:
- summary_df
A data frame with columns
coefficient_index
, columns for each non-NA column in the inputz_values
(e.g.,z_col_1
,z_col_2
, ... or using original variable names if available),mean
, and columns for each requested quantile (e.g.,q2.5
,q50
,q97.5
). Each row represents a specific coefficient at a specific grid point defined by a row inz_values
.- z_values
The original
z_values
matrix provided tomarginal_effects
.- probs
The numeric vector of quantile probabilities used.
- call
The matched call to the
summary
function.
Examples
# --- Assumes `mfx_result` exists from marginal_effects.rhierMnlRwMixture example ---
if (exists("mfx_result")) {
mfx_summary <- summary(mfx_result, probs = c(0.05, 0.5, 0.95))
print(mfx_summary$summary_df)
# --- Plotting example follows in plot.summary.marginal_effects ---
} else {
message("Run the example for 'marginal_effects.rhierMnlRwMixture' first.")
}
#> Run the example for 'marginal_effects.rhierMnlRwMixture' first.