Package | Function | dY/dX | SE | dY/dX | SE | dY/dX | SE |
---|---|---|---|---|---|---|---|

stats | lm | ✓ | ✓ | ✓ | ✓ | ✓ | ✓ |

glm | ✓ | ✓ | ✓ | ✓ | ✓ | ✓ | |

nls | |||||||

loess | ✓ | U | U | ||||

AER | ivreg | ✓ | ✓ | ✓ | ✓ | U | U |

tobit | ✓ | ✓ | U | U | ✓ | ✓ | |

afex | afex_aov | U | U | ✓ | ✓ | ||

aod | betabin | U | U | U | U | ||

betareg | betareg | ✓ | ✓ | ✓ | ✓ | ✓ | ✓ |

bife | bife | U | U | U | U | ||

biglm | biglm | U | U | U | U | ||

bigglm | U | U | U | U | |||

blme | blmer | ||||||

bglmer | |||||||

brglm2 | bracl | U | U | U | U | ||

brglmFit | ✓ | ✓ | ✓ | ✓ | |||

brnb | ✓ | ✓ | U | U | |||

brmultinom | U | U | U | U | |||

brms | brm | U | U | ✓ | ✓ | ||

crch | crch | U | U | U | U | ||

hxlr | U | U | U | U | |||

DCchoice | oohbchoice | ||||||

estimatr | lm_lin | ||||||

lm_robust | ✓ | ✓ | ✓ | U | ✓ | ✓ | |

iv_robust | ✓ | ✓ | U | U | U | U | |

flexsurv | flexsurvreg | ||||||

flexsurvspline | |||||||

fixest | feols | ✓ | ✓ | U | U | U | U |

feglm | U | U | U | U | |||

fenegbin | U | U | U | U | |||

fepois | ✓ | ✓ | U | U | U | U | |

gam | gam | U | U | ✓ | ✓ | ||

gamlss | gamlss | U | U | ✓ | ✓ | ||

geepack | geeglm | U | U | ✓ | ✓ | ||

glmmTMB | glmmTMB | U | U | ✓ | ✓ | ||

glmx | glmx | ✓ | U | U | U | ||

ivreg | ivreg | ✓ | ✓ | ✓ | ✓ | U | U |

mlr3 | Learner | ||||||

lme4 | lmer | ✓ | ✓ | ✓ | ✓ | ✓ | ✓ |

glmer | ✓ | ✓ | ✓ | ✓ | ✓ | ✓ | |

glmer.nb | ✓ | ✓ | ✓ | ✓ | |||

lmerTest | lmer | ✓ | ✓ | ✓ | ✓ | ||

logistf | logistf | ||||||

flic | |||||||

flac | |||||||

MASS | glmmPQL | U | U | ✓ | ✓ | ||

glm.nb | ✓ | ✓ | ✓ | ✓ | ✓ | ✓ | |

polr | ✓ | ✓ | ✖ | ✖ | ✓ | ✓ | |

rlm | ✓ | ✓ | ✓ | ✓ | |||

mclogit | mblogit | U | U | U | U | ||

mclogit | U | U | U | U | |||

MCMCglmm | MCMCglmm | U | U | U | U | U | U |

mgcv | gam | U | U | ✓ | ✓ | ||

bam | U | U | ✓ | ✖ | |||

mhurdle | mhurdle | ✓ | ✓ | U | U | ||

mlogit | mlogit | U | U | U | U | ||

mvgam | mvgam | ||||||

nlme | gls | U | U | ✓ | ✓ | ||

lme | |||||||

nnet | multinom | ✓ | ✓ | U | U | U | U |

ordbetareg | ordbetareg | U | U | ||||

ordinal | clm | ✓ | ✓ | U | U | U | U |

plm | plm | ✓ | ✓ | ✓ | ✓ | U | U |

phylolm | phylolm | ||||||

phyloglm | |||||||

pscl | hurdle | ✓ | U | ✓ | ✖ | ||

hurdle | ✓ | U | ✓ | ✖ | |||

zeroinfl | ✓ | ✓ | ✓ | U | ✓ | ✓ | |

quantreg | rq | ✓ | ✓ | U | U | ✓ | ✓ |

Rchoice | hetprob | ||||||

ivpml | |||||||

REndo | latentIV | ||||||

copulaCorrection | |||||||

higherMomentsIV | |||||||

hetErrorsIV | |||||||

multilevelIV | |||||||

rms | ols | ||||||

lrm | |||||||

orm | |||||||

Gls | |||||||

robust | lmRob | U | U | U | U | ||

robustbase | glmrob | ✓ | ✓ | U | U | ||

lmrob | ✓ | ✓ | U | U | |||

robustlmm | rlmer | U | U | ||||

rstanarm | stan_glm | ✖ | U | ✓ | ✓ | ||

sampleSelection | selection | U | U | U | U | ||

heckit | U | U | U | U | |||

scam | scam | U | U | U | U | ||

speedglm | speedglm | ✓ | ✓ | ✓ | ✓ | U | U |

speedlm | ✓ | ✓ | ✓ | ✓ | U | U | |

survey | svyglm | ✓ | ✓ | ✓ | ✓ | ||

svyolr | |||||||

survival | clogit | ||||||

coxph | ✓ | ✓ | U | U | ✓ | ✓ | |

survreg | |||||||

tobit1 | tobit1 | ✓ | ✓ | U | U | ||

truncreg | truncreg | ✓ | ✓ | ✓ | ✓ | U | U |

# Supported Models

`marginaleffects`

effects supports 97 model types directly, and dozens more via the `tidymodels`

and `mlr3`

frameworks. This table shows the list of directly supported model types. There are three main alternative software packages to compute such slopes (1) `Stata`

’s `margins`

command, (2) `R`

’s `margins::margins()`

function, and (3) `R`

’s `emmeans::emtrends()`

function. The test suite hosted on Github compares the numerical equivalence of results produced by `marginaleffects::slopes()`

to those produced by all 3 alternative software packages:

- ✓: a green check means that the results of at least one model are equal to a reasonable tolerance.
- ✖: a red cross means that the results are
*not*identical; extra caution is warranted. - U: a grey U means that computing slopes for a model type is
*unsupported*by alternative packages, but supported by`marginaleffects`

. - An empty cell means means that no comparison has been made yet.

I am eager to add support for new models. Feel free to file a request or submit code on Github.