The hardware and bandwidth for this mirror is donated by METANET, the Webhosting and Full Service-Cloud Provider.
If you wish to report a bug, or if you are interested in having us mirror your free-software or open-source project, please feel free to contact us at mirror[@]metanet.ch.

modmarg

CRAN Version Build Status codecov

Calculate predicted levels and marginal effects using the delta method to calculate standard errors. This is an R-based version of Stata’s ‘margins’ command.

Features:

Usage

To install this package from CRAN, please run

install.packages('modmarg')

To install the development version of this package, please run

devtools::install_github('anniejw6/modmarg', build_vignettes = TRUE)

Here is an example of estimating predicted levels and effects using the iris dataset:

data(iris)

mod <- glm(Sepal.Length ~ Sepal.Width + Species, 
           data = iris, family = 'gaussian')
           
# Predicted Levels
modmarg::marg(mod, var_interest = 'Species', type = 'levels')

# Predicted Effects
modmarg::marg(mod, var_interest = 'Species', type = 'effects')

There are two vignettes included:

vignette('usage', package = 'modmarg')
vignette('delta-method', package = 'modmarg')

More Reading on the Delta Method

These binaries (installable software) and packages are in development.
They may not be fully stable and should be used with caution. We make no claims about them.