frames.RdProvides the average marginal effects of a GLM model with
bootstrapped confidence intervals. Similar results would be obtained from using
margins::margins().
frames(model, ci_type = "perc", boot = 100, ci = 0.95)Using the average marginal effects as discussed by Tamas Bartus (2005), the coefficients are transformed into probabilities (for binary outcomes) or remain in their original units (continuous outcomes).
Bartus, T. (2005). Estimation of marginal effects using margeff. The Stata Journal, 5(3), 309–329. <https://EconPapers.repec.org/RePEc:tsj:stataj:v:5:y:2005:i:3:p:309-329>
library(furniture)
data(nhanes_2010)
fit = glm(marijuana ~ home_meals + gender + age + asthma,
data = nhanes_2010,
family = "binomial")
frames(fit)
#>
#> Bootstrapping...Done.
#> ┌────────────────────────────┐
#> │ Average Marginal Effects │
#> └────────────────────────────┘
#>
#> Estimate Lower Upper
#> home_meals -0.0097 -0.0185 -0.0033
#> genderFemale 0.1043 0.0358 0.1720
#> age 0.0007 -0.0070 0.0087
#> asthmaNo -0.0017 -0.0672 0.0619
#> ────