Movatterモバイル変換


[0]ホーム

URL:


exuber

CRAN statusProject Status: Active – The project has reached a stable, usable state and is being actively developed.Lifecycle: stableR-CMD-checkCodecov test coverage

Testing for and dating periods of explosive dynamics (exuberance) intime series using the univariate and panel recursive unit root testsproposed byPhillips etal. (2015) andPavlidis etal. (2016). The recursive least-squares algorithm utilizes thematrix inversion lemma to avoid matrix inversion which results insignificant speed improvements. Simulation of a variety ofperiodically-collapsing bubble processes.

Overview

Testing for explosive dynamics is comprised of two distinct parts:

Some Context: Conventional testing techniquescompute critical values,and p-values from a standard distribution, wherethe user does not need to specify critical values explicitly. However,the recent literature in explosive dynamics require the use ofnon-standard distributions, which require the use of techniques thatsample empirical distributions in order to calculate the criticalvalues.

Estimation

The cornerstone function of the package is:

This function offers a vectorized estimation (i.e. single and/ormultiple time-series) for individual and panel estimation. Theestimation can parse data from multiple classes and handle dates asindex.

Critical Values

There are several options for generating critical values:

On defaultexuber will use Monte Carlo simulatedcritical values if no other option is provided. The package offers thesecritical values in the form ofdata (up to 600observations), that are obtained with themc_cv()function.

Analysis

For the analysis you should include both the output from estimation(object) and critical values (cv). The belowmethods break the process into small simple steps:

These combined provide a comprehensive analysis on the exuberantbehavior of the model.

Installation

# Install release version from CRANinstall.packages("exuber")

You can install the development version of exuber from GitHub.

# install.packages("devtools")devtools::install_github("kvasilopoulos/exuber")

If you encounter a clear bug, please file a reproducible example onGitHub.

Usage

library(exuber)rsim_data<-radf(sim_data)summary(rsim_data)#> Using `radf_crit` for `cv`.#>#> ── Summary (minw = 19, lag = 0) ─────────────────── Monte Carlo (nrep = 2000) ──#>#> psy1 :#> # A tibble: 3 × 5#>   stat  tstat   `90`    `95`  `99`#>   <fct> <dbl>  <dbl>   <dbl> <dbl>#> 1 adf   -2.46 -0.413 -0.0812 0.652#> 2 sadf   1.95  0.988  1.29   1.92#> 3 gsadf  5.19  1.71   1.97   2.57#>#> psy2 :#> # A tibble: 3 × 5#>   stat  tstat   `90`    `95`  `99`#>   <fct> <dbl>  <dbl>   <dbl> <dbl>#> 1 adf   -2.86 -0.413 -0.0812 0.652#> 2 sadf   7.88  0.988  1.29   1.92#> 3 gsadf  7.88  1.71   1.97   2.57#>#> evans :#> # A tibble: 3 × 5#>   stat  tstat   `90`    `95`  `99`#>   <fct> <dbl>  <dbl>   <dbl> <dbl>#> 1 adf   -5.83 -0.413 -0.0812 0.652#> 2 sadf   5.28  0.988  1.29   1.92#> 3 gsadf  5.99  1.71   1.97   2.57#>#> div :#> # A tibble: 3 × 5#>   stat  tstat   `90`    `95`  `99`#>   <fct> <dbl>  <dbl>   <dbl> <dbl>#> 1 adf   -1.95 -0.413 -0.0812 0.652#> 2 sadf   1.11  0.988  1.29   1.92#> 3 gsadf  1.34  1.71   1.97   2.57#>#> blan :#> # A tibble: 3 × 5#>   stat  tstat   `90`    `95`  `99`#>   <fct> <dbl>  <dbl>   <dbl> <dbl>#> 1 adf   -5.15 -0.413 -0.0812 0.652#> 2 sadf   3.93  0.988  1.29   1.92#> 3 gsadf 11.0   1.71   1.97   2.57diagnostics(rsim_data)#> Using `radf_crit` for `cv`.#>#> ── Diagnostics (option = gsadf) ───────────────────────────────── Monte Carlo ──#>#> psy1:     Rejects H0 at the 1% significance level#> psy2:     Rejects H0 at the 1% significance level#> evans:    Rejects H0 at the 1% significance level#> div:      Cannot reject H0#> blan:     Rejects H0 at the 1% significance leveldatestamp(rsim_data)#> Using `radf_crit` for `cv`.#>#> ── Datestamp (min_duration = 0) ───────────────────────────────── Monte Carlo ──#>#> psy1 :#>   Start Peak End Duration   Signal Ongoing#> 1    44   48  56       12 positive   FALSE#>#> psy2 :#>   Start Peak End Duration   Signal Ongoing#> 1    22   40  41       19 positive   FALSE#> 2    62   70  71        9 positive   FALSE#>#> evans :#>   Start Peak End Duration   Signal Ongoing#> 1    20   20  21        1 positive   FALSE#> 2    44   44  45        1 positive   FALSE#> 3    66   67  68        2 positive   FALSE#>#> blan :#>   Start Peak End Duration   Signal Ongoing#> 1    34   36  37        3 positive   FALSE#> 2    84   86  87        3 positive   FALSEautoplot(rsim_data)#> Using `radf_crit` for `cv`.


Please note that the ‘exuber’ project is released with aContributorCode of Conduct. By contributing to this project, you agree to abideby its terms.


[8]ページ先頭

©2009-2025 Movatter.jp