Coder Social home page Coder Social logo

parallelpanelvar's Introduction

ParallelPanelVAR

Functions to parallelize the computational demanding functions of the panelvar package. These functions are only extensions to the work done by Sigmund and Ferstl (2018). The code is now available on CRAN, please see https://cran.r-project.org/package=panelvar

Initially only the bootstrapping procedure for the impulse response functions is parallelized in order to facilitate its calculation. Please don't hesitate to create pull requests for additional functions, which might be possible to speed up.

The speed improvements are quite considerable and the results should be the same. It is important to note that in case of a lot of cores the RAM becomes the bottleneck. So please be advised that there might occur swapping, slowing the parallel processing down considerably. Short comparison using the Cigar PanelVAR

microbenchmark(
          a = (my.bootstrap_irf(model = model, typeof_irf = "GIRF", n.ahead = 8, nof_Nstar_draws = 20, confidence.band = 0.95))
        , b = (bootstrap_irf(model = model, typeof_irf = "GIRF", n.ahead = 8, nof_Nstar_draws = 20, confidence.band = 0.95))
        , times = 10
            )

Unit: seconds                                                             
expr       min        lq     mean    median        uq       max neval cld
a  46.34114  49.85494  51.8946  50.51108  51.36918  65.30517    10  a 
b 168.19021 174.67670 175.3993 176.27962 177.25603 180.04718    10   b

I've only tested it on Windows, but this should also work on Linux.

Sigmund, Michael, and Robert Ferstl. "Panel vector autoregression in R with the package panelvar." The Quarterly Review of Economics and Finance (2019).

Earlier Working Paper: Panel Vector Autoregression in R with the Package Panelvar by Michael Sigmund and Robert Ferstl https://papers.ssrn.com/sol3/papers.cfm?abstract_id=2896087

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.