Here is my code which does essentially the same as Maarten's (for a
different data setup) but I would strongly suggest standardizing your
differences with standard errors for the _differences_ calculated
using an inner bootstrap - a double bootstrap (I have not done this) -
as you do not know if your statistic is pivotal or not. See the
relevant discussion for Hausman statistics in Cameron and Trivedi, pg.
374 & pg. 378.
/* Bootstrap the difference of two statistics */
clear
// ssc install ineqdeco, replace
webuse nlswork, clear
keep idcode year ttl_exp
reshape wide ttl_exp, i(idcode) j(year)
cap prog drop ineqdeco_bs
program define ineqdeco_bs, rclass
version 10
syntax varlist(max=2 min=2) [if] [in]
marksample touse
tokenize `varlist'
local first `1'
macro shift
local second `*'
ineqdeco `first' if `touse'
scalar ge68 = r(ge1)
ineqdeco `second' if `touse'
scalar ge69 = r(ge1)
return scalar ge = ge68-ge69
ereturn post, esample(`touse')
end
bootstrap Dge = r(ge), reps(2000) dots: ineqdeco_bs ttl_exp68 ttl_exp69
/* End */
---References ---
@book{cameron2005mma,
title={{Microeconometrics: methods and applications}},
author={Cameron, A.C. and Trivedi, P.K.},
year={2005},
publisher={Cambridge University Press}
}
On Fri, May 8, 2009 at 1:44 PM, Maarten buis <[email protected]> wrote:
>
> --- On Fri, 8/5/09, Gianluca Cafiso wrote:
>> I need to test if the concentration index (CI) for a sample
>> of geo-units has changed over time trough a bootstrap
>> procedure. <snip> (as done in Brulhart+Traeger 2005).
>>
>> To compute the index, I have used the "ineqdeco"
>> routine separately on the Employment variable for t1 and then
>> on the one for t2.
>>
>> However, I do not know how to implement the bootstrap test.
> <snip>
>
> Please give full references, and not just a author/year reference.
> This is discussed in the Statalist FAQ.
>
> I don't know if this makes sense, I am no expert on these inequality measures, but the general strategy is to collect the different
> models in one program and return the statistic of interest:
>
> *---------- begin example ----------------
> sysuse auto, clear
> capture program drop bootdiff
> program define bootdiff, rclass
> tempname for
> sum mpg if foreign == 1, meanonly
> scalar `for' = r(mean)
> sum mpg if foreign == 0, meanonly
> return scalar diff = `for' - r(mean)
> end
> bootstrap diff=r(diff), reps(100):bootdiff
> *---------- end example --------------------
>
> -----------------------------------------
> Maarten L. Buis
> Institut fuer Soziologie
> Universitaet Tuebingen
> Wilhelmstrasse 36
> 72074 Tuebingen
> Germany
>
> http://home.fsw.vu.nl/m.buis/
> -----------------------------------------
>
>
>
>
> *
> * 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/
>
--
To every ω-consistent recursive class κ of formulae there correspond
recursive class signs r, such that neither v Gen r nor Neg(v Gen r)
belongs to Flg(κ) (where v is the free variable of r).
*
* 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/