Commit 9e51e6c9 authored by Thomas Brand's avatar Thomas Brand

Change links to DBnomics.

parent b459f933
......@@ -9,7 +9,7 @@ bibliography: fs2000.bib
rm(list = ls())
if (!"pacman" %in% installed.packages()[,"Package"]) install.packages("pacman", repos='http://cran.r-project.org')
pacman::p_load(curl,dplyr,magrittr,tidyr,ggplot2,lubridate,knitr,rsdmx,zoo,R.matlab,stringr)
pacman::p_load(curl,tidyverse,magrittr,lubridate,knitr,rsdmx,zoo,R.matlab,stringr)
opts_chunk$set(message=FALSE, warning=FALSE, cache=FALSE, comment=NA)
......@@ -25,29 +25,29 @@ theme <- theme_bw()+ theme(strip.background=element_blank(),
axis.text=element_text(size=10))
blueObsMacro <- "#0D5BA4"
matlab_path <- '/usr/local/MATLAB/R2015b/bin/matlab'
dynare_path <- '/usr/local/dynare/matlab'
matlab_path <- '/usr/local/MATLAB/R2016a/bin/matlab'
dynare_path <- '~/Documents/dynare/matlab'
```
This post replicates the estimation of the cash in advance model (termed M1 in the paper) described in @Scho00, with updated data. This implementation was written by Michel Juillard and is given in the `examples` folder of Dynare.
# Data
The data are retrieved directly through the Widukind databases and are stocked in `fs2000_data.csv`. They are therefore different from the original dataset used by @Scho00.
The data are retrieved directly through DBnomics and are stocked in `fs2000_data.csv`. They are therefore different from the original dataset used by @Scho00.
```{r}
url_widukind <- "http://widukind-api.cepremap.org/api/v1/sdmx"
url_dbnomics <- "https://api.db.nomics.world/api/v1/sdmx"
url_provider <- "/BEA/data"
url_dataset_series <- "/nipa-section1-10106-q/A191RX1.Q"
# Real Gross Domestic Product, unit : billions 2009 $, SA annual rate
url <- paste0(url_widukind,url_provider,url_dataset_series)
url <- paste0(url_dbnomics,url_provider,url_dataset_series)
data_sdmx <- readSDMX(url)
df_gdp <- data.frame(data_sdmx, var="gdp")
url_dataset_series <- "/nipa-section1-10109-q/A191RD3.Q"
# Gross Domestic Product: Implicit Price Deflator, SA
url <- paste0(url_widukind,url_provider,url_dataset_series)
url <- paste0(url_dbnomics,url_provider,url_dataset_series)
data_sdmx <- readSDMX(url)
df_defgdp <- data.frame(data_sdmx, var="defgdp")
......@@ -62,7 +62,7 @@ bea_data <-
url_provider <- "/OECD/data"
url_dataset_series <- "/MEI/USA.LFWA64TT.STSA.Q"
# unit: 1000 person (source: OECD, MEI)
url <- paste0(url_widukind,url_provider,url_dataset_series)
url <- paste0(url_dbnomics,url_provider,url_dataset_series)
data_sdmx <- readSDMX(url)
df_pop <- data.frame(data_sdmx, var="pop")
......
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