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
Bivariate and Multiple linear regressionHello guys, I have cross-sectional data and I intend to perform a bivariate (linear) regression and…
Intergrowth 21th neonatal birth weight standard commandHi all I am trying to calculate the proportion of newborns born small-for-gestational age for newbo…
Finding "new" occurrences in panel dataDear Stata Users, I am trying to identify when an observation is a "new "occurrence in within a pan…
marginal effects after Heckman Probit modelHi all, can anyone recall the command that one can use to estimate the marginal effects after a Heck…
Trouble with nested option in synthHi all, I am trying to use the user-contributed synth to estimate with synthetic control method. I a…
Subscribe to:
Post Comments (Atom)
0 Response to Aggregating variables
Post a Comment