Hello Stata people;
I'm using Stata version 13.1, I'm working with this data:
As you can see, it's a data about the GDP growth from 2016 to 2025 for some European countries. The idea behind my work is to study the GDP evolution of the North Countries vs. the South Countries. the North countries are: Germany, Austria, France and the Netherlands, the South contries are: Spain, Greece, Portugal and Italy.
Is there a way to:
- Already reshape my dataset for a better lecture
- Define those two regions and calculating the mean of the GDP growth for each region's countries (calculating the sum of the growth of each four countries, and then deviding that by 4)
- Drawing a time graph showing the GDP evolution of the North vs. the South regions by year.
I would appreciate the help.
Thanks!
I'm using Stata version 13.1, I'm working with this data:
Code:
* Example generated by -dataex-. To install: ssc install dataex clear input str11 time_period int time float observationvalue "Austria" 2016 107.685 "Austria" 2017 110.132 "Austria" 2018 112.868 "Austria" 2019 114.848 "Austria" 2020 107.592 "Austria" 2021 112.889 "Austria" 2022 118.907 "Austria" 2023 117.972 "Austria" 2024 117.194 "Germany" 2016 111.129 "Germany" 2017 114.238 "Germany" 2018 115.535 "Germany" 2019 116.665 "Germany" 2020 111.844 "Germany" 2021 116.217 "Germany" 2022 118.32 "Germany" 2023 117.291 "Germany" 2024 116.71 "Greece" 2016 81.166 "Greece" 2017 82.362 "Greece" 2018 84.062 "Greece" 2019 85.976 "Greece" 2020 78.07 "Greece" 2021 84.826 "Greece" 2022 89.698 "Greece" 2023 91.79 "Greece" 2024 93.875 "Spain" 2016 103.434 "Spain" 2017 106.43 "Spain" 2018 108.979 "Spain" 2019 111.116 "Spain" 2020 98.96 "Spain" 2021 105.574 "Spain" 2022 112.299 "Spain" 2023 115.063 "Spain" 2024 119.038 "France" 2016 106.483 "France" 2017 108.701 "France" 2018 110.49 "France" 2019 112.73 "France" 2020 104.343 "France" 2021 111.524 "France" 2022 114.554 "France" 2023 116.202 "France" 2024 117.586 "Italy" 2016 97.816 "Italy" 2017 99.385 "Italy" 2018 100.207 "Italy" 2019 100.637 "Italy" 2020 91.712 "Italy" 2021 99.903 "Italy" 2022 104.719 "Italy" 2023 105.741 "Italy" 2024 106.474 "Netherlands" 2016 107.078 "Netherlands" 2017 110.056 "Netherlands" 2018 112.542 "Netherlands" 2019 115.131 "Netherlands" 2020 110.677 "Netherlands" 2021 117.624 "Netherlands" 2022 123.514 "Netherlands" 2023 122.775 "Netherlands" 2024 124.103 "Portugal" 2016 97.48 "Portugal" 2017 100.711 "Portugal" 2018 103.678 "Portugal" 2019 106.525 "Portugal" 2020 97.785 "Portugal" 2021 103.221 "Portugal" 2022 110.432 "Portugal" 2023 113.855 "Portugal" 2024 116.291 end
Is there a way to:
- Already reshape my dataset for a better lecture
- Define those two regions and calculating the mean of the GDP growth for each region's countries (calculating the sum of the growth of each four countries, and then deviding that by 4)
- Drawing a time graph showing the GDP evolution of the North vs. the South regions by year.
I would appreciate the help.
Thanks!

Comment