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

Re: st: Using 2 stage Heckmen Sample Selection with Lags in STATA

From   "Seema Bhatia" <>
To   <>
Subject   Re: st: Using 2 stage Heckmen Sample Selection with Lags in STATA
Date   Thu, 2 Aug 2007 10:38:22 +0100

Hi Austin

Thanks for your input.

In my case, bilateral trade between a country pair (Xij) is measured as
import value (CIF import values in US$ deflated by the appropriate price
deflator) i.e. exports from country j are imports into country i as it is
done in a standard gravity model. this bilateral trade in sub Saharan Africa
is being modelled as a function of gdps, populations, distance,
landlockedness, contiguity, some calculated infrastructure indices and
regional trade groups etc. in order to study the impact of trade agreements
within the region.

In terms of the missing data, I am lucky to have data for a lot of the
country pairs since these are all in Sub Saharan Africa where data is a huge
issue, particularly those that are war torn and in the early years of my
analysis (1985-1994). I have scouted all possible datasources and compiled
the import values where missing.

There are two issues with the missing data. There are both zeroes or no data
available for several country pairs over the years. Since my major data
source has made that distinction specifically, I have decided that zero will
be an answer (meaning there was zero trade) while I still need to account
for the missing values/not reported (meaning we dont know if there was trade
or not) data - the pattern for this is non random which is why I am keen on
using a sample selection bias correction method to account for it.

A Hausman test has also revealed that I am required to fit a random effects
model for my analysis. So I was hoping that I could do this within the
Panel-Heckman setting. Am exploring gllamm at the moment but am still quite
unclear on how to go about it as econometrics is not really my forte.

Please let me know if I have given you enough details here, as a typical PhD
wannabe, I usually tend to think everyone knows what i am talking about.

Many thanks


> Seema--
> I think I already answered the question about the -heckman- approach
> likely being hard in your panel data, or perhaps impossible without a
> significant investment in learning -gllamm- on your part, or perhaps
> writing new routines.  But I still don't see necessary detail in your
> description of the data--how are you measuring trade?  Volume of
> exports+imports?  Net exports?  Indicator for any trade at all? Why is
> there missing data as opposed to just zeros for your LHS var?  If
> you've got trade measured as a strictly positive variable and missings
> where no trade exists, then you can replace trade=0 if mi(trade) and
> run xtpoisson with country pair fixed effects, right?
> On 8/1/07, Seema Bhatia <> wrote:
>> Thanks for this response - but I am not sure how to carry on. Having done
>> the Hausman Test, I have to fit a random effects model to study bilateral
>> trade as a function of gdps, populations, distance, landlockedness,
>> contiguity, cultural similarities and membership of trade blocs amongst
>> other things.
>> My panel contains cross sectional data for 26 country pairs over 21
>> years. I
>> will be breaking this panel down into shorter time frames anyway (5 year
>> periods). However, I have a huge problem related to missing data on the
>> LHS
>> (bilateral trade) and therefore need to model it. I was hoping that the
>> answer lies in using the Hechman Sample Selection model - the non random
>> pattern of the missing values could be modelled using the Heckman two
>> stage
>> analysis.
>> Has anyone done this attempted this? I have seen this sample selection
>> method being used in recent economic literature quite a lot on panels.
>> There
>> is also possible endogeneity issues within the model which is why lags
>> (first difference particularly) was something I am interested in looking
>> at.
>> However, it is a much smaller problem as compared to my problem of
>> missing
>> data and therefore I need to correct for the latter first.
>> I would be grateful for further guidance on the issue and would
>> appreciate
>> any code out there to help me do this.
>>> Seema--
>>> As Stas indicated in a prior post
>>> ( you
>>> cannot run -heckman- on panel data, though the -gllamm- and -ssm-
>>> (both available via -findit-) commands may provide alternatives. There
>>> are other alternatives out there, but you may not get much useful
>>> guidance without providing more info about your specific model.
> *
> *   For searches and help try:
> *
> *
> *

*   For searches and help try:

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