knitr::opts_chunk$set( collapse = TRUE, comment = "#>", fig.path = "man/figures/README-", out.width = "100%" )
Plot all Impulse Response Functions with their Impulses and Responses beautifully with ggplot2.
You can install the released version of beautyIRF
from CRAN with:
#install.packages("beautyIRF") # not yet supported
And the development version from GitHub with:
# install.packages("devtools") devtools::install_github("markushhh/YahooFinance")
High resolution will come when saving the graphs.
library("FredApi") library("vars") library("beautyIRF") UK <- get_symbols("AURUKM") # Unemployment Rate in the United Kingdom ITALY <- get_symbols("LRHUTTTTITM156S") # Harmonized Unemployment Rate in Italy FRANCE <- get_symbols("LRHUTTTTFRM156S") # Harmonized Unemployment Rate in France head(UK)
# same time frame UK <- UK["2000-01-01::2016-01-01"] ITALY <- ITALY["2000-01-01::2016-01-01"] FRANCE <- FRANCE["2000-01-01::2016-01-01"] x <- data.frame(UK, ITALY, FRANCE) VAR1 <- VAR(x, lag.max = 12, type = "cons") irf <- irf(VAR1, n.ahead = 20) autoplot(irf, file_name = "IRF", device = "png")
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.