sum up series in panel data set
Posted: Tue Nov 06, 2018 3:53 am
I have a panel data set which contains several series. I need to sum up the values for some cross sections (across identifiers, not time) depending on some specific conditions. I thought of something like this:
However, the values of test appear to be summed up across cross sections and over time. Is it necessary to write a loop which repeats the above procedure for each period separately or is there a simple command to do that?
Code: Select all
smpl @all if condition_a=1
series test=@sum(series_a)