The original dataset has the following structure:
group_id | year | varx
1 1998 5
1 1998 5
1 1999 2
2 1998 1
2 1998 1
2 1998 1
2 1999 3
The outcome should look like:
group_id | year | varx
1 1998 10
1 1999 2
2 1998 3
2 1999 3
Thank you for your suggestions!
Related Posts with How to sum variable by year for specific group id
IV Regression With Interaction Terms and 2+ InstrumentsDear all, Greetings to all contributors from someone new to the forum and a user of Stata 15.1/SE. …
Meta-analysis subgroup difference testingHi, I need some advice please. I am conducting a meta-analysis. I have subgroups (male/female, whit…
Histogram with differences in sharesHello, I have the following problem in Stata: I want to construct a histogram showing the differen…
IV Regression With Interaction Terms and 2+ InstrumentsDear all, Greetings to all contributors from someone new to the forum and a user of Stata 15.1/SE. …
ppmlhdfe standard errors Newey westHello Statalist users, I have a question regarding the ppmlhdfe command. More precisely, I have a (…
Subscribe to:
Post Comments (Atom)
0 Response to How to sum variable by year for specific group id
Post a Comment