Stata The Stata listserver
[Date Prev][Date Next][Thread Prev][Thread Next][Date index][Thread index]

st: RE: -bootstrap- of decomposition by user-written -jmp2- package


From   "Jann Ben" <ben.jann@soz.gess.ethz.ch>
To   <statalist@hsphsun2.harvard.edu>
Subject   st: RE: -bootstrap- of decomposition by user-written -jmp2- package
Date   Fri, 2 Dec 2005 22:23:13 +0100

Michael Buryak asks how to bootstrap results from -jmp2-. 
This can be done, for example, as follows:

  capture program drop bs_jmp2
  program bs_jmp2, rclass
  // Michals original commands
    ...
    jmp2 ...
  // return results from jmp2 as scalars
    ret scalar D = el(r(DD),1,1)
    ret scalar E = el(r(DD),1,2)
    ret scalar U = el(r(DD),1,3)
    ...
  end

  set seed #
  bootstrap D=r(D) E=r(E) U=r(U) ..., nodrop: jmp_bs

The "nordop" option is important, because jmp2 is not an 
e-class program and does not set e(sample). To speed up the 
bootstrap procedure, Michael should drop unused cases before 
applying the bootstrap. For example:

  preserve
  keep if inlist(year,1975,1979) & inlist(ethnicity,0,1)
  set seed #
  bootstrap D=r(D) E=r(E) U=r(U) ..., nodrop: jmp_bs
  restore

  
  bootstrap D=r(D) E=r(E) U=r(U) ..., nodrop: jmp_bs

> -----Original Message-----
> From: owner-statalist@hsphsun2.harvard.edu 
> [mailto:owner-statalist@hsphsun2.harvard.edu] On Behalf Of 
> Michael Buryak
> Sent: Friday, December 02, 2005 8:44 PM
> To: statalist@hsphsun2.harvard.edu
> Subject: st: -bootstrap- of decomposition by user-written 
> -jmp2- package
> 
> 
> Hi!
> Help me, please!
> 
> I'm trying decomposition by -jmp2- package. Syntax looks like this:
> 
> -------------------------------------start
> example-------------------------------------------------------
> -------------
> reg ln_incms age age_sq marital educ if  year==1975 &  ethnicity==1
> estimates store ashkenazi_75
> reg ln_incms age age_sq marital educ if  year==1975 &  ethnicity==0
> estimates store mizrahi_75
> reg ln_incms age age_sq marital educ if  year==1979 &  ethnicity==1
> estimates store ashkenazi_79
> reg ln_incms age age_sq marital educ if  year==1979 &  ethnicity==0
> estimates store mizrahi_79
> jmp2 ashkenazi_75 mizrahi_75 ashkenazi_79 mizrahi_79 , 
> benchmark(1) reference(1)
> -------------------------------------end
> example-------------------------------------------------------
> ---------------
> 
> I need to test significant of decomposition results by 
> -bootstrap- method.
> Help me, please. What will I add to the syntax?
> I really need your help
> 
> Thank you in advance,
> Michael Buryak <michael.buryak@gmail.com>
> Department of Labor Studies,
> Tel-Aviv University, Israel
> 
> *
> *   For searches and help try:
> *   http://www.stata.com/support/faqs/res/findit.html
> *   http://www.stata.com/support/statalist/faq
> *   http://www.ats.ucla.edu/stat/stata/
> 

*
*   For searches and help try:
*   http://www.stata.com/support/faqs/res/findit.html
*   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   |   What's new   |   Site index