Package: fjohansen 0.1.0

Merwan Roudane

fjohansen: Johansen Cointegration Test with Fourier-Type Smooth Nonlinear Trends

Implements the Johansen cointegration test with Fourier-type smooth nonlinear deterministic trends restricted to cointegrating relations, as developed by Kurita and Shintani (2025) <doi:10.1080/07474938.2025.2530640>. Six model variants are supported: CNR (constant plus nonlinear, restricted in the cointegrating space), LNR (linear plus nonlinear, restricted), CNU (constant restricted, nonlinear unrestricted), LNU (linear restricted, nonlinear unrestricted), plus the standard constant- and linear-trend restricted Johansen models. The package also bundles the feasible generalised least squares (FGLS) Wald test of Perron, Shintani and Yabu (2017) <doi:10.1111/obes.12169> used as a frequency-selection pre-step, together with bundled critical-value tables, a vectorised simulator for the limiting distribution, publication-quality table exports (LaTeX and HTML) and 'ggplot2' figures matching those of the paper.

Authors:Merwan Roudane [aut, cre]

fjohansen_0.1.0.tar.gz
fjohansen_0.1.0.tar.gz(r-4.7-any)fjohansen_0.1.0.tar.gz(r-4.6-any)
fjohansen_0.1.0.tgz(r-4.6-emscripten)
manual.pdf |manual.html
card.svg |card.png
fjohansen/json (API)
NEWS

# Install 'fjohansen' in R:
install.packages('fjohansen', repos = c('https://cran.r-universe.dev', 'https://cloud.r-project.org'))

Bug tracker:https://github.com/merwanroudane/fjohansen/issues

On CRAN:

Conda:

1.70 score 31 exports 17 dependencies

Last updated from:24fccca261. Checks:4 OK. Indexed: yes.

TargetResultTimeFilesSyslog
linux-devel-x86_64OK115
source / vignettesOK188
linux-release-x86_64OK1924
wasm-releaseOK104

Exports:build_design_matricesclear_jf_cacheCNR_TABLE_B1format_trace_htmlformat_trace_latexformat_trace_tablefourier_basisgenerate_f_dgp1generate_f_dgp2generate_nf_dgp1generate_nf_dgp2generate_nf_dgp3generate_nf_dgp4jf_momentsjf_p_valuejf_quantilejohansen_fouriermodel_specsplot_eigenvaluesplot_limit_densityplot_long_runplot_residual_diagnosticsplot_risk_premiumplot_seriespsy_wald_testsample_jgb_dataselect_frequenciesselect_frequencies_univariateset_paper_themesimulate_limit_distributionsimulate_limit_moments

Dependencies:clicpp11farverggplot2gluegtableisobandlabelinglifecycleR6RColorBrewerrlangS7scalesvctrsviridisLitewithr

Readme and manuals

Help Manual

Help pageTopics
fjohansen: Johansen Cointegration Test with Fourier-Type Smooth Nonlinear Trendsfjohansen-package fjohansen
Build Z0, Z1, Z2 design matrices for the reduced-rank regressionbuild_design_matrices
Clear the in-memory simulation cache.clear_jf_cache
Approximate limit quantiles for the CNR model (Table B1 of Kurita & Shintani 2025).CNR_TABLE_B1
Build the Fourier deterministic basisfourier_basis
Data-generating processes from Section 5 of Kurita & Shintani (2025)generate_f_dgp1 generate_f_dgp2 generate_nf_dgp1 generate_nf_dgp2 generate_nf_dgp3 generate_nf_dgp4 jf_dgps
Mean and variance of the limit distributionjf_moments
Gamma-approximation p-value of an observed trace statisticjf_p_value
Quantile of the limit distributionjf_quantile
Publication-quality table formatters for the trace testformat_trace_html format_trace_latex format_trace_table jf_tables
Johansen-Fourier cointegration testjohansen_fourier
Model specifications used by 'johansen_fourier'model_specs
Bar plot of the Johansen eigenvaluesplot_eigenvalues
Plot the limit-distribution density (paper's Figs. 1-2)plot_limit_density
Plot estimated cointegrating relationsplot_long_run
Residual diagnostics (paper's Fig. 12)plot_residual_diagnostics
Implied risk-premium decomposition (paper's Fig. 13)plot_risk_premium
Plot a (T x p) data set as multi-panel time series (Fig. 11 of the paper)plot_series
Perron-Shintani-Yabu (2021) FGLS Wald testpsy_wald_test
Synthetic JGB-yield surrogate (Section 6 illustration)sample_jgb_data
Frequency selection for a multivariate panelselect_frequencies
General-to-specific frequency selection for a univariate seriesselect_frequencies_univariate
Apply the paper-style ggplot2 theme (sunny palette)set_paper_theme
Simulate the limiting Johansen-Fourier trace distributionsimulate_limit_distribution
Simulate moments of the limiting distributionsimulate_limit_moments