Stata The Stata listserver
[Date Prev][Date Next][Thread Prev][Thread Next][Date index][Thread index]

Re: st: Structure for making line by line changes?


From   Fred Wolfe <[email protected]>
To   [email protected]
Subject   Re: st: Structure for making line by line changes?
Date   Fri, 25 Apr 2003 15:30:41 -0500

At 12:06 PM 4/25/2003 -0700, you wrote:
Hello,

I am very new to Stata and am having some difficulty wrapping my brain around Stata's methods of data processing. I would like to be able to process a dataset line by line rather then all at once. I have found many references to the fact that "if" statements don't work as expected and a very good comparison between STATA and SAS which briefly mentions some of the paradigm shifts.

My question to the group is how would you deal with the line by line processing issue? I need to change each line based on a calulated value that is dependant upon data in that line.

The "if" qualifier would seem to solve this for some cases, but not when a program has to be called or a really complex comparison has to be done.

Nick's reply is to indicate that you really don't need to loop over observations. People coming from SAS very often think that you do. Using Stata, in some instances you might need to create an intermediate variable. Following up on Nick's reply, we have a problem thinking of cases where you really need to do it the way you suggest. Perhaps a specific example would clarify your problem for us.

Fred Wolfe



---------------------------------------------------------------------------- ------------------------
Fred Wolfe Tel (316) 263-2125
National Data Bank for Rheumatic Diseases Fax (316) 263-0761
Wichita, Kansas [email protected]
---------------------------------------------------------------------------- -------------------------

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




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