I have a variable (foodgr) which is divided into 4 categories (1,2,3,4).
I have another variable, volume, which lists the weight of each of these categories.
I want to create another variable which combines the volume of all of these 4 categories into one.
The only thing is that the volume for each of these categories was measured every week, and hence I have multiple data entries from the same ID
Could Anyone please advise me on how to create a new variable where the volume of the foodgr variable is combined?
THANKYOU
Related Posts with Combining the values of different categories into ONE with a repeated ID
Every time I type the command 'mmsel', I get a 'file tmp / xfbf.dta not found' error.I try to implement wage decomposition based on Machado and Mata (2005). I would be grateful if you c…
Takes forever to run regressionI searched this forum and there were several posts about taking forever to run a specific regression…
How to convert strings to date variable?For example, a date of 81.511, corresponds to 06/07/1981(DMY). How do you convert this to a Stata da…
percentage change of lagged variableI have another related query on generating lagged variables. My regression model looks like this: In…
Factor variables vs. dummy variables with interactionsHi all, I have a dummy variable x1 (no missing values) in the dataset and has values of 0 and 1, an…
Subscribe to:
Post Comments (Atom)
0 Response to Combining the values of different categories into ONE with a repeated ID
Post a Comment