Bookmark and Share

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   rado645-bg@yahoo.de
To   statalist@hsphsun2.harvard.edu
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 <n.j.cox@durham.ac.uk>
An: "statalist@hsphsun2.harvard.edu" <statalist@hsphsun2.harvard.edu>
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 
n.j.cox@durham.ac.uk 

rado645-bg@yahoo.de

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/


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