knitr::opts_chunk$set(
  collapse = TRUE,
  comment = "#>",
  fig.path = "man/figures/README-",
  out.width = "100%"
)

beautyIRF

Caption for the picture.

Plot all Impulse Response Functions with their Impulses and Responses beautifully with ggplot2.

Installation

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")

Note

High resolution will come when saving the graphs.

Example

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")

Caption for the picture. Caption for the picture. Caption for the picture.



markushhh/beautyIRF documentation built on Feb. 14, 2020, 9:21 a.m.