Notice: On April 23, 2014, Statalist moved from an email list to a forum, based at statalist.org.
From | Grethe Søndergaard <dkstatstata@gmail.com> |
To | statalist@hsphsun2.harvard.edu |
Subject | Re: st: Problems with expand og reverting to original dataset |
Date | Thu, 20 Jan 2011 15:12:49 +0100 |
Thank you for your answers @ Nick Cox: I have tried to run bysort mother_id father_id (birth_date) : gen diff = birth_date[2] -birth_date[1]. However, an error message appear: "factor variables and time-series operators not allowed". Can I solve this problem - by somehow changing the type of variable that birth_date is? @ Ada Ma: My dataset consists of more than two siblings per family (one line for each person). I am not sure how to find out which siblings to be included in the dataset, if more than two siblings are being compared. E.g. a family consists of children age 1, 4, and 8 (so who should stay in the dataset). So that is why I choose only to include persons with one siblings. 2011/1/20 Nick Cox <njcoxstata@gmail.com>: > Nick > > On Thu, Jan 20, 2011 at 1:28 PM, Ada Ma <heu034@googlemail.com> wrote: >> How does your original dataset looks like? >> >> One line of data per person or one line of data per pair of siblings? >> Do you always have 2 siblings or do you have more than 2 siblings? > * > * For searches and help try: > * http://www.stata.com/help.cgi?search > * http://www.stata.com/support/statalist/faq > * http://www.ats.ucla.edu/stat/stata/ > * * For searches and help try: * http://www.stata.com/help.cgi?search * http://www.stata.com/support/statalist/faq * http://www.ats.ucla.edu/stat/stata/