Code:
 *====================================================================*
*WIERSEMA & BOWEN SMJ Limited Dependent Variable (2007) procedures      *
*====================================================================*

* Estimate Logit model
logit    patent ceo_dst
* Predict probability of patent, store values in variable pprob
predict pprob
* Define expression for X’s marginal effect to use in predictnl command
* Save marginal effect values in meX; standard error values in meX se
local vb b[ cons] + b[X]*X + b[Z]*Z
local phat (exp(‘vb’)/(1+exp(‘vb’)))
predictnl meX = ‘phat’*(1-‘phat’)* b[X], se(meX se)
* Compute z-statistic values and store in variable z stat
gen z stat = meX/meX se
* print summary statistics for marginal effect and z-statistic values
tabstat meX z stat, stats(mean min max)
* Graph marginal effect and z-statistic values (Figure 1)
graph twoway (scatter meX pprob) || ///
(scatter z stat pprob, yaxis(2)yline
(−1.96 1.96, axis(2)))
* Compute and save sample means of variables X and Z
egen meanX = mean(X)
egen meanZ = mean(Z)
* Determine value and significance of marginal effect at data means
local vb b[ cons] + b[X]*meanX + b[Z] *meanZ
local phat (exp(‘vb’)/(1+exp(‘vb’)))
nlcom meX means: ‘phat’*(1-‘phat’)* b[X]
nlcom meZ means: ‘phat’*(1-‘phat’)* b[Z]