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
Problem with saving graphs with wildcard in namesHi there! I'm having some difficulties saving and combining graphs that I have created using a fore…
Removing duplicates across several variables in panel data and keep the dup with non-missing valuesHi As the title suggests, I am trying to remove duplicate values across several variables (c30) in …
Reassigning records with missing values to existing categories considering the existing distribution within the populationDear Statalist, I am struggling to reassign records with a missing value on the categorical variabl…
Seemingly Unrelated Regression with endogeneity and sample selectionHello everyone! I wish to see the impact of income from an activity on various types of household ex…
xtreghello, I have a dataset on which I want to perform an OLS. The dataset looks like this: dependent v…
Subscribe to:
Post Comments (Atom)
0 Response to Aggregating variables
Post a Comment