Statalist The Stata Listserver

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

st: RE: Using one variable to label another

From   "Nick Cox" <[email protected]>
To   <[email protected]>
Subject   st: RE: Using one variable to label another
Date   Mon, 20 Nov 2006 12:49:46 -0000

Please don't use a posting in one thread 
to start another.  

What you want may be -labmask- from -labutil- on SSC. 

[email protected] 

Doogar, Rajib
> In Stat 9.2, how can I use the values of v2 (str 40, say) to label v1
> (int)?  My data looks something like this:
> V1      V2
> 1234    somerandomstring1
> 1234    somerandomstring1
> 2345    somerandomstring2
> ....
> 6578    somerandomstringn
> ....
> etc.
> I tried to encode v2 and then attach the resulting label to v1.  I
> encoded v2 all right, but then got stumped by how correctly 
> to link the
> labels to the values of v1.  Encoding v2 gave me labels numbered 1 to
> xxx, but v1 is a four digit number (although it does take exactly xxx
> distinct values).

<irrelevant thread deleted> 

*   For searches and help try:

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