Statalist The Stata Listserver


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

st: RE: panel data


From   "Nick Cox" <n.j.cox@durham.ac.uk>
To   <statalist@hsphsun2.harvard.edu>
Subject   st: RE: panel data
Date   Mon, 10 Jul 2006 20:09:55 +0100

This is really not a good idea. 

Generally, a long structure 
is easier to work with in Stata than a wide one, 
especially when panel calculations are needed. 

Specifically, Andrey's structure is already long and a 
solution for his case is already known, so there 
is no gain in this particular case either. 

Incidentally, as -Gen-, -Replace-, etc. are illegal
commands in official Stata, capitalising -gen-, -replace-, 
etc. can at best puzzle and at worst confuse.  

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

Siddharth Kharkar

> if those are the  only things you
> want to do, would converting the data from long to wide format help?
> 
> Then, you could possibly have a variable "SelfEmployedAtSomePoint"
> 
> Gen SelfEmployedAtSomePoint="No"
> Replace SelfEmployedAtSomePoint="Yes" if
> employment1=="self-emp"|employment2=="self-emp"....
> 
> Tab SelfEmployedAtSomePoint
> List personal_number year1 employment1 year2 employment2..... If
> SelfEmployedAtSomePoint=="Yes"

> From: "Andrey V. Ivanov" <aivanov@rumms.uni-mannheim.de>
 
> Suppose I have the following data:
> 
> personal_number	employment	year
> 1			perm		1997
> 1			perm		1998
> 2			un-Emp	1997
> 2			self-emp	1998
> 3			perm		1997
> 3			self-emp	1998
> 4			self-emp	1997
> 4			perm		1998
> 
> Now, I want Stata to tell me how many people were 
> self-employed in this
> data-set at SOME point in time. (3)
> 
> Next, I also want stata to list the whole employment history 
> of anyone who
> has been self-employed at SOME point in time.

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