I am trying to compare variables to different variables of different observations within a group - and I am not sure if this is even possible in Stata.
I would like to count the number of alive siblings alive at age 5 (or alternatively the age of the death) of the observed child.
From the data, I have been able to generate the first four columns, but need to construct a column along the lines of column 5 here.
HH //// Child //// Age at Survey ////Age at Death //// Number of siblings alive at age 5(/at age of death)
1 //////// 1 //////////// 18 //////////////////////////// 4 //////////////////// 1
1 //////// 2 //////////// 15 //////////////////////////// - //////////////////// 1
1 //////// 3 //////////// 11 //////////////////////////// - //////////////////// 2
1 //////// 4 //////////// 8 //////////////////////////// - //////////////////// 2
2 //////// 1 //////////// 4
...
(Age at survey for those who have died simply means the age they would be today)
Can anyone help?
I would like to count the number of alive siblings alive at age 5 (or alternatively the age of the death) of the observed child.
From the data, I have been able to generate the first four columns, but need to construct a column along the lines of column 5 here.
HH //// Child //// Age at Survey ////Age at Death //// Number of siblings alive at age 5(/at age of death)
1 //////// 1 //////////// 18 //////////////////////////// 4 //////////////////// 1
1 //////// 2 //////////// 15 //////////////////////////// - //////////////////// 1
1 //////// 3 //////////// 11 //////////////////////////// - //////////////////// 2
1 //////// 4 //////////// 8 //////////////////////////// - //////////////////// 2
2 //////// 1 //////////// 4
...
(Age at survey for those who have died simply means the age they would be today)
Can anyone help?
Comment