Bookmark and Share

Notice: On April 23, 2014, Statalist moved from an email list to a forum, based at

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: st: Re: what is the difference between '.psel' and '.xbs' for heckman postestimation

From   Maarten buis <>
Subject   Re: st: Re: what is the difference between '.psel' and '.xbs' for heckman postestimation
Date   Tue, 20 Apr 2010 11:05:50 +0000 (GMT)

--- On Tue, 20/4/10, jing liu wrote:
> So after run -heckman- command, I should use -predict-
> command.

Not necesarily, but it can sometimes be useful, another
possibilty is to use the -margins- command.

> For stata 8 it was -predict varname, xbs-. The -xbs-
> is used to generate the probability that an observation
> will be selected or selection probability. But there is
> a -psel- option talking about the same thing in Stata11.
> So now I don't know > which one i should choose, and
> what is the difference between the -xbs- and -psel- now.

-xbs- is the linear predictor, and -psel- is the
probability. You can use -xbs- to create -psel-, or you
can use -psel- directly.

*------- begin example --------------
webuse womenwk, clear
heckman wage educ age, ///
        select(married children educ age)
predict double psel,psel
predict double xbs,xbs
gen double psel2 = normal(xbs)
twoway function y=x ||     ///
       scatter psel2 psel, ///
*--------- end example --------------

> thirdly, it was possible to use the following code to
> calculate inverse> mills ratio (gen testpr =
> normden(selxbpr)/norm(selxbpr)), now we are able
> to use subcommand (mills) to do the same thing, but
> the command (normden and > norm) doesn't not exis
> any more. are they changed? and what are they now?

they are now -normal()- and -normalden()-, alternatively
you can use the -nshazard- or -mills- options in 
-predict- to get those directly without any further

> forthly,  it says twostep doesn't work with any
> weight subcommand in heckman
> regression. But I run my heckman with both twostep and
> pweight/iweight. 

Well, that answers your first question: if you have 
weights then you have no choice, you'll have to use
the ML.

Hope this helps,

Maarten L. Buis
Institut fuer Soziologie
Universitaet Tuebingen
Wilhelmstrasse 36
72074 Tuebingen


*   For searches and help try:

© Copyright 1996–2018 StataCorp LLC   |   Terms of use   |   Privacy   |   Contact us   |   Site index