Save Maximum of a Series
Posted: Thu Apr 14, 2016 8:24 am
Hey,
I have a panel data set which contains N cross-sections and T periods.
I would like to save the maximum value of a each cross section of a certain series and save the maximum value including the identifier as well as the date.
I thought of something like this:
However, this will assign the maximum value to all entries (i.e. for all N and T the same value).
I think it would help to use the @max command in the sampling environment, but I dont know how to apply it in this case.
Best
I have a panel data set which contains N cross-sections and T periods.
I would like to save the maximum value of a each cross section of a certain series and save the maximum value including the identifier as well as the date.
I thought of something like this:
Code: Select all
genr max=@max(series01, "@first @last if ident=""a""")
I think it would help to use the @max command in the sampling environment, but I dont know how to apply it in this case.
Best