
Summary method for average marginal effects
Source:R/marginal_effects.R
summary.marginal_effects.RdCreates a summary object that produces the detailed AME table (estimate, delta-method SE, z, p, confidence interval) when printed.
Usage
# S3 method for class 'marginal_effects'
summary(object, effects = TRUE, digits = 3, ...)See also
marginal_effects for the main analysis function.
Examples
survey_data$high_satisfaction <- as.integer(survey_data$life_satisfaction >= 4)
model <- logistic_regression(survey_data, high_satisfaction ~ age + income)
summary(marginal_effects(model))
#>
#> Average Marginal Effects Results
#> --------------------------------
#> - Formula: high_satisfaction ~ age + income
#> - Scale: Predicted probability
#> - Std. errors: Delta method
#> - N: 2115
#>
#> ------------------------------------------------------------
#> Term AME SE z p CI Lower CI Upper sig
#> ------------------------------------------------------------
#> age 0.000 0.001 0.417 .677 -0.001 0.001
#> income 0.000 0.000 22.016 <.001 0.000 0.000 ***
#> ------------------------------------------------------------
#>
#> Factor rows show the average discrete change vs. the reference level.
#>
#> Signif. codes: 0 '***' 0.001 '**' 0.01 '*' 0.05