I have a dataset where I am trying to calculate the total value of the assets a household may hold. Each observation concerns a particular asset-class of a house per given year. For example, TV's in 2004 for a particular household would be an observation. And TV's for that same household in 2005 would be another observation. Except in the case of the first year, I am never given the total value of the assets a household might own, but I do know the value of any assets gained or lost. Therefore using this data, I want to create a variable for each observation that displays the total value of the assets of that class that a household owns for a given year (after calculating the gains and losses).
Previously, when I needed to manipulate variables of an observation based on different variables of a different observation (thanks to the great advice on this board) I would use sort and use the index. While this has worked well for previous situations, I'm having a difficult time solving this problem through that technique.
So what are other well-known ways of tackling this type of problem in Stata? Thanks!
Previously, when I needed to manipulate variables of an observation based on different variables of a different observation (thanks to the great advice on this board) I would use sort and use the index. While this has worked well for previous situations, I'm having a difficult time solving this problem through that technique.
So what are other well-known ways of tackling this type of problem in Stata? Thanks!
Comment