mgf_unbal

Computes the average marginal effect (AME) of an explanatory variable after xtprobitunbal.

Syntax

mgf_unbal [if] [in], dydx(marginvar) [val0(#) val1(#)]

where marginvar should fit to one of the following cases: lag, d.varname or c.varname.

marginvar case Description

lag to compute the effect of a discrete change (from 0
to 1) of the lagged dependent variable.
d.varname to compute the effect of a discrete change of the
variable varname.
c.varname to compute the marginal effect of an infinitesimal
change of the continuous variable varname.

When d.varname is specified, the user can use the options val0(#) and val1(#).
The command will compute the marginal effect of a discrete change in the variable varname when it changes from the value set in val0 to the value set in val1. Defaults values are val0(0) and val1(1).

Examples

Setup: the examples bellow require the package to be installed with ancillary files

. ssc install xtprobitunbal, all replace

Load the data

. sysuse exportunbal

Estimate the model (see xtprobitunbal for further details)

. xtprobitunbal export size trend med_skill age, meansvars(size med_skill)

Marginal effect of the lagged dependent variable

. mgf_unbal, dydx(lag)

Marginal effect of a continuous change in an exogenous variable

. mgf_unbal, dydx(c.med_skill)

Marginal effect of a discrete change in an exogenous variable

. mgf_unbal, dydx(d.age)

Marginal effect of a discrete change, from 2 to 3, in an exogenous variable

. mgf_unbal, dydx(d.age) val0(2) val1(3)

Stored results

mgf_unbal stores the following in r():

Macros:

r(nobsAME) : total number of observations used in computing the AME

r(ngr_AME) : number of groups (individuals) used in computing the AME

r(AME) : average marginal effect (AME)

r(seAME) : standard error of AME

r(zst_AME) : test statistic

r(pval_AME) : p-value

Authors

Pedro Albarran

Universidad de Alicante

albarran@ua.es

Raquel Carrasco

Universidad Carlos III de Madrid

rcarras@eco.uc3m.es

Jesus M. Carro

Universidad Carlos III de Madrid

jcarro@eco.uc3m.es

License

This code is licensed under GPLv3

References

Albarran, P., R. Carrasco and J. Carro. 2019. Estimation of Dynamic Nonlinear Random Effects Models with Unbalanced Panels. Oxford Bulletin of Economics and Statistics, 81(6), 1424-1441.