Statalist


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

st: Combine two variables in a dataset


From   <M.Sanchez-Sache@lse.ac.uk>
To   <statalist@hsphsun2.harvard.edu>
Subject   st: Combine two variables in a dataset
Date   Wed, 10 Oct 2007 18:26:50 +0100

Hi all
 
I'm trying to find the command two combine two variables in a dataset, but I couldn't find what I need. I check the -stack- and -stak- commands, but they don't perform the type of variable combination I need. 
 
I have two variables "division" and "model"
 
DIVISION                  MODEL
Acura                              TL
Acura                              TL
Acura                              NSX-T
Acura                              NSX-T
Acura                              RL
Acura                              CL
Acura                              CL
 
and I want to create one variable out of these two, say "car"
 
    CAR
Acura TL
Acura  TL
Acura  NSX-T
Acura  NSX-T
Acura  RL
Acura  CL
Acura  CL
 
I need to do that because I have another dataset with the variable "car" and I want to merge these two datasets.
 
Thanks!
 
Marta.

 

Please access the attached hyperlink for an important electronic communications disclaimer: http://www.lse.ac.uk/collections/secretariat/legal/disclaimer.htm

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