Statalist The Stata Listserver


[Date Prev][Date Next][Thread Prev][Thread Next][Date index][Thread index]

RE: st: Wide to Panel


From   "Nick Cox" <n.j.cox@durham.ac.uk>
To   <statalist@hsphsun2.harvard.edu>
Subject   RE: st: Wide to Panel
Date   Tue, 17 Oct 2006 14:21:13 +0100

I think David means -reshape long-. These data
are already wide. 

For the renaming, consider -renpfix-. 

By the way, apologies for premature empty postings
in this and sometimes other threads. I can't 
work yet whether the issue is mailer, keyboard
or PICNIC (problem in chair, not in computer). 

Nick 
n.j.cox@durham.ac.uk 

David Kantor
> 
> Start by Stat/Transferring these into Stata.
> 
> But your column names of  "1985", "1986" , etc. will get rendered as, 
> I believe, "_1985", "_1986", etc..
> 
> Each of those needs to be further renamed to have a common prefix 
> that is distinct for the given table.  Presumably, each table is one 
> variable, so the prefix should correspond to that variable.  Thus, if 
> the table is "number of employees" you should rename the variables 
> something like
>   nemp1985, nemp1986, etc.
> If your table is about revenue, then name them rev1985, rev1985, etc.
> 
> (You could, alternatively, change the column names in the Excel 
> tables.  But in any case, for the transfer to go smoothly, the Excel 
> tables need to be "clean" -- have just the column names in the first 
> row, and the data in all subsequent rows.)
> 
> Do this for each table.
> Then you will want to merge all the tables together.
> 
> Presumably you also want to -reshape wide-.  That could come before 
> or after the merge.

*
*   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/



© Copyright 1996–2014 StataCorp LP   |   Terms of use   |   Privacy   |   Contact us   |   What's new   |   Site index