hello and good day to all, this is a part of my data :
Code:
date    country    wpui_code    wpui    wtu    wui    total_exports    exports_to_here    wanted_ratio    pifscode
1996    GBR    112    .543355    0    .448996    1927.81    29.1937    .015143    112
1997    GBR    112    0    .448996    .762345    1938.62    29.3451    .015137    112
1998    GBR    112    0    0    .195784    1949.19    29.4834    .015126    112
1999    GBR    112    0    .762345    .543355    1960.88    29.6079    .015099    112
1996    AUT    122    .448996    0    .185858    1927.81    21.7556    .011285    122
1997    AUT    122    0    0    .195784    1938.62    21.8387    .011265    122
1998    AUT    122    0    .195784    .274734    1949.19    21.9861    .01128    122
1999    AUT    122    .195784    0    .309864    1960.88    22.1256    .011284    122
2000    AUT    122    0    .309864    .354524    1970.95    22.2675    .011298    122
2002    BEL    124    0    0    .304277    1978.08    17.539    .008867    124
2003    BEL    124    0    0    .21523    1984.28    17.5712    .008855    124
2004    BEL    124    .21523    0    .424575    1992.75    17.6989    .008882    124
I want to to calculate the new variables that is : y= sum of the (wanted_ratio )*wpui in any n countries and date.
z= sum of the (wanted_ratio )* wtu in any n countries and date.
x=sum of the (wanted_ratio )* wui in any n countries and date.
but pifscode should be equal to wpui_code.


I do not know, how can I calculate to generate the time series of these variables?
I hope I receive your guidance and help so soon. thank you so much.