Statalist


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

st: label after recode


From   Christopher Intemann <intemann@gmail.com>
To   statalist@hsphsun2.harvard.edu
Subject   st: label after recode
Date   Thu, 20 Mar 2008 10:17:56 +0100

hello,
in order to fit the distribution of wildtypes/genotypes in my population, I want to change the order of the values coded in
z1_gene_x.
I'm using the recode command:


. tab z1_gene_x

group(z1_ge |
ne) | Freq. Percent Cum.
------------+-----------------------------------
G | 8 0.17 0.17
T | 4,684 99.83 100.00
------------+-----------------------------------
Total | 4,692 100.00

. do "/var/folders/Ap/ApCQ38MhEhOChovPWnfmSU+++TI/-Tmp-//SD02588.000000"

. recode z1_gene_x 1=2 2=1
(z1_gene_x: 4692 changes made)

.
end of do-file

. tab z1_gene_x

group(z1_ge |
ne) | Freq. Percent Cum.
------------+-----------------------------------
G | 4,684 99.83 99.83
T | 8 0.17 100.00
------------+-----------------------------------
Total | 4,692 100.00

It seems like recode actually does what it is supposed to.
However, it does not change the label, what is somehow confusing.
According to the manual, recode supports the label option, but not for just keeping the label...
Thanks for any hint,
Chris

*
* 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/




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