Stata The Stata listserver
[Date Prev][Date Next][Thread Prev][Thread Next][Date index][Thread index]

st: RE: how to insheet an excel spreadsheet into panel format


From   "Nick Cox" <[email protected]>
To   <[email protected]>
Subject   st: RE: how to insheet an excel spreadsheet into panel format
Date   Thu, 14 Apr 2005 23:43:59 +0100

You need read in the data and then to learn about -reshape-. 
Several questions this week already have given examples
and references. 

Please read the Statalist FAQ, which indicates several ways of 
finding out things for yourself. 

Nick 
[email protected] 

Glenn Wingard
 
> This may be an elementary question, but i'm completely new to 
> stata and hope 
> someone can help.
> I have a data-set in excel which lists countries in the first 
> column and 
> years in the first row like so:
> 
> Country Name	1960	1961	1962	1963
> Afghanistan	   4.13	   4.45	     4.88    9.17
> Albania	                  ..	    ..	        ..	..
> Algeria	            38.75    45.90   19.65    24.50
> American Samoa	    ..	    ..	         ..	   ..
> Andorra	                ..	 ..	      ..	..
> Angola	                 ..	 ..	      ..	..
> Antigua           	..	..	      ..	..
> Argentina	    7.60     5.99	4.69	7.89
> Armenia	                ..	..	      ..	..
> Aruba	                 ..	  ..	       ..	 ..
> Australia	     14.24   15.79	14.74	16.84
> Austria	23.69	  23.39   24.25	     24.48     ..
> 
> I want to insheet this into stata in a panel format like so:
> 
> country         	year	POP	openc
> Aruba	               1960	-999	-999
> Aruba	               1961	-999	-999
> Aruba	               1962	-999	-999
> Aruba	               1963	-999	-999
> Andorra	               1960	-999	-999
> Andorra	               1961	-999	-999
> Andorra	              1962	-999	-999
> Afghanistan	     1960	-999	-999
> Afghanistan	     1961	-999	-999
> Afghanistan	     1962	-999	-999
> Afghanistan	    1963	-999	-999
 

*
*   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–2024 StataCorp LLC   |   Terms of use   |   Privacy   |   Contact us   |   What's new   |   Site index