Type: | Package |
Title: | Autocorrelation Tools Featured for Time Series |
Version: | 0.3.0 |
Maintainer: | Sergio Sierra <sergiochess95@gmail.com> |
Description: | 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. |
License: | MIT + file LICENSE |
Encoding: | UTF-8 |
LazyData: | true |
Imports: | openxlsx, plotly, reactable, tseries, xts, stats, forecast, lifecycle |
RoxygenNote: | 7.3.2 |
Depends: | R (≥ 2.10) |
URL: | https://github.com/SergioFinances/actfts, https://sergiofinances.github.io/actfts/ |
BugReports: | https://github.com/SergioFinances/actfts/issues |
Suggests: | dplyr, knitr, rmarkdown, testthat (≥ 3.0.0) |
Config/testthat/edition: | 3 |
VignetteBuilder: | knitr |
NeedsCompilation: | no |
Packaged: | 2025-03-04 18:19:35 UTC; sergiosierra |
Author: | David RodrÃguez |
Repository: | CRAN |
Date/Publication: | 2025-03-06 16:40:07 UTC |
actfts: Autocorrelation Tools Featured for Time Series
Description
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.
Author(s)
Maintainer: Sergio Sierra sergiochess95@gmail.com (ORCID)
Authors:
David RodrÃguez davestss@hotmail.com (ORCID) [copyright holder]
See Also
Useful links:
Report bugs at https://github.com/SergioFinances/actfts/issues
Gross Domestic Product of the United States.
Description
This dataset contains the disposable personal income of the United States from 01/01/1947 to the present with quartely frequency.
Usage
DPIEEUU
Format
A dataset in xts format with one variable and several files that are automatically updated depending on the update of the data's FRED:
- DPI
Disposable Personal Income in billions of dollars
Source
https://fred.stlouisfed.org/series/DPI
References
U.S. Bureau of Economic Analysis, Disposable Personal Income (DPI), retrieved from FRED, Federal Reserve Bank of St. Louis; https://fred.stlouisfed.org/series/DPI
Gross Domestic Product of the United States.
Description
This dataset contains the gross domestic product of the United States from 01/01/1947 to the present with quartely frequency.
Usage
GDPEEUU
Format
A dataset in xts format with one variable and several files that are automatically updated depending on the update of the data's FRED:
- GDP
Gross Domestic product in billions of dollars
Source
https://fred.stlouisfed.org/series/GDP
References
U.S. Bureau of Economic Analysis, Gross Domestic Product (GDP), retrieved from FRED, Federal Reserve Bank of St. Louis; https://fred.stlouisfed.org/series/GDP
Personal Consumption Expenditures of the United States.
Description
This dataset contains the personal consumption expenditures of the United States from 01/01/1947 to the present with quartely frequency.
Usage
PCECEEUU
Format
A dataset in xts format with one variable and several files that are automatically updated depending on the update of the data's FRED:
- PCEC
Personal Consumption Expenditures in billions of dollars
Source
https://fred.stlouisfed.org/series/PCEC
References
U.S. Bureau of Economic Analysis, Personal Consumption Expenditures (PCEC), retrieved from FRED, Federal Reserve Bank of St. Louis; https://fred.stlouisfed.org/series/PCEC
ACF and PACF Analysis with Interactive Features
Description
acfinter computes and visualizes the ACF and PACF of a given time series, performs stationarity tests, and optionally generates interactive tables and plots.
Usage
acfinter(
datag,
lag = 72,
ci.method = "white",
ci = 0.95,
interactive = NULL,
delta = "levels",
download = FALSE
)
Arguments
datag |
A numeric vector or a time series object. |
lag |
Maximum number of lags for the ACF and PACF. Default is 72. |
ci.method |
Method for confidence intervals: "white" (default) or "ma". |
ci |
Confidence level for confidence intervals. Default is 0.95. |
interactive |
Character string specifying whether to create an interactive table: "acftable" for the ACF-PACF table, "stattable" for the stationarity tests table. Default is NULL. |
delta |
Transformation of the data: "levels" (default), "diff1", "diff2", or "diff3". |
download |
Logical indicating whether to save the results as files. Default is FALSE. |
Value
A list with two elements: "ACF-PACF Test" and "Stationary Test". The function also creates interactive plots and tables if specified.
Examples
data <- actfts::GDPEEUU
result <- actfts::acfinter(data, lag = 20, ci.method = "white", interactive = "acftable")
print(result)