Skip to content

Calculate marginal effects, similar to linear coefficients, for any predictive model. Also calculates and plots individual conditional expectation (ICE) curves. As of this writing, the concept is experimental. Caveat emptor!

License

TommyJones/marginal

main
Switch branches/tags

Name already in use

A tag already exists with the provided branch name. Many Git commands accept both tag and branch names, so creating this branch may cause unexpected behavior. Are you sure you want to create this branch?
Code

Latest commit

 

Git stats

Files

Permalink
Failed to load latest commit information.
Type
Name
Latest commit message
Commit time
R
 
 
 
 
man
 
 
 
 
 
 
 
 
 
 
 
 
 
 

marginal logo

marginal will be an R package for calculating marginal effects for arbitrary prediction models. As of now, code and research are in early stages. In other words, BUYER BEWARE

Open issues include:

  • Finding a valid way to calculate confidence intervals
  • Handling categorical variables more elegantly
  • Finding the best default behaviors for calculations
  • And more!

Some basic usage

devtools::install_github("tommyjones/marginal")

library(marginal)
library(randomForest)

data(mtcars)

fit <- randomForest(mpg ~., data = mtcars)

mfx <- CalcMfx(object = fit, X = mtcars)

plot(mfx)

About

Calculate marginal effects, similar to linear coefficients, for any predictive model. Also calculates and plots individual conditional expectation (ICE) curves. As of this writing, the concept is experimental. Caveat emptor!

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages