Statalist The Stata Listserver


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

st: AW: re: simple list of panel data for output


From   "Thomas Erdmann" <[email protected]>
To   <[email protected]>
Subject   st: AW: re: simple list of panel data for output
Date   Sun, 21 Jan 2007 14:35:41 +0100

Thanks for the fast reply. 

What I still could not solve is how to integrate string variables here,
especially regarding the -collapse- process. 

I.e. showing the respective "country" or another variable that is filled
with strings. Sorry if I'm overlooking something obvious. 

- Tom 



______________________
 
Thomas Erdmann
Buetzmattweg 22
79594 Inzlingen 
Germany
 
+ 49 (0) 176 - 24 23 89 34
+ 41 (0) 76 - 592 08 95 
[email protected]
 
 
 

-----Urspr�ngliche Nachricht-----
Von: [email protected]
[mailto:[email protected]] Im Auftrag von Kit Baum
Gesendet: Sonntag, 21. Januar 2007 13:58
An: [email protected]
Betreff: st: re: simple list of panel data for output

Tom said:

A rather basic question, but I have tried around with -table-, -list-  
and
-collapse- and did not really arrive at the output I want.

For my panel data (200 firms, monthly observations, panelvar=ISIN,
timevar=yrm (i.e. 2005m12))  I want to create a simple summary list like


Name		ISIN		country	free-float	#month	#spells	...

Company1	2323		GER		0.4		60
1
Company2	9023		UK		0.7		82
2


I would limit the sample by -e(sample)- but have problems with  
combining the
different data types, i.e. company name, ISIN and country are the  
same over
all observations, free-float should be equal to the value of the  
variable at
one point of time (say 2005m12), #month should count the number of  
month per
company and #spells obviously present the results from -tsspell- from  
ssc.


webuse grunfeld,clear
g y50 = (year==1950)
bys company: gen inv50=sum(y50*invest)
tsspell,c(invest>L.invest)
egen nspell=max(_spell),by(company)
collapse (sum) inv50 (mean) nspell (count) year, by(company)
list
outsheet using tom.txt, replace
type tom.txt


Kit Baum, Boston College Economics
http://ideas.repec.org/e/pba1.html
An Introduction to Modern Econometrics Using Stata:
http://www.stata-press.com/books/imeus.html


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


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