Calculate marginal effect in Probit model with log-transformed covariate

4 visualizaciones (últimos 30 días)
I have using probit to regress my model with dependent variable as a binary variable, and have 5 out of 6 of my covariates transformed into log form. So my X 1 by 6 vector would be
X=[X1 logX2 logX3 logX4 logX5 logX6]
But I don't know whether I am writing the right code to calculate the marginal effect after I got my beta estimated.
%define X_bar as average of all covariates and Log_X_bar be the average of the logged covariates
X_bar=[mean(X1) mean(X2) mean(X3) mean(X4) mean(X5) mean(X6)]
Log_X_bar=[mean(X1) mean(logX2) mean(logX3) mean(logX4) mean(logX5) mean(logX6)]
So I use the following formula to get the marginal for x2, for example
So I wrote the following matlab code to get the marginal for all X's
normpdf(Log_X_bar*b2)*b2./X_bar'
But I don't know whether this code is correct

Respuestas (0)

Categorías

Más información sobre Conditional Mean Models en Help Center y File Exchange.

Community Treasure Hunt

Find the treasures in MATLAB Central and discover how the community can help you!

Start Hunting!

Translated by