[Date Prev][Date Next][Thread Prev][Thread Next][Date index][Thread index]
st: RE: panel data
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.
> 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
> Tab SelfEmployedAtSomePoint
> List personal_number year1 employment1 year2 employment2..... If
> From: "Andrey V. Ivanov" <firstname.lastname@example.org>
> 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: