Notice: On March 31, it was **announced** that Statalist is moving from an email list to a **forum**. The old list will shut down on April 23, and its replacement, **statalist.org** is already up and running.

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

From |
Ronan Conroy <rconroy@rcsi.ie> |

To |
"statalist@hsphsun2.harvard.edu" <statalist@hsphsun2.harvard.edu> |

Subject |
Re: st: "Label define" syntax for "all other values" |

Date |
Fri, 24 Sep 2010 14:51:53 +0100 |

On 24 MFómh 2010, at 11:52, Nick Cox wrote:

The straight answer is that -label define- does not offer the syntaximagined. In addition to Eric's strategy, another isclonevar rr_job2 = rr_job replace rr_job2 = 5 if !inlist(rr_job, 1, 2, 3, 4)label def rr_job2 1 "Driver" 2 "Conductor" 3 "Brakeman" 4 "Fireman"5 "Stata user"label val rr_job2 rr_job2 -recode- is here naturally an alternative to -replace-.

Ronán Conroy Associate Professor Division of Population Health Sciences ================================= rconroy@rcsi.ie Royal College of Surgeons in Ireland Epidemiology Department, Beaux Lane House, Dublin 2, Ireland +353 (0)1 402 2431 +353 (0)87 799 97 95 +353 (0)1 402 2764 (Fax - remember them?) http://rcsi.academia.edu/RonanConroy P Before printing, think about the environment * * 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/

**References**:**Re: st: "Label define" syntax for "all other values"***From:*Dan Waldo <dan_waldo@yahoo.com>

**RE: st: "Label define" syntax for "all other values"***From:*Nick Cox <n.j.cox@durham.ac.uk>

- Prev by Date:
**Re: st: R: Estimating the number of workers in each industry in each district - flag: Stata 9/2 SE** - Next by Date:
**Re: st: Meta-analysis questions** - Previous by thread:
**RE: st: "Label define" syntax for "all other values"** - Next by thread:
**RE: st: "Label define" syntax for "all other values"** - Index(es):