It’s not at all obvious from these coefficients what the total marginal relationship is between treatment and y.
# Residual deviance: 1246077 on 2994 degrees of freedom # Null deviance: 1391433 on 2999 degrees of freedom # (Dispersion parameter for gaussian family taken to be 416.1914) In this vignette, we detail a few possible use cases of the modmarg package. The error is computed using the delta method, which we detail in a separate vignette. This package reproduces the margins command from Stata, which allows for easy and quick estimation of marginal relationships and the associated error. For example, the coefficients of logistic regression are odds ratios, so even simple regressions are not immediately interpretable. This non-obviousness of marginal relationships is also a problem for even very simple regressions with functional forms that mean that coefficients are not in the base units of the regression. Moreover, computing the error in that estimate is a non-trivial problem. In the simplest case, say you run the following formula in glm: wages ~ age + age^2.īecause the output will include coefficients for both age and age squared, it’s not immediately apparent what the total marginal relationship is between a change in age and wages. For many types of regression techniques, the coefficients in the model may not be sufficient to adequately figure out the marginal relationship between a covariate and the outcome of a regression (or the error in your estimate).