[R] Robust vce for heckman estimators

Achim Zeileis Achim.Zeileis at uibk.ac.at
Mon Jul 11 23:40:29 CEST 2011

On Mon, 11 Jul 2011, Mateus Rabello wrote:

> When using function heckit() from package ???sampleSelection???, is 
> there anyway to make t-tests for the coefficients using robust 
> covariance matrix estimator? By ???robust??? I mean something like if a 
> had an object ???lm??? called ???reg??? and then used:
>> coeftest(reg, vcov = vcovHC(reg)).

You can do essentially the same for selection models with sandwich 
standard errors. For example:


data("PSID1976", package = "AER")
PSID1976$nwincome <- with(PSID1976, (fincome - hours * wage)/1000)

reg <- selection(participation ~ nwincome + education + experience +
     I(experience^2) + age + youngkids + oldkids,
   log(wage) ~ education + experience + I(experience^2),
   data = PSID1976)

coeftest(reg, vcov = sandwich)

Simple "sandwich" standard errors are available while other "vcovHC" 
standard errors (such as HC2, HC3, etc.) are not available for many models 
beyond linear regression.

Note also that I used the selection() function above which is typically 
preferable to heckit(), because the former produces the maximum likelihood 
foot. The latter by default produces the 2-step estimator which is 
nowadays usually only of interest in replication studies.


> I???m asking this because in Stata we could use function heckman and 
> then use vce option ???robust???. We could do the same for cluster.
> In a more general way, is there anyway to use another covariance matrix 
> to make t-test (e.g. linear hypothesis) for heckit (selection) models?
> Thanks,
> Mateus Rabello
> 	[[alternative HTML version deleted]]

More information about the R-help mailing list