A simplified version of my data looks like the following:
Here, amount corresponds to amount produced in a sector, by year. The total corresponds to all the output produced in that year.I want to calculate the growth in total (first difference it)- or generate Total(t+1)-Total(t)
Is thee a way to do this that does not involve me declaring my data as panel?
Just to be clear, this variable should take on a value of "." for the year 1999 and a value of 140 for the year 2000.
Thanks!
Code:
* Example generated by -dataex-. To install: ssc install dataex clear input float(Amount Year Total) 12 1999 38 23 1999 38 3 1999 38 23 2000 178 123 2000 178 32 2000 178 end
Here, amount corresponds to amount produced in a sector, by year. The total corresponds to all the output produced in that year.I want to calculate the growth in total (first difference it)- or generate Total(t+1)-Total(t)
Is thee a way to do this that does not involve me declaring my data as panel?
Just to be clear, this variable should take on a value of "." for the year 1999 and a value of 140 for the year 2000.
Thanks!
Comment