Bookmark and Share

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]

st: drop range of variables meeting condition in another variable


From   "Tamer Farag" <tfarag@medicine.umaryland.edu>
To   "Statalist" <statalist@hsphsun2.harvard.edu>
Subject   st: drop range of variables meeting condition in another variable
Date   Mon, 18 Mar 2013 15:53:02 -0400

Dear All,

I am working with a case control dataset with gene clusters variables.  I have approx 100 observations, a handful of essential variables, but approx. 14,000 variables for each observation that represent gene clusters (absent/present, 0/1).  The gene variables are all located next to each other in the dataset (i.e., gene1-gene14000).

I would like to drop variables for gene clusters that are not present among my cases.  Obviously, specifying each gene cluster variable would be impractical.

Is there any way to do this in Stata?  I'm stumped.

Many thanks,
Tamer

Tamer H. Farag, Ph.D.
Research Associate Epidemiologist
Center for Vaccine Development
University of Maryland School of Medicine
685 W. Baltimore Street, HSF 480
Baltimore, Maryland  21201, USA
Office. +1 410 706-8439
Mobile.  +1 410 818-9654
Fax. +1 410 706-6205
tfarag@medicine.umaryland.edu


Confidentiality Statement:
This email message, including any attachments, is for the sole use of the intended recipient(s) and may contain confidential and privileged information.  Any unauthorized use, disclosure or distribution is prohibited.  If you are not the intended recipient, please contact the sender by reply email and destroy all copies of the original message. 

*
*   For searches and help try:
*   http://www.stata.com/help.cgi?search
*   http://www.stata.com/support/faqs/resources/statalist-faq/
*   http://www.ats.ucla.edu/stat/stata/


© Copyright 1996–2014 StataCorp LP   |   Terms of use   |   Privacy   |   Contact us   |   Site index