Good day everyone,
I am still an undergrad student so please excuse any elementary questions.
I am busy with a project on trade. The data set has import and export countries (i.e. bilateral) across several years (with year and month columns too), which also shows the different products traded together with their monetary values and quantities. However, it should be noted that the values and quantities are entered on a monthly basis. I created country pairs (and allocated numerical values to these). All I really want to do is create a line graph depicting the trade of the different products for each year with the monthly aggregates of each product within that specific year for the specified country pair. And then, a line graph with the yearly totals for each product trade in the specified country pair.
However, to do this I need to aggregate the monthly values for the specified product and country pair first for the specified year and from a whole lot of Googling, thought I might need to do something with the collapse command.
Any assistance would be greatly appreciated as it is of great urgency.
Related Posts with Aggregating variables
Confusion about create matching pair id for conditional logistic regressionDear Statalisters, I use -ccmatch- creating match pair of fdz (0 1) base on condition of (size0 ind…
How to explain the results of t2way5 i.e. Tukey's Two-Way Analysis by MediansDear Stata users, Nick Cox had written a command named -t2way5- (SSC) to execute Tukey's Two-Way An…
converting nominal stock returns into real stock returnsHi This is a basic question but thought someone in macroeconomics or finance (or any related discip…
dynamic panel estimation using OLS - what am I missing?I am writing up research using the excellent xtabond2 to estimate correlates of economic growth usin…
Mundlak procedureDear all, When using the Mundlak procedure, if one wishes to include year fixed effects (i.e. a dum…
Subscribe to:
Post Comments (Atom)
0 Response to Aggregating variables
Post a Comment