I need to destring a variable 'foreign_id' so I can declare a dataset to be panel as follows:
xtset foreign_id year, yearly
However, my variable 'foreign_id' is constructed as follows:
firm foreign_id
1 5011x
1 5011x
1 5011x
2 0017
2 0017
2 0017
etc.
I guess the solution is to get rid of the 'x' part. Anyone know how I can easily do this so I am left with:
firm foreign_id
1 5011
1 5011
1 5011
2 0017
2 0017
2 0017
Thanks,
Marilyn.
*
* 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/