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

From |
"Apostolos Ballas" <aballas@aueb.gr> |

To |
statalist@hsphsun2.harvard.edu |

Subject |
st: RE: RE: RE: Re: RE: Multiple commands under "By varlist"? |

Date |
Sat, 26 Jun 2004 20:58:05 +0300 |

It is probably that I am dim, but since I have a very similar problem (ie, many simulations which take hours) can some please explain how the following example works. Thanks a lot for the help. Apostolos -----Original Message----- From: owner-statalist@hsphsun2.harvard.edu [mailto:owner-statalist@hsphsun2.harvard.edu] On Behalf Of Nick Cox Sent: Saturday, June 26, 2004 5:26 PM To: statalist@hsphsun2.harvard.edu Subject: st: RE: RE: Re: RE: Multiple commands under "By varlist"? In this I referred to Michael Blasnik. 14 seconds later he posted a similar point. Clearly this should be written up in supermarket trash newspapers as an Amazing Coincidence. Nick n.j.cox@durham.ac.uk Nick Cox > > 2. The way -if- is implemented. The > command > > regress returns factor if `i' == month > > is implemented by testing every observation > to see whether it should be included in > the regression. In your case 99.9% of > the observations are irrelevant to each > regression, but Stata takes no special > action to avoid that. You should be > able to substitute -if- by -in-: > > gen long obsno = _n > sort month port > forval i = 1/1000 { > local min = ... > local max = ... > regress returns factor in `min'/`max' > ... > } > > and by Blasnik's Law this should be much faster. * * 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/

**Follow-Ups**:**st: Re: RE: RE: RE: Re: RE: Multiple commands under "By varlist"?***From:*"Michael Blasnik" <michael.blasnik@verizon.net>

**References**:**st: RE: RE: Re: RE: Multiple commands under "By varlist"?***From:*"Nick Cox" <n.j.cox@durham.ac.uk>

- Prev by Date:
**st: St: est2tex & xtabond** - Next by Date:
**st: Re: RE: RE: RE: Re: RE: Multiple commands under "By varlist"?** - Previous by thread:
**st: Re: RE: RE: Re: RE: Multiple commands under "By varlist"?** - Next by thread:
**st: Re: RE: RE: RE: Re: RE: Multiple commands under "By varlist"?** - Index(es):

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