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]
AW: st: RE: on restructuring of panel datasets
From
[email protected]
To
[email protected]
Subject
AW: st: RE: on restructuring of panel datasets
Date
Thu, 27 Jan 2011 21:19:09 +0000 (GMT)
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.
----- Ursprüngliche Mail ----
Von: Nick Cox <[email protected]>
An: "[email protected]" <[email protected]>
Gesendet: Donnerstag, den 27. Januar 2011, 14:53:34 Uhr
Betreff: st: RE: on restructuring of panel datasets
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-.
Nick
[email protected]
[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/
*
* 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/