Dear statalists,
As freshman of STATA, I'm currently facing a problem of understanding the execution of nested loops. Part of my project needs of integrate the effect of cigarettes. Variables including type of cig (1=filter, 2=non-filter, 3=hand-rolled), kind/brand of cig (maximum is 7), amount of smoking cig (pack)and starting and stopping age of each kind of cig (from 1 to 93, and we only documented cig with time length longer than 1 year) .The commands like below:

I feel puzzled about the reason of set CigEt `k' as 0 here, in fact, I am wondering the order or execution of these 3 nested loops.
Looking forward your reply. Thank you very much!
Yue
As freshman of STATA, I'm currently facing a problem of understanding the execution of nested loops. Part of my project needs of integrate the effect of cigarettes. Variables including type of cig (1=filter, 2=non-filter, 3=hand-rolled), kind/brand of cig (maximum is 7), amount of smoking cig (pack)and starting and stopping age of each kind of cig (from 1 to 93, and we only documented cig with time length longer than 1 year) .The commands like below:
I feel puzzled about the reason of set CigEt `k' as 0 here, in fact, I am wondering the order or execution of these 3 nested loops.
Looking forward your reply. Thank you very much!
Yue
Comment