JuliaStats / GLM.jl

Generalized linear models in Julia

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Delta method in GLM.jl

moshialam opened this issue · comments

Feature request: It will be quite useful to have a Julia equivalent of marginaleffects package in R which uses the deltamethod() function, or the nlcom post estimation command in Stata.

Sample R code:

eq = lm(y ~ x1 + x2, data)
deltamethod(eq, "x1 / x2 = 1")

Sample Stata code:

reg y x1 x2
nlcom _b[x1]/_b[x2]

It's unlikely that this would be added here, but there is related functionality in the Effects package:

https://beacon-biosignals.github.io/Effects.jl/stable/emmeans/

It computes estimated marginal means, doesn't (yet) do tests of linear combinations of coefficients.