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 at the end of May, and its replacement, statalist.org is already up and running.


[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

st: Change variable


From   Ay <yuniphone@yahoo.co.id>
To   statalist@hsphsun2.harvard.edu
Subject   st: Change variable
Date   Sat, 10 Sep 2011 07:27:00 +1000

I am using stata 11.0

How can i generate or change a variable that contains for instance, educational level or father and mother as 'Type'?
The variables are in strings format.

The reason i am asking this question is that, i want to merge these 'type' variable (var B) with other variable.
I could not do this since the second file only has variable A as individual id variable. While in the first file, it has var A and var B ('type' or level variable) as unique Id.

If anyone knows other ways besides generating the type variable before merging, I really appreciate it.

Variable a
1,2,1,1,2,3,3

Variable b(type)
A,A,B,C,B,C,A

Many thanks.

Regards,

Yun





*
*   For searches and help try:
*   http://www.stata.com/help.cgi?search
*   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   |   Site index