GDP growth rate in R

Asked

Viewed 67 times

1

I’m using the code

pib <- BETS.get(22099)

To pull the GDP, turns out he pulls from 1995 to 2017, and I just need 2007,01 à 2013,12. How do I pull only the period I need for the model? Because then I need to use the code

dpib <- (((pib+lag(pib,-1)+lag(pib,-2)+lag(pib,-3))/4)/
  ((lag(pib,-4)+lag(pib,-5)+lag(pib,-6)+lag(pib,-7))/4)-1)*100

To know what was the variation of GDP in the period. Thank you.

  • 2

    Use the command ?BETS.get. It will show you how to determine the initial and final periods for data access.

No answers

Browser other questions tagged

You are not signed in. Login or sign up in order to post.