Bookmark and Share

Notice: On March 31, it was announced that Statalist is moving from an email list to a forum. The old list will shut down on April 23, and its replacement, statalist.org is already up and running.


[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   jing liu <pku.liujing@gmail.com>
To   statalist@hsphsun2.harvard.edu
Subject   Re: st: Re: what is the difference between '.psel' and '.xbs' for heckman postestimation
Date   Wed, 21 Apr 2010 11:42:00 +0800

hi,

thanks a lot for your help.

but now I don't understand if 'twostep' in heckman regression doesn't
work with any weight command, then why there is no error message
coming up when i put them together. And it seems 'twostep' works with
weights command, because there are some outputs showed later, although
now i am doubting if they are correct.

best

Jing

On Tue, Apr 20, 2010 at 7:05 PM, Maarten buis <maartenbuis@yahoo.co.uk> wrote:
> --- 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, ///
>       aspect(1)
> *--------- 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
> computation.
>
>> 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
>
> --------------------------
> Maarten L. Buis
> Institut fuer Soziologie
> Universitaet Tuebingen
> Wilhelmstrasse 36
> 72074 Tuebingen
> Germany
>
> http://www.maartenbuis.nl
> --------------------------
>
>
>
>
>
> *
> *   For searches and help try:
> *   http://www.stata.com/help.cgi?search
> *   http://www.stata.com/support/statalist/faq
> *   http://www.ats.ucla.edu/stat/stata/
>



-- 
Best

刘京   Jing LIU

*
*   For searches and help try:
*   http://www.stata.com/help.cgi?search
*   http://www.stata.com/support/statalist/faq
*   http://www.ats.ucla.edu/stat/stata/


© Copyright 1996–2014 StataCorp LP   |   Terms of use   |   Privacy   |   Contact us   |   Site index