Giter Club home page Giter Club logo

var's Introduction

VAR and VECM Models

This repository contains scripts that run VECM, VAR or BVAR models based on the CI test. If cointegration is found it will run the VECM test, otherwise it will let you choose between BVAR and VAR.

Repository Structure

  • 01_master_script.R: Master script that runs the data cleaning script first and then chooses between the VAR and VECM scripts based on the cointegration results.
  • 02_data_cleaning.R: Script for data cleaning and performing the Johansen cointegration test.
  • 03_var_model.R: Script for fitting a VAR model if no cointegration is found.
  • 04_vecm_model.R: Script for fitting a VECM model if cointegration is found.
  • 05_bvar_mode.R: Script for fitting a BVAR model if no cointegration is found.
  • data/: Directory for input data files.
  • results/: Directory for output files including IRF and FEVD plots. (NOTE! For BVAR only the IRF plots are extracted. There is no FEVD plot. Only the summary is printed.)

Requirements

  • The following R packages:
    • readxl
    • dplyr
    • urca
    • vars
    • ggplot2
    • bvars

Instructions

Step 1: Prepare Your Data

  1. Place your data file (e.g., data.xlsx) in the data/ directory.
  2. Change the names of the columns at 02_data_cleaning.R or find a better method of doing it automatically. I am not at this level yet.

Step 2: Run the Analysis

Run the master script!

var's People

Contributors

rvdaskalinas avatar

Watchers

 avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.