Suppose I have a data set such as:
obs 1 hhold 1 rd 1 income 5
obs 2 hhold 1 rd 2 income 10
obs 3 hhold 1 rd 3 income 6
obs 4 hhold 2 rd 1 income 10
obs 5 hhold 2 rd 2 income 10
obs 5 hhold 2 rd 3 income 12
I want to find the change in income across each round.
So, I would like to create a variable incomedifference
where:
obs 1: incomedifference = 0
obs 2: incomedifference = 5 (10 - 5 = 5)
obs 3: incomedifference = -4 (6 - 10 = -4)
obs 4: incomedifference = 0
obs 5: incomedifference = 0
obs 6: incomedifference = 2
I haven't really been following this discussion, but: