Title of your work

Author

Your Name

Abstract. This is a suggested formatting for your abstract. This quarto document is a template for your report. It includes some basic ways of working with such documents. You are invited to learn more about developing online reports with this technology.

Keywords. bsvars, impulse responses, quarto, R, tax shocks

Introduction

This is a template repository for the Research Report for Macroeconometrics. Learn more about about developing online reports with quarto at quarto.org.

A Simple Example

This is a Quarto document in which we can cite the bsvars package by Woźniak (2022). Look for more info at package CRAN website.

Simply load the package by running

The code below performs simple computations for sampling posterior draws of the impulse responses. The first line uploads the data from the package,another sets the seed for reproducible computations, and then the pipe |> is used to streamline the model specification, estimation including the first burn-in run to obtain convergence and finally, the computed impulse responses are saved in object irf.

data(us_fiscal_lsuw)
set.seed(123)
us_fiscal_lsuw |>
  specify_bsvar$new(p = 1) |>
  estimate(S = 1000, show_progress = FALSE) |> 
  estimate(S = 2000, show_progress = FALSE) |> 
  compute_impulse_responses(horizon = 20) -> irf

The code above is visible as the R chunk contains the setting #| echo: true.

Table 1 reports the posterior means of the gross domestic product response to an unanticipated tax increase by 1 pp.

Table 1: Impulse response of gdp to unanticipated tax increase by 1 pp. within two years
0 1 2 3 4 5 6 7 8
change in gdp [%] 0.199 0.184 0.17 0.159 0.148 0.139 0.13 0.123 0.116

Figure 1 presents the same reaction over the horizon of five years.

Figure 1: Impulse response of gdp to unanticipated tax increase by 1 pp. within five years

Some Hints

Have a look at how to work with RStudio and GitHub at: How to use git and GitHub with R.

These are many different ways of how to work with references in RStudio: Preview Citations.

To make all the R code visible on the website change the settings in the preabmble of this document to:

execute:
  echo: true

References

Woźniak, Tomasz. 2022. Bsvars: Bayesian Estimation of Structural Vector Autoregressive Models. R Package. https://cran.r-project.org/package=bsvars.