[Date Prev][Date Next][Thread Prev][Thread Next][Date index][Thread index]

From |
Olena Stavrunova <ostavrun@blue.weeg.uiowa.edu> |

To |
statalist@hsphsun2.harvard.edu |

Subject |
st: How many statistics can be bootstrapped by one program? |

Date |
Sun, 18 Aug 2002 14:23:53 -0500 |

Dear Sirs, I need to bootstrap a large number of statistics, actually, it is 5 statistics, calculated for the different year-category groups of the data set. Up to now I have no luck in obtaining bootstrap estimates for the number of statistics larger than 4. I use the following program, which works fine for 4 statistics : program define jobflo version 6.0 if "`1'" == "?" { global S_1 "POS_98 NEG_98 POS_99 NEG_99" exit } local i=1998 while `i'<=1999 { summarize pos if year == `i' local bf`i' = r(sum) summarize neg if year == `i' local cd`i' = r(sum) summarize xit if year == `i' local ef`i' = r(sum) local gh`i' = `bf`i' ' / `ef`i'' local jk`i' = `cd`i' '/`ef`i'' local i = `i'+1 } post `1' `gh1998' `jk1998' `gh1999' `jk1999' end However, if I add one more statistic for calculation so that the program looks like: program define jobflo1 version 6.0 if "`1'" == "?" { global S_1 "POS_98 NEG_98 NET_98 POS_99 NEG_99 NET_99" exit } local i=1998 while `i'<=1999 { summarize pos if year == `i' local bf`i' = r(sum) summarize neg if year == `i' local cd`i' = r(sum) summarize xit if year == `i' local ef`i' = r(sum) local gh`i' = `bf`i'' / `ef`i'' local jk`i' = `cd`i''/`ef`i'' local tf`i' = `gh`i'' - 'jk`i'' local i = `i'+1 } post `1' `gh1998' `jk1998' `tf1998' `gh1999' `jk1999' `tf1998' end I get the Stata message " 'jk1998' invalid name". Please, note, that I added one more statistic for calculation, which is tf`i' and that 'jk1998' did not create any problems in the first program. PLease, note also, that in the data set there are only 4 variables called pos, neg, xit, year I would highly appreciate, if somebody explains me what can be the reason of my problem. Thank you very much. Olena Olena Stavrunova S216 Pappajohn University of Iowa Iowa City, IA 52242-1000 (319)335-0494 * * 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/

**Follow-Ups**:**st: Bootstrap and percentages***From:*"Michael R. Smith" <smith@leacock.lan.mcgill.ca>

- Prev by Date:
**st: question re:merge** - Next by Date:
**st: Further: Does your academic discipline use logit regressionswith interaction terms?** - Previous by thread:
**st: generating sums** - Next by thread:
**st: Bootstrap and percentages** - Index(es):

© Copyright 1996–2017 StataCorp LLC | Terms of use | Privacy | Contact us | What's new | Site index |