Hi everyone,
I have following data. I want to create variable ROA t+1 which is next period ROA. I need to put next year ROA for ROAt+1 at each year. for example, I need to put ROA for 1964 in ROAt+1 at year 1963 as following data.
ID fyear ROA ROA t+1
001000 1962 0 0
001000 1963 0 3.672316
001000 1964 3.672316 -8.528138
001000 1965 -8.528138 6.748971
001000 1966 6.748971 -3.664495 and for all other years
001000 1967 -3.664495
001000 1968 8.737305
001000 1969 6.150738
001000 1970 1.668161
001000 1971 -7.903171
001000 1972 11.17697
001000 1973 8.557255
001000 1974 8.737031
001000 1975 9.554486
001000 1976 8.899601
001000 1977 4.37933
001001 1978 0
001001 1979 0
001001 1980 11.176
001001 1981 8.737
001001 1982 6.748
001001 1983 8.06108
001001 1984 6.995758
001001 1985 6.522345
Could you please help me with the Stata command?
I have following data. I want to create variable ROA t+1 which is next period ROA. I need to put next year ROA for ROAt+1 at each year. for example, I need to put ROA for 1964 in ROAt+1 at year 1963 as following data.
ID fyear ROA ROA t+1
001000 1962 0 0
001000 1963 0 3.672316
001000 1964 3.672316 -8.528138
001000 1965 -8.528138 6.748971
001000 1966 6.748971 -3.664495 and for all other years
001000 1967 -3.664495
001000 1968 8.737305
001000 1969 6.150738
001000 1970 1.668161
001000 1971 -7.903171
001000 1972 11.17697
001000 1973 8.557255
001000 1974 8.737031
001000 1975 9.554486
001000 1976 8.899601
001000 1977 4.37933
001001 1978 0
001001 1979 0
001001 1980 11.176
001001 1981 8.737
001001 1982 6.748
001001 1983 8.06108
001001 1984 6.995758
001001 1985 6.522345
Could you please help me with the Stata command?
Comment