[Date Prev][Date Next][Thread Prev][Thread Next][Date index][Thread index]

Re: st: Storing estimates from selmlog to apply oaxaca decomposition

From   n j cox <>
Subject   Re: st: Storing estimates from selmlog to apply oaxaca decomposition
Date   Mon, 29 Oct 2007 10:49:05 +0000

Please note the -cmdname- convention.

-selmlog- is a user-written program: see

Looking at the program quickly, I have these impressions:

0. -selmlog- seems to be at its version 12, for Stata 6 up.

1. -selmlog- itself is not eclass. Any estimates left
behind in memory will presumably be those of the last
eclass command run by -selmlog-.

2. Thus I wouldn't expect -selmlog- to work as well as you
would like with commands of the sort you want to use. The remedy
would appear to be some updating of the program.


I am trying to estimate caste pay gaps in India using the Oaxaca-Blinder
decomposition. This works fine for OLS regression models using the "regress"
command in Stata. I tried the suggestion of Ben Jann in statalist archives but
still run into problems when doing this after controlling for potential
selection bias using the "selmlog" command. What I am trying to do is the

e.g. OLS regression:
regress lnwage `xvarlist' if hhgrp == 1 , robust
est sto sc
regress lnwage `xvarlist' if hhgrp == 2 , robust
est sto gc
oaxaca sc gc

e.g. selection-corrected regression:
selmlog lnwage `xvarlist' if hhgrp == 1, sel(status = `xvarlist' `zvarlist')
dmf(2) bootstrap(100) gen(cprob1)
est sto sc
>>> error message -- last estimation results not found, nothing to store

/*selmlog lnwage `xvarlist' if hhgrp == 2, sel(status = `xvarlist' `zvarlist')
dmf(2) bootstrap(100) gen(cprob2)
est sto gc

cap drop _m1 _m2 _m3
gen _m1 = .
gen _m2 = .
gen _m3 = .
oaxaca sc gc

I am using selmlog version 1.3 and Stata version 9.

The error message suggest that no estimates are stored despite the fact that
e(b) and e(V) matrices are stored after running selmlog. Please could someone
help me understand how to store the estimated results post-selmlog so that I can
apply the oaxaca command?

* For searches and help try:

© Copyright 1996–2017 StataCorp LLC   |   Terms of use   |   Privacy   |   Contact us   |   What's new   |   Site index