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

st: to check if a variable already exists

From   Jacob Wegelin <>
Subject   st: to check if a variable already exists
Date   Mon, 6 Oct 2008 18:20:06 -0400 (EDT)

Is there a way to check whether a variable is already defined, already exists? I'd like to write code of the following sort:

if (variable called performance is not yet defined) {
gen performance=.
replace performance=5 if name=George

Thanks for any ideas


Jacob A. Wegelin Assistant Professor
Department of Biostatistics
Virginia Commonwealth University
730 East Broad Street Room 3006
P. O. Box 980032
Richmond VA 23298-0032
* For searches and help try:

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