Notice: On April 23, 2014, Statalist moved from an email list to a forum, based at statalist.org.
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
RE: st: RE: on restructuring of panel datasets
From
Nick Cox <[email protected]>
To
"'[email protected]'" <[email protected]>
Subject
RE: st: RE: on restructuring of panel datasets
Date
Thu, 27 Jan 2011 21:25:07 +0000
There is some discussion of "long long" at
http://www.stata.com/support/faqs/data/reshape3.html
Nick
[email protected]
[email protected]
thanks a lot. the reason is that VAR1, VAR2, etc are sectoral profits. I would
like to run a common regression of profits on the other variables. For this
reason, I am doing this restructuring.
Nick Cox <[email protected]>
As far as Stata is concerned this is already a panel dataset. It is difficult to
see why you want this restructure, which would break that.
But what you ask for is possible through -reshape long-.
[email protected]
I would like to ask for help with the reorganizing of a panel dataset. I
have a panel data set with the following structure:
Firm date VAR1 VAR2 VAR3 (other vars follow)
1 1 0 1 2
1 2 1 2 3
1 3 2 3 1
2 1 . . .
2 2 . . .
2 3 . . .
3 1
3 2
3 3
VAR1 VAR2 VAR3 actually are sub-elements of a general variable VAR.
I would like to create the following series where these variables are combined
in
a single variable VAR for all firms:
On the example of firm 1, I would like to get:
Firm date VAR
1 1 0
1 1 1
1 1 2
1 2 1
1 2 2
1 2 3
1 3 2
1 3 3
1 3 1
and so on.
I also have other variables in the dataset but I guess they will be reordered
automatically with respect to this order.
*
* 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/