Hi,
I have a longitudinal dataset that contains three waves of data from a cohort of older adults. Data was collected every 3 years. One of the questions in the study asks the adults to list the ages of each of their children at each wave. I've reshaped the data long to show a sample of the children within each adult/parent (ID). However, I also included the wide version too as an example.
Theoretically, the order of the children are supposed to be constant across the waves - (i.e. "Please list the age of child #1" should force the parent to list the same child's age in each wave. Same with child #2, and #3, etc.). Unfortunately, I have some suspicions that the roster of children may have gotten mixed up across the waves in certain scenarios since some ages do not increase by ~3 years over time (or alternatively just bad data too...). For example, some children gain 15 years between two waves, and others decrease in age.
(I have a feeling this almost certainly won't work...) BUT I've been asked (just to check) to sort the ages of the children from lowest to highest within each wave just to see if the ages increase by ~3 years each wave. Essentially, if by ignoring the "number" of the child, do the ages make more sense across the waves than how they currently are now - Is there a way to sort observations independently of each other though?
Best,
David
Wide Data:
Long Data:
Picture example in case too:
I have a longitudinal dataset that contains three waves of data from a cohort of older adults. Data was collected every 3 years. One of the questions in the study asks the adults to list the ages of each of their children at each wave. I've reshaped the data long to show a sample of the children within each adult/parent (ID). However, I also included the wide version too as an example.
Theoretically, the order of the children are supposed to be constant across the waves - (i.e. "Please list the age of child #1" should force the parent to list the same child's age in each wave. Same with child #2, and #3, etc.). Unfortunately, I have some suspicions that the roster of children may have gotten mixed up across the waves in certain scenarios since some ages do not increase by ~3 years over time (or alternatively just bad data too...). For example, some children gain 15 years between two waves, and others decrease in age.
(I have a feeling this almost certainly won't work...) BUT I've been asked (just to check) to sort the ages of the children from lowest to highest within each wave just to see if the ages increase by ~3 years each wave. Essentially, if by ignoring the "number" of the child, do the ages make more sense across the waves than how they currently are now - Is there a way to sort observations independently of each other though?
Best,
David
Wide Data:
Code:
clear input str70 ID byte wave_1_child_age1 int wave_2_child_age1 byte wave_3_child_age1 "CBBGF" 15 19 24 "DFRHQ" 16 9 21 "FSGLP" 19 15 26 "LVEKH" 22 26 28 "EDBXY" 24 28 31 "HMRXD" 30 24 36 end
Code:
clear input str70 ID byte(Child wave_1_child_age) int wave_2_child_age byte wave_3_child_age "CBBGF" 1 15 19 24 "DFRHQ" 1 16 9 21 "DFRHQ" 2 13 5 15 "DFRHQ" 3 11 . 10 "DFRHQ" 4 13 . 9 "DFRHQ" 5 4 . . "EDBXY" 1 24 28 31 "EDBXY" 2 20 25 29 "EDBXY" 3 15 23 26 "EDBXY" 4 11 14 18 "EDBXY" 5 8 12 15 "EDBXY" 6 6 10 13 "EDBXY" 7 4 11 11 "FSGLP" 1 19 15 26 "FSGLP" 2 18 15 25 "FSGLP" 3 14 3 21 "FSGLP" 4 13 . 18 "FSGLP" 5 11 . 16 "FSGLP" 6 7 . . "FSGLP" 7 2 . . "FSGLP" 8 13 . . "FSGLP" 9 11 . . "HMRXD" 1 30 24 36 "HMRXD" 2 27 21 32 "HMRXD" 3 25 19 28 "LVEKH" 1 22 26 28 "LVEKH" 2 14 19 21 "LVEKH" 3 7 12 14 end
Comment