Bookmark and Share

Notice: On April 23, 2014, Statalist moved from an email list to a forum, based at statalist.org.


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

st: Re: RE: re: Re: forvalues, panel data


From   Christopher Baum <[email protected]>
To   "[email protected]" <[email protected]>
Subject   st: Re: RE: re: Re: forvalues, panel data
Date   Mon, 4 Oct 2010 09:10:24 -0400

<>
On Oct 4, 2010, at 2:33 AM, Nick wrote:

> Well, the original poster had 11 values. I think Kit's right that his method is superior for large problems or as a systematic approach for doing this repeatedly, but my advice was in the context of a very small specific problem. And anyone who doesn't check key coefficients very carefully deserves to get lousy results.


Point well taken. The issue I have (which comes up all the time with my students) that once having found a 'quick and dirty' way to solve a little problem, even if it is a but cumbersome, they stick with it when they face a larger version of the problem, or the need to apply the same transformation repeatedly. Sometimes it is well worth learning how to solve a problem efficiently even when you don't save that much typing or time doing so, as then the next time you have that 'canned' solution at hand.

A good example is the use of -forvalues- or -foreach-. Strictly speaking you don't have to use them, but when the number of values over which to iterate exceeds a handful, you're crazy not to do so, on the grounds of both saving time and reducing errors.

Kit

Kit Baum   |   Boston College Economics & DIW Berlin   |   http://ideas.repec.org/e/pba1.html
                              An Introduction to Stata Programming  |   http://www.stata-press.com/books/isp.html
   An Introduction to Modern Econometrics Using Stata  |   http://www.stata-press.com/books/imeus.html


*
*   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/


© Copyright 1996–2018 StataCorp LLC   |   Terms of use   |   Privacy   |   Contact us   |   Site index