MyNixOS website logo
Description

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) <doi:10.1111/j.2517-6161.1964.tb00553.x>, Box and Jenkins (1976) <isbn:978-0-8162-1234-2>, and Box and Pierce (1970) <doi:10.1080/01621459.1970.10481180>. Statistical methods are also drawn from Kolmogorov (1933) <doi:10.1007/BF00993594>, Kwiatkowski et al. (1992) <doi:10.1016/0304-4076(92)90104-Y>, and Ljung and Box (1978) <doi:10.1093/biomet/65.2.297>. 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

Metadata

Version

0.3.0

License

Unknown

Platforms (76)

    Darwin
    FreeBSD
    Genode
    GHCJS
    Linux
    MMIXware
    NetBSD
    none
    OpenBSD
    Redox
    Solaris
    WASI
    Windows
Show all
  • aarch64-darwin
  • aarch64-freebsd
  • aarch64-genode
  • aarch64-linux
  • aarch64-netbsd
  • aarch64-none
  • aarch64-windows
  • aarch64_be-none
  • arm-none
  • armv5tel-linux
  • armv6l-linux
  • armv6l-netbsd
  • armv6l-none
  • armv7a-linux
  • armv7a-netbsd
  • armv7l-linux
  • armv7l-netbsd
  • avr-none
  • i686-cygwin
  • i686-freebsd
  • i686-genode
  • i686-linux
  • i686-netbsd
  • i686-none
  • i686-openbsd
  • i686-windows
  • javascript-ghcjs
  • loongarch64-linux
  • m68k-linux
  • m68k-netbsd
  • m68k-none
  • microblaze-linux
  • microblaze-none
  • microblazeel-linux
  • microblazeel-none
  • mips-linux
  • mips-none
  • mips64-linux
  • mips64-none
  • mips64el-linux
  • mipsel-linux
  • mipsel-netbsd
  • mmix-mmixware
  • msp430-none
  • or1k-none
  • powerpc-linux
  • powerpc-netbsd
  • powerpc-none
  • powerpc64-linux
  • powerpc64le-linux
  • powerpcle-none
  • riscv32-linux
  • riscv32-netbsd
  • riscv32-none
  • riscv64-linux
  • riscv64-netbsd
  • riscv64-none
  • rx-none
  • s390-linux
  • s390-none
  • s390x-linux
  • s390x-none
  • vc4-none
  • wasm32-wasi
  • wasm64-wasi
  • x86_64-cygwin
  • x86_64-darwin
  • x86_64-freebsd
  • x86_64-genode
  • x86_64-linux
  • x86_64-netbsd
  • x86_64-none
  • x86_64-openbsd
  • x86_64-redox
  • x86_64-solaris
  • x86_64-windows