Learn R Programming

astsa (version 2.4)

astsa-package: Applied Statistical Time Series Analysis (more than just data)

Description

Contains data sets and scripts for analyzing time series in both the frequency and time domains including state space modeling as well as supporting the texts Time Series Analysis and Its Applications: With R Examples (5th ed, 2025) and Time Series: A Data Analysis Approach Using R, (2nd ed, 2026). Most scripts are designed to need minimal input to produce aesthetically pleasing output for ease of use in live demonstrations and in course work.

Arguments

Author

David Stoffer <stoffer@pitt.edu>

Warning

If the package dplyr is loaded, it will mask the base scripts filter and lag (among other things) that a time series analyst uses often. In this case, whenever you analyze time series data, we suggest you either:

(1) Detach it if it's loaded but not being used:


   detach(package:dplyr)

(2) If you want to use it, fix it:


   library(dplyr, exclude = c("filter", "lag"))   # load it without the culprits 
   dlag    = dplyr::lag         # and fix ... 
   dfilter = dplyr::filter      # ... the blunders

then use dlag and dfilter for dplyr scripts
and lag and filter can be use as originally intended.

(3) Or just take back the commands:


   filter = stats::filter
   lag    = stats::lag 

and you can still use these for dpylr:


   dlag    = dplyr::lag
   dfilter = dplyr::filter

(4) Or avoid all of these problems and use data.table instead of dplyr. If you are doing data manipulation, you should know that dplyr is inspired by data.table, but it is much slower and weaker than data.table.

Details

Package:astsa
Type:Package
Version:2.4
Date:2026-01-01
License:GPL (>= 2)
LazyLoad:yes
LazyData:yes

References

You can find demonstrations of astsa capabilities at FUN WITH ASTSA.

The most recent version of the package can be found at https://github.com/nickpoison/astsa/.

In addition, the News and ChangeLog files are at https://github.com/nickpoison/astsa/blob/master/NEWS.md.

The webpages for the texts and some help on using R for time series analysis can be found at https://nickpoison.github.io/.