README.md

marfx

Yet another package to calculate marginal effects and first differences for statistical models.

Installation

if(!require('devtools')) {
  install.packages('devtools')
  library('devtools')
}
install_github('jrnold/marfx')

Overview

Methods:

Supported classes:

This is still a work in progress and even for these objects, not all variations may be supported.

Similar packages

margins is the most similar, but implements the derivatives of the model matrix with respect to the data variables via symbolic differentiation, and calculates the variance-covariance of the marginal effects via the Delta rule. marfx uses numerical derivatives to calculate the derivatives of the model matrix with respect to the variables, which is slower but will handle all formulae. marfx uses simulation rather than the delta method to calculate the variance covariance of the marginal effects, which is slower, but more flexible.

marfx is inspired my ideas from simcf which was written by Chris Adolph while teaching the same course, for the same reasons I wrote this package.

Zelig allows for partial (finite) differences via specified counterfactuals, but only works for models within its package.

Several other packages provide estimates of the marginal effects for some types of models, including car, alr, mfx, and erer. But these packages do not account for interrelations between variables.



jrnold/marfx documentation built on May 20, 2019, 1:03 a.m.