How can I do different regression model in rstudio, it is a cross sectional model and I want to get different betas at different periods

My goal is to recreate the following table

Screen Shot 2020-11-13 at 2.43.57 PM

I have data from 12 countries; Australia, USA, UK......and I have from 1870 to 2016, I manage to create 5 years periods,

so I have
Australia 1870-1874
Australia 1875-1879....
US 1870-1874.......so on

we have the following model-
Investment=beta0+beta1savings+error

and what I want is the following thing

Period 1 beta1,1
period 2 beta 1,2
..... so on!
I will be very grateful if you could help me,
thanks

This topic was automatically closed 21 days after the last reply. New replies are no longer allowed.

If you have a query related to it or one of the replies, start a new topic and refer back with a link.