[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

From |
Maarten buis <maartenbuis@yahoo.co.uk> |

To |
statalist@hsphsun2.harvard.edu |

Subject |
Re: st: Programming stata using egen functions |

Date |
Tue, 28 Apr 2009 16:45:00 +0000 (GMT) |

--- Anne Resende wrote: > 3)What is my aim? As I told I need to end up with one variable in > order to run the bootstrap. > I want to the create the program mymean and then run: > bootstrap r(eq2), reps(#) seed(#) : mymean loghw Why do you need to write a program for that? I can think of two ways of doing that that won't require you to write your own program: *-------------- begin example -------------------- sysuse nlsw88, clear gen lnw = ln(wage) bootstrap m=r(mean), reps(100) : sum lnw, meanonly reg lnw, vce(bootstrap, reps(100)) *---------------- end example -------------------- Anyhow, if you want to write a program to pass on to -bootstrap- then the results should definately not be returned as a variable. So even if I misunderstood your aim, and you need to write a program, then an -egen- function would in all likelihood still be inappropriate for what you want to do. If the example above does not do what you want to do, can you explain again what it is exactly that you want to do? Hope this helps, Maarten ----------------------------------------- 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/

**References**:**Re: st: Programming stata using egen functions***From:*Richard Ochmann <rochmann@diw.de>

- Prev by Date:
**st: RE: Negative eigen values in factor, pf command?** - Next by Date:
**AW: st: Programming stata using egen functions** - Previous by thread:
**Re: st: Programming stata using egen functions** - Next by thread:
**Re: st: Programming stata using egen functions** - Index(es):

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