Socrates,
If you don't have many parents, you could try:
gen t = _n
tsset t
gen tt=l.t
gen parentn = 1 if Parent==A
replace parentn = 2 if Parent==X
replace parentn = 3 if Parent==Z
replace parentn = l.parentn if l.t==tt & parentn ==.
. If have a lot of families, this approach might not be practical.
Robert
Robert A. Yaffee, Ph.D.
Research Professor
Shirley M. Ehrenkranz
School of Social Work
New York University
home address:
Apt 19-W
2100 Linwood Ave.
Fort Lee, NJ
07024-3171
Phone: 201-242-3824
Fax: 201-242-3825
[email protected]
----- Original Message -----
From: Maarten buis <[email protected]>
Date: Saturday, November 18, 2006 8:11 am
Subject: Re: st: Data Manipulation Question
> --- Socrates Mokkas <[email protected]> wrote:
> > I have a question related to data manipulation. My data sample is
> > like that:
> >
> > Parent Subsidiary
> > A B
> > C
> > D
> > F
> > X J
> > L
> > Z T
> >
> > What I want is to fill the gaps of the ParName.
>
> Socrates:
> Something similar came up on the list recently: have a look at the
> thread started with:
> http://www.stata.com/statalist/archive/2004-07/msg00297.html
> HTH,
> Maarten
>
>
>
> -----------------------------------------
> Maarten L. Buis
> Department of Social Research Methodology
> Vrije Universiteit Amsterdam
> Boelelaan 1081
> 1081 HV Amsterdam
> The Netherlands
>
> visiting address:
> Buitenveldertselaan 3 (Metropolitan), room Z434
>
> +31 20 5986715
>
> http://home.fsw.vu.nl/m.buis/
> -----------------------------------------
>
>
>
> ___________________________________________________________
> All New Yahoo! Mail � Tired of Vi@gr@! come-ons? Let our SpamGuard
> protect you. http://uk.docs.yahoo.com/nowyoucan.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/