Dear Statalist,
I would have a basic question and came to no clue after intensive search over the web.
I am using a panel dataset with repeated observations for individuals (and dyads) over several waves. However, I have used multiple imputation (10 imputations) and I cannot create a variable that counts for how many waves the dyads are in the dataset. Obviously, since I have repeated measurements for each of the 10 imputed dataset, I cannot apply something like:
Would you have any practical solutions to this problem?
Below you can find an example of my data structure ("_mi_m" is the imputation dataset number)
I would have a basic question and came to no clue after intensive search over the web.
I am using a panel dataset with repeated observations for individuals (and dyads) over several waves. However, I have used multiple imputation (10 imputations) and I cannot create a variable that counts for how many waves the dyads are in the dataset. Obviously, since I have repeated measurements for each of the 10 imputed dataset, I cannot apply something like:
Code:
bys dyad: gen nyear=[_N]
Below you can find an example of my data structure ("_mi_m" is the imputation dataset number)
Code:
* Example generated by -dataex-. For more info, type help dataex clear input float pid byte(dyad wave _mi_m) 1 1 1 1 1 1 1 2 1 1 1 3 1 1 1 4 1 1 1 5 1 1 1 6 1 1 1 7 1 1 1 8 1 1 1 9 1 1 1 10 1 1 2 1 1 1 2 2 1 1 2 3 1 1 2 4 1 1 2 5 1 1 2 6 1 1 2 7 1 1 2 8 1 1 2 9 1 1 2 10 1 1 4 0 1 1 5 0 1 2 1 1 1 2 1 2 1 2 1 3 1 2 1 4 1 2 1 5 1 2 1 6 1 2 1 7 1 2 1 8 1 2 1 9 1 2 1 10 1 2 2 1 1 2 2 2 1 2 2 3 1 2 2 4 1 2 2 5 1 2 2 6 1 2 2 7 1 2 2 8 1 2 2 9 1 2 2 10 1 2 4 0 1 2 5 0 2 4 1 1 2 4 1 2 2 4 1 3 2 4 1 4 2 4 1 5 2 4 1 6 2 4 1 7 2 4 1 8 2 4 1 9 2 4 1 10 2 4 2 1 2 4 2 2 2 4 2 3 2 4 2 4 2 4 2 5 2 4 2 6 2 4 2 7 2 4 2 8 2 4 2 9 2 4 2 10 2 4 3 1 2 4 3 2 2 4 3 3 2 4 3 4 2 4 3 5 2 4 3 6 2 4 3 7 2 4 3 8 2 4 3 9 2 4 3 10 2 4 4 0 3 3 2 0 3 3 4 0 3 3 5 0 end
Comment