From | "Cowell, Alexander J." <[email protected]> |
To | "'[email protected]'" <[email protected]> |
Subject | st: bootstrap |
Date | Fri, 3 Oct 2003 17:43:09 -0400 |
Hi there
I am using Stata version 8 and wish to bootstrap two ratios (ratio6 and ratio12). The ratios are combinations of regression coefficients from two separate regressions. When I type the bootstrap command
bootstrap "cer" ratio6 ratio12, r(1) trace
I get the response:
ratio6 not found error in statistic: ratio6 r(111);
This is maddening, because I used to bootstrap all the time using older versions of Stata.
Here is the "cer" program:
program cer, rclass version 8.0 tempname y6 y12 c6 c12 use "/projects/p6/07572.005/effectiveness/data/analysis1.dta", clear logit mj jt2 jt3 jbtc t2 t3 rapcourt nonwhite gender age trsk, or nolog cluster(id) scalar `y6' = _b[jt2]*100 scalar `y12' = _b[jt3]*100 use "/projects/p6/07572.005/cost/data/cost_analysis.dta", clear xtreg jt0 jt2 jt3 jbtc t0 t2 t3 nonwhite gender age rapcourt trsk, re i(id) scalar `c6' = _b[jt2] scalar `c12' = _b[jt3] return scalar ratio6 = `c6'/`y6' return scalar ratio12 = `c12'/`y12' end
I think it's something simple, but I just don't get it! The trace option in bootstrap doesn't seem to help here.
Thanks in advance
Alex Cowell
|
© Copyright 1996–2024 StataCorp LLC | Terms of use | Privacy | Contact us | What's new | Site index |