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

From |
Richard Williams <Richard.A.Williams.5@nd.edu> |

To |
statalist@hsphsun2.harvard.edu |

Subject |
RE: st: RE: Taking averages, etc. |

Date |
Wed, 17 Dec 2003 08:52:53 -0500 |

At 01:30 PM 12/17/2003 +0000, Nick Cox wrote:

Just so I'm clear as to what you mean: If I understand this correctly, if the statement is something likeLet's not lose sight of where we started. Stata has standard constructs if ... { } else { } too; the point is that the conditional testing cannot be vectorised.

if x1==1 {

and x1 = 1 for the FIRST case, then the statement is true, otherwise false; it won't matter what x1 = for the 2nd case. So, this kind of structure is not useful for case by case changes. It is useful for things like your earlier

if r(N) == 0 su mpg

where the value of r(N) (or whatever) is not going to change case by case. Sound right?

-------------------------------------------

Richard Williams, Associate Professor

OFFICE: (574)631-6668, (574)631-6463

FAX: (574)288-4373

HOME: (574)289-5227

EMAIL: Richard.A.Williams.5@ND.Edu

WWW (personal): http://www.nd.edu/~rwilliam

WWW (department): http://www.nd.edu/~soc

*

* 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**:**RE: st: RE: Taking averages, etc.***From:*"Nick Cox" <n.j.cox@durham.ac.uk>

**References**:**Re: st: RE: Taking averages, etc.***From:*Richard Williams <Richard.A.Williams.5@nd.edu>

**RE: st: RE: Taking averages, etc.***From:*"Nick Cox" <n.j.cox@durham.ac.uk>

- Prev by Date:
**st: RE: What is a 200% improvement?** - Next by Date:
**st: Stata' new merge** - Previous by thread:
**RE: st: RE: Taking averages, etc.** - Next by thread:
**RE: st: RE: Taking averages, etc.** - Index(es):

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