Stata The Stata listserver
[Date Prev][Date Next][Thread Prev][Thread Next][Date index][Thread index]

Re: st: Concordance


From   "Dev Vencappa" <[email protected]>
To   <[email protected]>
Subject   Re: st: Concordance
Date   Thu, 29 Jan 2004 15:32:56 +0000

Leuven replied to Agelos. May I add something else.

Agelos
 you mentioned that HSSUB is a subset of HS. From what you sent us, the two look similar. If they are not similar, then an additional thing to do would be to create a new variable from HSSUB that would be equal to HS. For instance if HSSUB= 1001100000005, then you know that HSSUB is a subset of HS=1001100000. So something like this should work:

gen HS1=int(HSSUB/1000)

Of course,  that's assuming HS and HSSUB are run together numeric variables. Otherwise you would need to transform then to run-together numeric variables. And then merge the two together using the joinby command or the merge command. I tend to prefer the joinby command as it saves you from having to sort out the two data sets you need to merge.

Dev


They look similar to me here.

>>> [email protected] 01/29/04 02:54pm >>>
Dear Statalisters


I have a concordance that maps two classification codes (numerical values)

 HS		    SIC87	

 1001.10.0000       01110	
 1001.10.0010       01110	
 1001.10.0090       01110	
 1006.10.0000       01120
 1005.10.0000       01150
 1005.90.2000       01150
 1005.90.4060       01150
 1201.00.0020       01160
 0708.20.2000       01190
 0708.90.0000       01190
 1207.20.0000       01313
 1207.20.0090       01313
 5201.00.1010       01313
 1209.11.0000       01330
 1212.91.0000       01330
 1212.92.0000       01330
 0701.10.0000       01340
 0701.10.0020       01340

I also have two series the first, HSSUB, is a subset of HS and the second, X, that gives the value of a variable for the 
corresponding HS classification.

 HSSUB		    X

 1001.10.0000       500	
 1005.10.0000       1500
 1201.00.0020       3254
 1207.20.0000       1245
 1212.91.0000       8261
 1212.92.0000       2483
 0701.10.0000       12354
 0701.10.0020       12480

What I want to do is to create a new variable that gives the corresponding SIC87 classification
from the above concordance, ie

 HSSUB		    VALUE	SIC87
				
 1001.10.0000       500		01110	
 1005.10.0000       1500	01150
 1201.00.0020       3254	01160
 1207.20.0000       1245	01313
 1212.91.0000       8261	01330
 1212.92.0000       2483	01330
 0701.10.0000       12354	01340
 0701.10.0020       12480	01340



Thank you in advance

Agelos Delis

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


*
*   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–2024 StataCorp LLC   |   Terms of use   |   Privacy   |   Contact us   |   What's new   |   Site index