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
About unbalanced panel(I have a data set , 12 countries and a period of 10 years which of them have different year period, …
Iv-ppmlI am trying to implement IV-PPML in stata and fairly new to this command. I am using the “ivpoisson”…
Using a loop to compare observations of a variableHi All, I have a dataset which looks something like below: ID Amount month max_amount max_month N…
Kaplan Meier risk table problemDear Statalist, I am using Stata 14.2 on Mac. I have created a propensity score IPT weighted sample…
runby: requirements for group variable?** This post references a previous forum discussion (https://www.statalist.org/forums/node/1484556) …
Subscribe to:
Post Comments (Atom)
0 Response to Combining the values of different categories into ONE with a repeated ID
Post a Comment