Announcement

Collapse
No announcement yet.
X
  • Filter
  • Time
  • Show
Clear All
new posts

  • Converting monthly data to annual

    Hi,

    I have a dataset with monthly migration data for the years 1999-2018. Basically, I want to convert the monthly data to annual sums, so that I have for every country one observation per year, e.g. Afghanistan/1999/4500 ; Albania/1999/568 etc. What would be the easiest way? Any advice is much appreciated! Thanks, David.
    Click image for larger version

Name:	stata.jpg
Views:	1
Size:	148.9 KB
ID:	1449464



  • #2
    Have a look at
    Code:
    help collapse
    And please do also read the advice on hwo to post data examples in the FAQ: https://www.statalist.org/forums/help#stata
    Makes it a lot easier for people to provide exact code, and increases chances of (useful) answers

    Comment


    • #3
      Thanks for your advice, Jorrit, it worked with the collapse command.

      Comment

      Working...
      X