Autocorrelation Tools Featured for Time Series

The 'actfts' package provides tools for performing autocorrelation analysis of time series data. It includes functions to compute and visualize the autocorrelation function (ACF) and the partial autocorrelation function (PACF). Additionally, it performs the Dickey-Fuller, KPSS, and Phillips-Perron unit root tests to assess the stationarity of time series. Theoretical foundations are based on Box and Cox (1964) , Box and Jenkins (1976) , and Box and Pierce (1970) . Statistical methods are also drawn from Kolmogorov (1933) , Kwiatkowski et al. (1992) , and Ljung and Box (1978) . The package integrates functions from 'forecast' (Hyndman & Khandakar, 2008) < https://CRAN.R-project.org/package=forecast>, 'tseries' (Trapletti & Hornik, 2020) < https://CRAN.R-project.org/package=tseries>, 'xts' (Ryan & Ulrich, 2020) < https://CRAN.R-project.org/package=xts>, and 'stats' (R Core Team, 2023) < https://stat.ethz.ch/R-manual/R-devel/library/stats/html/00Index.html>. Additionally, it provides visualization tools via 'plotly' (Sievert, 2020) < https://CRAN.R-project.org/package=plotly> and 'reactable' (Glaz, 2023) < https://CRAN.R-project.org/package=reactable>. The package also incorporates macroeconomic datasets from the U.S. Bureau of Economic Analysis: Disposable Personal Income (DPI) < https://fred.stlouisfed.org/series/DPI>, Gross Domestic Product (GDP) < https://fred.stlouisfed.org/series/GDP>, and Personal Consumption Expenditures (PCEC) < https://fred.stlouisfed.org/series/PCEC>.


actfts: Autocorrelation Tools Featured for Time Series

Lifecycle:experimental

The actfts package offers a flexible approach to time series analysis by focusing on Autocorrelation (ACF), Partial Autocorrelation (PACF), and stationarity tests, generating interactive plots for dynamic data visualization. It processes input data by validating and transforming it according to specified differences. It calculates ACF and PACF up to several lags and performs Box-Pierce, Ljung-Box, ADF, KPSS, and PP tests. The function organizes results into tables, with options to save them as TIFF files or Excel spreadsheets, and interactive mode provides on-screen visualization of the ACF-PACF and stationarity test outcomes.

Installation

You can install the development version of actfts from:

install.packages("actfts")
devtools::install_github("SergioFinances/actfts")

Example

This is a basic example which shows you how to use actfts packcage:

library(actfts)
data <- actfts::GDPEEUU
result <- actfts::acfinter(data, lag = 10)
print(result)
#> $`ACF-PACF Test`
#>    lag       acf          pacf Box_Pierce Pv_Box Ljung_Box Pv_Ljung
#> 1    1 0.9849981  0.9849981360   300.7686      0  303.6887        0
#> 2    2 0.9702311  0.0003276145   592.5866      0  599.2965        0
#> 3    3 0.9555439 -0.0047507255   875.6365      0  886.9564        0
#> 4    4 0.9409487 -0.0043825005  1150.1057      0 1166.8073        0
#> 5    5 0.9267058  0.0043661368  1416.3286      0 1439.1403        0
#> 6    6 0.9125019 -0.0058830766  1674.4531      0 1704.0575        0
#> 7    7 0.8985872  0.0023755846  1924.7654      0 1961.8049        0
#> 8    8 0.8849702  0.0028907399  2167.5489      0 2212.6275        0
#> 9    9 0.8716864  0.0043086528  2403.0984      0 2456.7851        0
#> 10  10 0.8588828  0.0093318494  2631.7791      0 2694.6130        0
#> 
#> $`Stationary Test`
#>            Statistic P_Value
#> ADF         2.548975    0.99
#> KPSS-Level  4.698172    0.01
#> KPSS-Trend  1.206680    0.01
#> PP          3.713440    0.99
#> 
#> $`Normality Test`
#>                    Statistic P_Value
#> Shapiro Wilks        0.84660       0
#> Kolmogorov Smirnov   0.17612       0
#> Box Cox              0.10000      NA
#> Box Cox Guerrero    -0.00772      NA
Example

References

Reference manual

It appears you don't have a PDF plugin for this browser. You can click here to download the reference manual.

install.packages("actfts")

0.3.0 by Sergio Sierra, 2 years ago


https://github.com/SergioFinances/actfts, https://sergiofinances.github.io/actfts/


Report a bug at https://github.com/SergioFinances/actfts/issues


Browse source code at https://github.com/cran/actfts


Authors: David Rodríguez [aut, cph] , Sergio Sierra [aut, cre]


Documentation:   PDF Manual  


MIT + file LICENSE license


Imports openxlsx, plotly, reactable, tseries, xts, stats, forecast, lifecycle

Suggests dplyr, knitr, rmarkdown, testthat


See at CRAN