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
Installing "femlogit"Hi there, I am using STATA from a server which is not connected to the internet and therefore does …
Sample sizeHi everyone, Any of you have suggestions on how to calculate a sample size for a finite population?…
Formulating a Parametric Translog Input Distance Function in order to get technical efficiency and elasticity of substitutionI am using a panel data set for the manufacturing industries (firm-level data) for about 20 years, w…
Drop all values other than month-end dates where the dates dont always end on standard monthend say there would be a value 27th May.Hi, I have a file with a date column and 5 other daily return columns. File attached. I use the bel…
How to? Chi test of homogeneity for categorial variablesHi guys, Below i have included a sample of my two categorial variables. How do i perform a Chi^2 te…
Subscribe to:
Post Comments (Atom)
0 Response to How to sum variable by year for specific group id
Post a Comment