Commit f731da6e authored by Thomas Brand's avatar Thomas Brand

Fix bug with BEA starting date of consumption in level (now 2002).

parent dffe88d5
......@@ -117,7 +117,7 @@ shortrate <-
# Special case of consumption
Private consumption is a special case : the series of consumption in level provided by the Bureau of Economic Analysis do not exist before 1999, we need to use the series of growth rates available before 1999 to deduce past consumption levels. As in [@Chri14a], aggregate consumption is the sum of Non Durable Goods and Services. Durable Goods are associated with Investment. The following figure shows the three deduced series of consumption.
Private consumption is a special case : the series of consumption in level provided by the Bureau of Economic Analysis do not exist before 2002, we need to use the series of growth rates available before 2002 to deduce past consumption levels. As in [@Chri14a], aggregate consumption is the sum of Non Durable Goods and Services. Durable Goods are associated with Investment. The following figure shows the three deduced series of consumption.
```{r, fig.height=3.5, fig.width=8}
conso_level <-
......@@ -136,14 +136,14 @@ conso_rate <-
value,
var_name=Concept)
conso_level_99 <-
conso_level_02 <-
conso_level %>%
filter(period=="1999-01-01")
filter(period=="2002-01-01")
conso <-
conso_rate %>%
filter(period <= "1999-01-01") %>%
full_join(conso_level_99,by="var_name") %>%
filter(period <= "2002-01-01") %>%
full_join(conso_level_02,by="var_name") %>%
group_by(var_name) %>%
arrange(desc(period.x)) %>%
mutate(value = value.y / lag(cumprod((1 + value.x/100)^(1/4)))) %>%
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment