Calculate marginal effect of dummy (and its standard error) for Tobit in R

722 views Asked by At

I have a standard Tobit model where the only explanatory variable is a dummy for treatment (plus the intercept), and I want to estimate the marginal effect of this treatment on my dependent variable and also the standard error of this ME.

I know that the mfx package in R is able to recover what I want for the Probit and Logit models, but I couldn't find a similar package for Tobit. Does anyone know about a package that can do this or how to recover the ME and its standard error by "hand"? Thanks!

Edit: The AER package has a function that estimates a Tobit model, so I was looking for some way of calculating the ME (and the standard error of the ME) using it. Here is an example of what I am doing using data from the AER package.

library(AER)

data("CollegeDistance")

model <- tobit(CollegeDistance$education ~ CollegeDistance$gender, left = 0, data = CollegeDistance, x= TRUE)

With this code I can recover the Tobit coefficients for the intercept and the dummy variable (gender), the scale parameter, and the mean value of "gender" and the intercept. But differently from the mfx package for Probit/Logit, the Tobit function from the AER package doesn't return the marginal effect of gender on years of education nor its standard error.

So, I was wondering if 1) someone knows how to recover the ME and the ME's standard error from the output of the AER's tobit function or if 2) someone is aware of a function that works like probitmfx does for Probit? Thanks once again.

1

There are 1 answers

0
Vincent On

You may want to try the marginaleffects package. (Disclaimer: I am the maintainer.)

library(AER)
library(marginaleffects)
data("CollegeDistance")
model <- tobit(education ~ gender, left = 0, data = CollegeDistance, x= TRUE)
mfx <- marginaleffects(model)
summary(mfx)
## Average marginal effects 
##       type         Term  Effect Std. Error z value Pr(>|z|)   2.5 %  97.5 %
## 1 response genderfemale -0.0351    0.05222 -0.6722  0.50148 -0.1374 0.06725
## 
## Model type:  tobit 
## Prediction type:  response