I have data that resembles the following:
Code:
* Example generated by -dataex-. To install: ssc install dataex clear input float(individual year value) 1 1999 .2 2 1999 .54 3 1999 .66 1 2000 0 2 2000 0 3 2000 .4 end
In the above, I have information on a variable "value" by individual i, for year t. However, I need to relativize the values for each individuals by those of individual 1. Specifically, for each year, I wish to divide the variable value for each individual by the value of the 1st individual. So, for the year 1999, the variable value should be replaced by value/2, that for 2000 should be replaced by value/0 and so on.
Any guidance on this is much appreciated!
Thanks,
CS
0 Response to Performing operations by values of a specific unit, by year
Post a Comment