Bookmark and Share

Notice: On April 23, 2014, Statalist moved from an email list to a forum, based at

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

st: reshape

From   Ozgur Ozdemir <>
To   Stata <>
Subject   st: reshape
Date   Wed, 26 Oct 2011 10:53:39 +0000

I would like to change of my data format using reshape. it seems, it is a great function however my variable names are a bit problematic. I have the following example

CompanyId, Tobin2000, Tobin01, Tobin02, Sales2000YE, Sales2001YE etc. All variables are on yearly basis.

Some variables have 01 for 2001, 02 for 2002 but some of them have exactly 2001, 2002 etc. Not sure, how I can use reshape command? 

my command below:

"reshape long Tobin sales@YE, i(Companyid) j(year) string"  does not help because stata creates both 01 and 2001. 
kind regards
Ozgur Ozdemir
Skype : ozgurozdemir2005
*   For searches and help try:

© Copyright 1996–2018 StataCorp LLC   |   Terms of use   |   Privacy   |   Contact us   |   Site index