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


From   Richard Herrell <>
Subject   RE: st: STATA Vs. SAS
Date   Wed, 27 Nov 2002 13:16:33 -0600 (CST)

Nick is absolutely right that part of the problem is simply not seeing how
to do it in Stata.  I know I'd use Stata more if I didn't simply have to
face learning how to do something in a new language when I could do it in
my sleep in SAS.  Every time I spend time working in Stata I'm impressed
by how well it's put together but end up returning to SAS for data

One example of something I couldn't see how to do in Stata: In SAS I
frequently use if ... then/else if ... then/else structures in the data
step.  For example, in SAS I'd write:

if x=0 then y=1;
else if 1 < x < 10 then y=2;
else if 11 < x < 20 then y=3;
else y=.  

I know I can write a series if...then statements in Stata, but writing a
structured statement that ends when the first true condition is met is
more efficient code, and I find I seem to have a hard time getting all the
conditions met correctly in Stata when the conditions get complicated.

On Wed, 27 Nov 2002, Nick Cox wrote:

> I think Stata's developers (and at least one user-programmer)
> would like to see specific suggestions of what
> is easier to do in SAS, to help influence
> the agenda.
> Sometimes -- but not always -- it turns out
> that the facilities exist; it is just not
> transparent how to use them.
> Nick
> *
> *   For searches and help try:
> *
> *
> *

*   For searches and help try:

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