Title: | Time Series for Data Science |
---|---|
Description: | Accompanies the texts Time Series for Data Science with R by Woodward, Sadler and Robertson & Applied Time Series Analysis with R, 2nd edition by Woodward, Gray, and Elliott. It is helpful for data analysis and for time series instruction. |
Authors: | Wayne Woodward |
Maintainer: | Bivin Sadler <[email protected]> |
License: | GPL-2 |
Version: | 2.1.0 |
Built: | 2025-02-25 05:03:21 UTC |
Source: | https://github.com/cran/tswge |
These functions and data sets accompany the book "Applied Time Series Analysis with R, 2nd edition" by Woodward, Gray, and Elliott
Wayne Woodward <[email protected]>
"Applied Time Series Analysis with R, 2nd edition" by Woodward, Gray, and Elliott
data(wages) plotts.wge(wages)
data(wages) plotts.wge(wages)
AR model identification using either AIC, AICC, or BIC and MLE, Burg or YW
aic.ar.wge(x, p = 1:5, type = "aic",method='mle')
aic.ar.wge(x, p = 1:5, type = "aic",method='mle')
x |
Realization to be analyzed |
p |
Range of p values to be considered |
type |
Type of model identification criterion: aic, aicc, or bic |
method |
Method used for estimation: MLE, Burg, or YW |
type |
Criterion used: aic (default), aicc, or bic |
method |
Estimation method used: MLE, Burg, or YW |
min_value |
Value of the minimized criterion |
p |
AR order for selected model |
phi |
AR parameter estimates for selected model |
vara |
White noise variance estimate for selected model |
Wayne Woodward
"Applied Time Series Analysis with R, 2nd edition" by Woodward, Gray, and Elliott
data(fig3.18a) aic.ar.wge(fig3.18a,p=1:5,type='aicc',method='burg')
data(fig3.18a) aic.ar.wge(fig3.18a,p=1:5,type='aicc',method='burg')
AR model identification using either AIC, AICC, or BIC
aic.burg.wge(x, p = 1:5, type = "aic")
aic.burg.wge(x, p = 1:5, type = "aic")
x |
Realization to be analyzed |
p |
Range of p values to be considered |
type |
Type of model identification criterion: aic, aicc, or bic |
type |
Criterion used: aic (default), aicc, or bic |
min_value |
Value of the minimized criterion |
p |
AR order for selected model |
phi |
AR parameter estimates for selected model |
vara |
White noise variance estimate for selected model |
Wayne Woodward
"Applied Time Series Analysis with R, 2nd edition" by Woodward, Gray, and Elliott
data(fig3.18a) aic.burg.wge(fig3.18a,p=1:5,type='aicc')
data(fig3.18a) aic.burg.wge(fig3.18a,p=1:5,type='aicc')
ARMA model identification using either AIC, AICC, or BIC
aic.wge(x, p = 0:5, q = 0:2, type = "aic")
aic.wge(x, p = 0:5, q = 0:2, type = "aic")
x |
Realization to be analyzed |
p |
Range of p values to be considered |
q |
Range of q values to be considered |
type |
Type of model identification criterion: aic, aicc, or bic |
type |
Criterion used: aic (default), aicc, or bic |
min_value |
Value of the minimized criterion |
p |
AR order for selected model |
phi |
AR parameter estimates for selected model |
q |
MA order for selected model |
theta |
MA parameter estimates for selected model |
vara |
White noise variance estimate for selected model |
Wayne Woodward
"Applied Time Series Analysis with R, 2nd edition" by Woodward, Gray, and Elliott
data(fig3.18a) aic.wge(fig3.18a,p=0:5,q=0:1,type='aicc')
data(fig3.18a) aic.wge(fig3.18a,p=0:5,q=0:1,type='aicc')
You may select either AIC, AICC, or BIC to use model identification. You can also used ML, Burg, or Yule-Walker estimates. Given a range of values for p and q, the program returns the top 5 candidate models.
aic5.ar.wge(x, p = 0:5, type = "aic",method='mle')
aic5.ar.wge(x, p = 0:5, type = "aic",method='mle')
x |
Realization to model |
p |
Range of AR orders to be considered |
type |
Either 'aic' (default), 'aicc', or 'bic' |
method |
Either 'MLE' (default), 'Burg', or 'YW' |
A list of p, selected criterion for the top 5 models. The identification type and estimation method are printed on the output.
If some model order combinations give explosively nonstationary models, then the program may stop prematurely. You may need to adjust the range of p and q to avoid these models.
Wayne Woodward
"Applied Time Series Analysis with R, 2nd edition" by Woodward, Gray, and Elliott
data(fig3.18a) aic5.wge(fig3.18a,p=0:5,q=0:2)
data(fig3.18a) aic5.wge(fig3.18a,p=0:5,q=0:2)
You may select either AIC, AICC, or BIC to use model identification. Given a range of values for p and q, the program returns the top 5 candidate models.
aic5.wge(x, p = 0:5, q = 0:2, type = "aic")
aic5.wge(x, p = 0:5, q = 0:2, type = "aic")
x |
Realization to model |
p |
Range of AR orders to be considered |
q |
Range of MA orders to be considered |
type |
Either 'aic' (default, 'aicc', or 'bic') |
A list of p,q, and selected criterion for the top 5 models
If some model order combinations give explosively nonstationary models, then the program may stop prematurely. You may need to adjust the range of p and q to avoid these models.
Wayne Woodward
"Applied Time Series Analysis with R, 2nd edition" by Woodward, Gray, and Elliott
data(fig3.18a) aic5.wge(fig3.18a,p=0:5,q=0:2)
data(fig3.18a) aic5.wge(fig3.18a,p=0:5,q=0:2)
Monthly international airline passengers (in 1000s) from January 1949-December 1960. Series G in Box, Jenkings, and Reinsel text
data("airline")
data("airline")
The format is: num [1:144] 112 118 132 129 121 135 148 148 136 119 ...
"Time Series Analysis: Forecasting and Control" by Box, Jenkins, and Reinsel
"Applied Time Series Analysis with R, 2nd edition" by Woodward, Gray, and Elliott
data(airline)
data(airline)
Natural log of monthly international airline passengers (in 1000s) from January 1949-December 1960. Series G in Box, Jenkings, and Reinsel text
data("airlog")
data("airlog")
The format is: num [1:144] 4.72 4.77 4.88 4.86 4.8 ...
"Time Series Analysis: Forecasting and Control" by Box, Jenkins, and Reinsel
Applied Time Series Analysis with R, second edition by Woodward, Gray, and Elliott
data(airlog)
data(airlog)
This function calculates and optionally plots the smoothed periodogram using the Parzen window. The truncation point may be chosen by the user
sample.spec.wge(x, dbcalc = "TRUE", plot = "TRUE")
sample.spec.wge(x, dbcalc = "TRUE", plot = "TRUE")
x |
Vector containing the time series realization |
dbcalc |
If dbcalc=TRUE, the calculation is in the log (dB) scale. If FALSE, then non-log calculations are made |
plot |
If PLOT=TRUE then the smoothed spectral estimate is plotted. If FALSE then no plot is created |
freq |
The frequencies at which the smoothed periodogram is calculated |
pzgram |
The smoothed periodogram using the Parzen window |
Wayne Woodward
"Applied Time Series Analysis with R, 2nd edition" by Woodward, Gray, and Elliott
sample.spec.wge(rnorm(100))
sample.spec.wge(rnorm(100))
Annual non-perforated appendicitis rates for years 1970-2005
data("appy")
data("appy")
The format is: num [1:36] 14.8 13.7 14.3 14.2 13 ...
Alder, et al. (2010)Archives of Surgery 145, 63-71
Applied Time Series Analysis with R, second edition by Woodward, Gray, and Elliott
data(appy)
data(appy)
Given a time series in the vector x, and AR coefs phi1 and phi2, for example, artrans.wge computes y(t)=x(t)-phi1X(t-1)-phi2x(t-2), for t=3, ..., n
artrans.wge(x,phi.tr, lag.max=25, plottr = "TRUE")
artrans.wge(x,phi.tr, lag.max=25, plottr = "TRUE")
x |
Vector containing original realization |
phi.tr |
Coefficients of the transformation |
lag.max |
Max lag (k) for sample autocorrelations |
plottr |
If plottr=TRUE then plots of the data, transformed data, and sample autocorelations of original and transformed data |
Transformed data
For a difference, use phi.tr=1
Wayne Woodward
"Applied Time Series Analysis with R, 2nd edition" by Woodward, Gray, and Elliott"
data(wtcrude) difdata=artrans.wge(wtcrude,phi.tr=1,lag.max=30,plottr=TRUE)
data(wtcrude) difdata=artrans.wge(wtcrude,phi.tr=1,lag.max=30,plottr=TRUE)
This function takes either a fitted (or true) model for the realization x and calculates the residuals using the backcasting procedure
backcast.wge(x, phi = 0, theta = 0, n.back = 50)
backcast.wge(x, phi = 0, theta = 0, n.back = 50)
x |
realization |
phi |
AR coefficients |
theta |
MA coefficients |
n.back |
Backcast to X(-n.back) |
The n backcast residuals are returned
Wayne Woodward
Chapter 7 of Applied Time Series Analysis with R, second edition by Woodward, Gray, and Elliott
data(fig6.2nf) backcast.wge(fig6.2nf,phi=c(1.2,-.6),theta=.5,n.back=50)
data(fig6.2nf) backcast.wge(fig6.2nf,phi=c(1.2,-.6),theta=.5,n.back=50)
Bat echolocation signal of a big brown bat
data("bat")
data("bat")
The format is: num [1:381] -0.0049 -0.0083 0.0127 0.0068 -0.0259 0.0059 0.0386 -0.0405 -0.0269 0.0474 ...
Al Feng, Beckman Center of the University of Illinois
Applied Time Series Analysis with R, second edition by Woodward, Gray, and Elliott
data(bat)
data(bat)
This dataset contains the daily price of bitcoin from May 1, 2021 to April 30, 2021. The data was gathered from Yahoo Finance on April 30, 2020 and included missing values on October 9, 12 and 13 of 2020. Yahoo Finance has since filled in the correct values which can be compared with the imputed values described in the book.
data("bitcoin")
data("bitcoin")
The format is: num [1:461] 7200.174 6985.470 7344.884 ...
Yahoo Finance
"Practical Time Series for Data Scientiests by Woodward, Sadler and Robertson"
data(bitcoin)
data(bitcoin)
100 weeks of sales data with sales, TV advertising budget, Online advertising budget and the abount of a discount if any.
data("Bsales")
data("Bsales")
The Time Series Toolkit
data(Bsales)
data(Bsales)
Bumps signal from Donoho and Johnstone(1994) Biometrika 81,425-455
data("bumps16")
data("bumps16")
The format is: num [1:16] 0.1 0.4 5.5 0.2 1.4 0.5 0.3 0.7 0.1 2.5 ...
Donoho and Johnstone(1994) Biometrika 81,425-455
Applied Time Series Analysis with R, second edition by Woodward, Gray, and Elliott
data(bumps16)
data(bumps16)
Bumps signal from Donoho and Johnstone(1994) Biometrika 81,425-455
data("bumps256")
data("bumps256")
The format is: num [1:256] 0.00016 0.00017 0.000182 0.000195 0.000211 ...
Donoho and Johnstone(1994) Biometrika 81,425-455
Applied Time Series Analysis with R, second edition by Woodward, Gray, and Elliott
data(bumps256)
data(bumps256)
The user can specify the order of the filter, and whether it is low pass ("low"), high pass ("high"), band stop ("stop"), or band pass ("pass") filter. Requires the CRAN package 'signal'.
butterworth.wge(x, order, type, cutoff,plot=TRUE)
butterworth.wge(x, order, type, cutoff,plot=TRUE)
x |
Realization to be filtered |
order |
Order of the Butterworth filter |
type |
Either "low", "high", "stop", or "pass" as dicsussed in Descriptions |
cutoff |
For "low" and "high": cutoff is a real number. For "stop" and "band": cutoff is a 2-component vector |
plot |
If plot=TRUE then plots of the original and filtered data are produced. |
The filtered data
Requires CRAN package 'signal'
Wayne Woodward
"Applied Time Series Analysis with R, 2nd edition" by Woodward, Gray, and Elliott
data(wages) butterworth.wge(wages,order=4,type="low",cutoff=.05)
data(wages) butterworth.wge(wages,order=4,type="low",cutoff=.05)
Weekly cardiac mortality, temperatures, and pollution measures for the years 1970-1978
data("cardiac")
data("cardiac")
ts object consisting of weekly data
Shumway and Stoffer, 1999)
"Time Series for Data Sience:Analysis and Forecasting" by Woodward, Sadler, and Robertson
data(cardiac)
data(cardiac)
Quarterly usage of metric tons (in thousands) of Portland cement used from the first quarter of 1973 through the fourth quarter of 1993 in Australia
data("cement")
data("cement")
The format is: num [1:84] 1148 1305 1342 1452 1184 ...
Australian Bureau of Statistics
Applied Time Series Analysis with R, second edition by Woodward, Gray, and Elliott
data(cement)
data(cement)
256 point linear chirp data
data("chirp")
data("chirp")
The format is: List of 2 $ x : num [1:256] 1 1 0.98 0.95 0.91 0.86 0.8 0.72 0.63 0.53 ... $ spec: num [1:256] 0.511 0.568 0.733 0.991 1.32 ...
Simulated data
Applied Time Series Analysis with R, second edition by Woodward, Gray, and Elliott
data(chirp)
data(chirp)
Performs the Cochrane-Orcutt to test for a linear trend in a time series realization.)
co.wge(x,maxp=5)
co.wge(x,maxp=5)
x |
Realization |
maxp |
Maximum AR order allowed for AR model fit to residuals from least squares line |
z |
Residuals from the fitted line |
b0hat |
Estimated y-intercept of the fitted line using the CO method |
b1hat |
Estimated slope of the fitted line using the CO method |
z.order |
Order, p, fit to the residuals |
z.phi |
Coefficients of the AR model fit to the residuals |
pvalue |
P-value of the CO test for the significance of the slope |
tco |
Cochrane-Orcutt test statistic. |
Wayne Woodward
"Applied Time Series Analysis with R, 2nd edition" by Woodward, Gray, and Elliott
data(global.temp) co.wge(global.temp,maxp=5)
data(global.temp) co.wge(global.temp,maxp=5)
Monthly average temperatures at Dallas Ft. Worth (in Fahrenheit) from January 2011 through December 2020
data("dfw.2011")
data("dfw.2011")
ts object consisting of monthly data from January 1900 trough December 2020
https://www.weather.gov/fwd/dmotemp
"Time Series for Data Sience: Analysis and Forecasting" by Woodward, Sadler, and Robertson
data(dfw.2011)
data(dfw.2011)
Monthly average temperatures at Dallas Ft. Worth (in Fahrenheit) from January 1900 through December 2020
data("dfw.mon")
data("dfw.mon")
ts object consisting of monthly data from January 1900 through December 2020
https://www.weather.gov/fwd/dmotemp
"Time Series for Data Sience: Analysis and Forecasting" by Woodward, Sadler, and Robertson
data(dfw.mon)
data(dfw.mon)
Annual average temperatures at Dallas Ft. Worth (in Fahrenheit) from January 1900 through December 2020
data("dfw.yr")
data("dfw.yr")
ts object consisting of annual data from 1900 through 2020
https://www.weather.gov/fwd/dmotemp
"Time Series for Data Sience: Analysis and Forecasting" by Woodward, Sadler, and Robertson
data(dfw.yr)
data(dfw.yr)
Generated Doppler data
data("doppler")
data("doppler")
The format is: num [1:2000] -0.00644 -0.01739 -0.02961 -0.04091 -0.04952 ...
Simulated
"Applied Time Series Analysis with R, 2nd edition" by Woodward, Gray, and Elliott
data(doppler)
data(doppler)
Doppler signal with two time-varying frequencies
data("doppler2")
data("doppler2")
The format is: num [1:200] -0.372 1.246 -1.163 0.261 -0.698 ...
Simulated data
Applied Time Series Analysis with R, second edition by Woodward, Gray, and Elliott
data(doppler2)
data(doppler2)
DOW Annual closing averages from 1915 through 2020
data("dow.annual")
data("dow.annual")
ts object consisting of DOW Annual closing averages from 19155 through 2020
"Time Series for Data Sience: Analysis and Forecasting" by Woodward, Sadler, and Robertson
data(dow.annual)
data(dow.annual)
DOW daily rate of return data from October 1, 1928 to December 31, 2010
data("dow.rate")
data("dow.rate")
The format is: num [1:20656] 240 238 238 240 240 ...
Public access
"Applied Statistics and Data Analysis with R, 2nd edition" by Woodward, Gray, and Elliott
data(dow.rate)
data(dow.rate)
Dow Jones daily rate of return for the 1000 trading days before December 31, 2010.
data("dow1000")
data("dow1000")
The format is: num [1:1001] 240 238 238 240 240 ...
Internet and shown in Figure 4.9, "Applied Time Series Analysis with R, 2nd edition", by Woodward, Gray and Elliott
data(dow1000)
data(dow1000)
Daily DOW Closing Prices 1985 through 2020
data("dow1985")
data("dow1985")
ts object consisting of daily dow closing prices from 1985 through 2020
"Time Series for Data Sience: Analysis and Forecasting" by Woodward, Sadler, and Robertson
data(dow1985)
data(dow1985)
Daily Dow Jones averages for 2014
data("dowjones2014")
data("dowjones2014")
The format is: num [1:252] 16441 16470 16425 16531 16463 ...
Economic Data: Federal Reserve Bank of St. Louis. Website: https://research.stlouisfed.org/fred2/series/DJIA/downloaddata
"Applied Time Series Analysis with R, 2nd edition" by Woodward, Gray, and Elliott
data(dowjones2014)
data(dowjones2014)
6-month rates 1/1/1991 through 4/1/2010
data("eco.cd6")
data("eco.cd6")
The format is: num [1:469] 7.25 7.53 7.64 7.64 7.59 7.44 7.39 7.26 7.25 7.19 ...
Internet
"Applied Time Series Analysis with R, 2nd edition" by Woodward, Gray, and Elliott
data(eco.cd6)
data(eco.cd6)
Corporate bond rates 1/1/1991 through 4/1/2010
data("eco.corp.bond")
data("eco.corp.bond")
The format is: num [1:469] 4.61 5.22 5.69 6.04 6.06 5.91 5.43 5.04 4.89 4.26 ...
Internet
"Applied Time Series Analysis with R, 2nd edition" by Woodward, Gray, and Elliott
data(eco.corp.bond)
data(eco.corp.bond)
30-year mortgage rates 1/1/1991 through 4/1/2010
data("eco.mort30")
data("eco.mort30")
The format is: num [1:469] 7.31 7.43 7.53 7.6 7.7 7.69 7.63 7.55 7.48 7.44 ...
Internet
"Applied Time Series Analysis with R, 2nd edition" by Woodward, Gray, and Elliott
data(eco.mort30)
data(eco.mort30)
Estimate parameters of an AR(p) with p assumed known. Outputs residuals (backcast0 and white noise variance estimate.)
est.ar.wge(x, p = 2, factor = TRUE, method = "mle")
est.ar.wge(x, p = 2, factor = TRUE, method = "mle")
x |
Realization |
p |
AR order |
factor |
If TRUE (default) a factor table is printed for the estimated model |
method |
Either "mle" (default), "burg", or "yw" |
The 'type' arument is added for backwards compatabililty and if specified will replace the value specified in the 'method' argument.
method |
Estimation method used: MLE, Burg, or YW |
phi.est |
Estimates of the AR parameters |
res |
Estimated residuals (using backcasting) based on estimated model |
avar |
Estimated white noise variance (based on backcast residuals) |
xbar |
Sample mean of data in x |
aic |
AIC for estimated model |
aicc |
AICC for estimated model |
bic |
BIC for estimated model |
Wayne Woodward
"Applied Time Series Analysis with R, 2nd edition" by Woodward, Gray, and Elliott
data(fig6.1nf) est.ar.wge(fig6.1nf,p=1)
data(fig6.1nf) est.ar.wge(fig6.1nf,p=1)
This function calculates ML estimates, computes residuals (using backcasting), estimates white noise variance for a stationary ARMA model
est.arma.wge(x, p = 0, q = 0, factor = TRUE)
est.arma.wge(x, p = 0, q = 0, factor = TRUE)
x |
The realization. |
p |
The autoregressive order |
q |
the moving average order |
factor |
Logical variable. factor=TRUE (default) plots a factor table for estimated AR-part of model |
This function uses arima from base SAS and is written similarly to itsmr function arma
phi |
ML estimates of autoregressive parameters |
theta |
ML estimates of moving average parameters |
res |
Residuals (calculated using backcasting) |
avar |
Estimate of white noise variance based on backcast residuals |
se.phi |
Standard errors of the AR parameter estimates |
se.theta |
Standard errors of the MA parameter estimates |
aic |
AIC for estimated model |
aicc |
AICC for estimated model |
bic |
BIC for estimated model |
Requires CRAN package 'itsmr'. The program is based on arima from base R and arma from 'itsmr'
Wayne Woodward
"Applied Time Series Analysis with R, 2nd edition" by Woodward, Gray, and Elliott
data(fig6.2nf) est.arma.wge(fig6.2nf,p=2,q=1)
data(fig6.2nf) est.arma.wge(fig6.2nf,p=2,q=1)
This function uses the grid search algorithm discussed in Section 11.5 of Applied Time Series Analysis with R, second edition by Woodward, Gray, and Elliott
est.farma.wge(x, low.d, high.d, inc.d, p.max, nback = 500)
est.farma.wge(x, low.d, high.d, inc.d, p.max, nback = 500)
x |
Realization to be analyzed |
low.d |
The lower limit for d in the grid search |
high.d |
The upper limit for d in the grid search |
inc.d |
The increment, e.g. .01, .001, etc. in the grid search |
p.max |
Maximum value of p allowed for the AR component of the model |
nback |
Number of backcasts to be used (see section 11.5 in Applied Time Series Analysis with R, second edition by Woodward, Gray, and Elliott |
We assume q=0 and do not allow moving average terms in the model.
d |
Estimate of d |
phi |
Estimates of the pth order AR component of the model where p is some integer from 0 to p.max |
vara |
The estimnated white noise variance |
aic |
The aic value associated with the final model |
Wayne Woodward
Applied Time Series Analysis with R, second edition by Woodward, Gray, and Elliott. See also Hosking (1984)
est.farma.wge(Nile,low.d=.1,high.d=.5,inc.d=.01,p.max=3)
est.farma.wge(Nile,low.d=.1,high.d=.5,inc.d=.01,p.max=3)
This function uses the grid search algorithm discussed in Section 11.5 of Applied Time Series Analysis with R, second edition by Woodward, Gray, and Elliott
est.garma.wge(x,low.u,low.lambda,high.u,high.lambda,inc.u,inc.lambda,p.max,nback=500)
est.garma.wge(x,low.u,low.lambda,high.u,high.lambda,inc.u,inc.lambda,p.max,nback=500)
x |
Realization to be analyzed |
low.u |
The lower limit for u in the grid search |
low.lambda |
The lower limit for lambda in the grid search |
high.u |
The upper limit for u in the grid search |
high.lambda |
The upper limit for lambda in the grid search |
inc.u |
The increment, e.g. .01, .001, etc. in the grid search on possible u values |
inc.lambda |
The increment, e.g. .01, .001, etc. in the grid search on possible lambda values |
p.max |
Maximum value of p allowed for the AR component of the model |
nback |
Number of backcasts to be used (see section 11.5 in Applied Time Series Analysis with R, second edition by Woodward, Gray, and Elliott |
We assume q=0 and do not allow moving average terms in the model.
u |
Estimate of u |
lambda |
Estimate of lambda |
phi |
Estimates of the pth order AR component of the model where p is some integer from 0 to p.max |
vara |
The estimated white noise variance |
aic |
The aic value associated with the final model |
Wayne Woodward
Applied Time Series Analysis with R, second edition by Woodward, Gray, and Elliott. See also Hosking (1984), Gray, Zhang, and Woodward(1989), and Woodward, Cheng, and Gray(1998)
data(llynx) est.garma.wge(llynx,low.u=.4,high.u=.9,low.lambda=.2,high.lambda=.4,inc.u=.01,inc.lambda=.1,p.max=1)
data(llynx) est.garma.wge(llynx,low.u=.4,high.u=.9,low.lambda=.2,high.lambda=.4,inc.u=.01,inc.lambda=.1,p.max=1)
This function uses the technique discussed in Section 13.3.3 of Applied Time Series Analysis with R, second edition by Woodward, Gray, and Elliott to find the g(lambda) time transformation that most nearly transforms the data to a stationary dual.
est.glambda.wge(data, lambda.range = c(0, 1), offset.range = c(0, 100))
est.glambda.wge(data, lambda.range = c(0, 1), offset.range = c(0, 100))
data |
Vector containing the TVF realization to be analyzed |
lambda.range |
Range of lambda values considered in the search |
offset.range |
Range of offset values considered in the search |
Q |
A listing of lambda values within the range and offsets for each lambda that provided the best dual. Also a listing of the test statistic, Q, to be minimized |
best.lambda |
See description of best.offset below |
best.offset |
best.lambda and best.offset are the lambda-offset pair that produced the most stationary dual according to the Q criterion |
Wayne Woodward
Applied Time Series Analysis with R, second edition by Woodward, Gray, and Elliott and Jiang, Gray, and Woodward(2006)
data(ss08) est.glambda.wge(ss08,lambda.range=c(-1,1),offset.range=c(0,100))
data(ss08) est.glambda.wge(ss08,lambda.range=c(-1,1),offset.range=c(0,100))
Performs exponential smoothing on the data in vector x
expsmooth.wge(x,alpha=NULL,n.ahead=0,plot=TRUE)
expsmooth.wge(x,alpha=NULL,n.ahead=0,plot=TRUE)
x |
Vector containing realization |
alpha |
Alpha value |
n.ahead |
Number of steps ahead to forecast |
plot |
If plot=TRUE then plots of the data along with forecasts |
alpha |
alpha value used in the smoothing |
u |
forecasts |
Wayne Woodward
"Time Series for Data Science" by Woodward, Sadler, and Robertson
data(wtcrude2020) expsmooth.wge(wtcrude2020)
data(wtcrude2020) expsmooth.wge(wtcrude2020)
This program finds the ML estimates of a specified order, then prints a factor table for the estimated model and prints and plots the additive components
factor.comp.wge(x, aic = FALSE, p, ncomp)
factor.comp.wge(x, aic = FALSE, p, ncomp)
x |
Realization |
aic |
The program calls basic R function phi.burg to calculate burg estimates of an AR fit to the data. Aic is turned off and the user specifies the order |
p |
Order of AR to fit to data |
ncomp |
Number of additive components to calculate and plot |
ncomp |
The number of additive components |
x.comp |
Matrix (i,j) where i designates the component and j denotes time, i.e. (i,j) denotes the ith component at time j |
Wayne Woodward
"Applied Time Series Analysis with R, 2nd edition" by Woodward, Elliott, and Gray
data(ss08) factor.comp.wge(ss08,p=9,ncomp=4)
data(ss08) factor.comp.wge(ss08,p=9,ncomp=4)
This program produces a factor table that reduces a kth order factor into its first and irreducible second order factors as described in Section 3.2.11 of "Applied Time Series Analysis" by Woodward, Gray, and Elliott
factor.wge(phi=0, theta=0)
factor.wge(phi=0, theta=0)
phi |
Vector containing the coefficients of the kth order AR factor which is to be factored |
theta |
Vector containing the coefficients of the kth order MA factor which is to be factored |
The only output is the factor table, written by default to the console
Wayne Woodward
"Applied Time Series Analysis, 2nd edition" by Woodward, Gray, and Elliott
factor.wge(phi=c(-.3,.44,.29,-.378,-.648))
factor.wge(phi=c(-.3,.44,.29,-.378,-.648))
This is the sum of the three signals in fig1.10b, fig1.10c, and fig1.10d
data("fig1.10a")
data("fig1.10a")
The format is: num [1:1000] 0.0217 -0.1528 -0.3141 -0.4613 -0.5934 ...
Simulated data
Applied Time Series Analysis with R, second edition by Woodward, Gray, and Elliott
data(fig1.10a)
data(fig1.10a)
Low frequency component of Figure 1.10a
data("fig1.10b")
data("fig1.10b")
The format is: num [1:1000] 1 1 0.999 0.998 0.997 ...
Simulated data
Applied Time Series Analysis with R, second edition by Woodward, Gray, and Elliott
data(fig1.10b)
data(fig1.10b)
Middle frequencies component in Figure 1.10a
data("fig1.10c")
data("fig1.10c")
The format is: num [1:1000] 0.73 0.646 0.56 0.471 0.381 ...
Simulated data
Applied Time Series Analysis with R, second edition by Woodward, Gray, and Elliott
data(fig1.10c)
data(fig1.10c)
High frequency component of Figure 1.10a
data("fig1.10d")
data("fig1.10d")
The format is: num [1:1000] -1.71 -1.8 -1.87 -1.93 -1.97 ...
Simulated data
Applied Time Series Analysis with R, second edition by Woodward, Gray, and Elliott
data(fig1.10d)
data(fig1.10d)
Data containing two dominant frequencies
data("fig1.16a")
data("fig1.16a")
The format is: num [1:250] -0.89 -3.209 0.929 -0.763 -1.972 ...
Simulated data
Applied Time Series Analysis with R, second edition by Woodward, Gray, and Elliott
data(fig1.16a)
data(fig1.16a)
Simulated shown in Figure 1.21a of Woodward, Gray, and Elliott text. It illustrates the fact that frequency information is displayed better in the spectrum than the autocorrelations.
data("fig1.21a")
data("fig1.21a")
The format is: num [1:250] -0.89 -3.209 0.929 -0.763 -1.972 ...
Simulated by the authors of the Woodward, Gray, and Elliott text
"Applied Time Series Analysis with R, 2nd edition" by Woodward, Gray, and Elliott
data(fig1.21a)
data(fig1.21a)
Realization of length n=250 of white noise data, Figure 1.22a in "Applied Time Series Analysis with R, 2nd edition" by Woodward, Gray, and Elliott
data("fig1.22a")
data("fig1.22a")
The format is: num [1:250] 0.302 -0.691 -0.477 0.814 -0.267 ...
Simulated data
"Applied Time Series Analysis with R, 2nd edition" by Woodward, Gray, and Elliott
data(fig1.22a)
data(fig1.22a)
Simulated data from an ergodic AR(1) process
data("fig1.5")
data("fig1.5")
The format is: num [1:100] 0.739 -0.39 0.15 -0.627 0.262 ...
Simulated data
Applied Time Series Analysis with R, second edition by Woodward, Gray, and Elliott
data(fig1.5)
data(fig1.5)
Simulated unobservable AR(1) data in Example 10.11
data("fig10.11x")
data("fig10.11x")
The format is: num [1:75] -0.2497 -0.0812 -0.6463 -1.7653 -2.719 ...
Simulated data
Applied Time Series Analysis with R, second edition by Woodward, Gray, and Elliott
data(fig10.11x)
data(fig10.11x)
Simulated observed AR(1) plus noise data in Example 10.11
data("fig10.11y")
data("fig10.11y")
The format is: num [1:75] -0.74 0.045 -0.775 -2.944 -2.278 ...
Simulated data
Applied Time Series Analysis with R, second edition by Woodward, Gray, and Elliott
data(fig10.11y)
data(fig10.11y)
Moody's seasoned Aaa corporate bond rate, January 1, 1991-April1, 2010
data("fig10.1bond")
data("fig10.1bond")
The format is: num [1:232] 7.17 6.51 6.5 6.16 6.03 6.26 6.25 5.79 5.6 5.32 ...
Internet
Applied Time Series Analysis with R, second edition by Woodward, Gray, and Elliott
data(fig10.1bond)
data(fig10.1bond)
6 month CD rate for January 1, 1991 - April 1, 2010
data("fig10.1cd")
data("fig10.1cd")
The format is: num [1:232] 9.04 8.83 8.93 8.86 8.86 9.01 9 8.75 8.61 8.55 ...
Internet
Applied Time Series Analysis with R, second edition by Woodward, Gray, and Elliott
data(fig10.1cd)
data(fig10.1cd)
30 year conventional mortgage rates: January 1, 1991-April1, 2010
data("fig10.1mort")
data("fig10.1mort")
The format is: num [1:232] 9.64 9.37 9.5 9.49 9.47 9.62 9.58 9.24 9.01 8.86 ...
Internet
Applied Time Series Analysis with R, second edition by Woodward, Gray, and Elliott
data(fig10.1mort)
data(fig10.1mort)
Variable X1 for the bivariate Var1) realization in Figure 10.3 of "Applied Time Series Analysis with R, 2nd edition" by Woodward, Gray, and Elliott
data("fig10.3x1")
data("fig10.3x1")
The format is: num [1:75] -0.0757 -0.2728 -0.8089 -2.4747 -5.9256 ...
Simulated Var(1) data
"Applied Time Series Analysis with R, 2nd edition" by Woodward, Gray, and Elliott
data(fig10.3x1)
data(fig10.3x1)
Variable X2 for the bivariate Var1) realization in Figure 10.3 of "Applied Time Series Analysis with R, 2nd edition" by Woodward, Gray, and Elliott
data("fig10.3x2")
data("fig10.3x2")
The format is: num [1:75] 0.646 -1.313 -0.191 -2.61 -4.925 ...
Simulated Var(1) data
"Applied Time Series Analysis with R, 2nd edition" by Woodward, Gray, and Elliott
data(fig10.3x2)
data(fig10.3x2)
Simulated GATMA(1,0) data
data("fig11.12")
data("fig11.12")
The format is: num [1:500] 2.18 -1.17 -3.13 -1.32 1.69 ...
Simulated data
Applied Time Series Analysis with R, second edition by Woodward, Gray, and Elliott
data(fig11.12)
data(fig11.12)
Simulated FARMA(2,0) data
data("fig11.4a")
data("fig11.4a")
The format is: num [1:100] 1.361 -0.369 0.881 2.362 0.236 ...
simulated data
Applied Time Series Analysis with R, second edition by Woodward, Gray, and Elliott
data(fig11.4a)
data(fig11.4a)
Simulated two-frequency data in which the two frequencies are separated in time
data("fig12.1a")
data("fig12.1a")
The format is: num [1:200] -1.22 -6.06 -9.66 -10.14 -8.58 ...
Simulated data
Applied Time Series Analysis with R, second edition by Woodward, Gray, and Elliott
data(fig12.1a)
data(fig12.1a)
Simulated two-frequency AR(4) data
data("fig12.1b")
data("fig12.1b")
The format is: num [1:256] 10.081 10.835 0.532 -5.495 1.294 ...
Simulated data
Applied Time Series Analysis with R, second edition by Woodward, Gray, and Elliott
data(fig12.1b)
data(fig12.1b)
Simulated AR(4) data
data("fig13.18a")
data("fig13.18a")
The format is: num [1:400] 1.251 1.0019 -0.0317 -1.0167 -1.4222 ...
Simulated data
Applied Time Series Analysis with R, second edition by Woodward, Gray, and Elliott
data(fig13.18a)
data(fig13.18a)
Realization from an Euler(2) model
data("fig13.2c")
data("fig13.2c")
The format is: num [1:200] -13.14 -11.03 22.06 -8.92 -16.67 ...
Simulated data
Applied Time Series Analysis with R, second edition by Woodward, Gray, and Elliott
data(fig13.2c)
data(fig13.2c)
AR(2) Realization (1-.95)^2X(t)=a(t) plotted in Figure 3.10d in "Applied Time series Analysis with R, 2nd edition" by Woodward, Gray, and Elliott
data("fig3.10d")
data("fig3.10d")
The format is: num [1:100] 15.3 16.3 18.6 21.2 22.8 ...
This realization is also used in Chapter 7 of text above for testing estimation techniques
Simulated realization
"Applied Time Series Analysis with R, 2nd edition" by Woodward, Gray, and Elliott
data(fig3.10d)
data(fig3.10d)
Realization from the AR(3) model in Figure 3.16a
data("fig3.16a")
data("fig3.16a")
The format is: num [1:200] -0.0686 0.4304 0.4786 0.9899 3.4047 ...
Simulated data
"Applied Time Series Analysis with R, 2nd edition" by Woodward, Gray, and Elliott
data(fig3.16a)
data(fig3.16a)
Realization from the AR(3) model in Figure 3.18a
data("fig3.18a")
data("fig3.18a")
The format is: num [1:200] -0.573 -0.837 -1.16 1.078 -0.561 ...
Simulated data
"Applied Time Series Analysis with R, 2nd edition" by Woodward, Gray, and Elliott
data(fig3.18a)
data(fig3.18a)
ARMA(2,1) realization of length n=200 phi(1)=1.6,phi(2)=-.9,theta(1)=.8 (using Box-Jenkins-Reinsel notation)
data("fig3.24a")
data("fig3.24a")
The format is: num [1:200] 0.685 -1.234 -0.714 0.796 -0.96 ...
Simulated data
Fig3.24a in "Applied Time Series Analysis with R, 2nd edition" by Woodward, Gray, and Elliott
data(fig3.24a)
data(fig3.24a)
Simulated data from stationary seasonal model
data("fig3.29a")
data("fig3.29a")
The format is: num [1:20] -7.23 -6.99 -6.9 -6.26 -3.79 ...
Simulated data
Applied Time Series Analysis with R, second edition by Woodward, Gray, and Elliott
data(fig3.29a)
data(fig3.29a)
Gaussian White Noise, n=1000 shown in Figure 4.8a in "Applied Time Series Analysis with R, 2nd edition" by Woodward, Gray, and Elliott
data("fig4.8a")
data("fig4.8a")
The format is: num [1:1000] -0.585 0.177 0.284 -0.271 0.126 ...
Simulated data
Plotted in "Applied Time Series Analysis with R, 2nd edition" by Woodward, Gray, and Elliott
data(fig4.8a)
data(fig4.8a)
Realization of length 200 from the AR(3) model (1-.995B)(1-1.2B+.8B^2)X(t)=a(t)
data("fig5.3c")
data("fig5.3c")
The format is: num [1:200] -0.503 -0.811 -0.188 1.34 2.982 ...
Simulated data
"Applied Time Series Analysis with R, 2nd edition" by Woodward, Gray, and Elliott
data(fig5.3c)
data(fig5.3c)
First 50 points of data in Figure 6.11a, Applied Time Series Analysis with R, second edition by Woodward, Gray, and Elliott
data("fig6.11a")
data("fig6.11a")
The format is: num [1:50] -0.682 0.15 2.262 3.079 4.122 ...
Simulated
Applied Time Series Analysis with R, second edition by Woodward, Gray, and Elliott
data(fig6.11a)
data(fig6.11a)
Realization from the AR(1) model (1-.8B)(X(t)-25)=a(t) in Figure 6.2 and also shown in Table 6.1 of "Applied Time Series Analysis with R, 2nd edition" by Woodward, Gray, and Elliott
data("fig6.1nf")
data("fig6.1nf")
The format is: num [1:80] 25.1 27.1 27.3 25.7 23.9 ...
Generated data
"Applied Time Series Analysis with R, 2nd edition" by Woodward, Gray, and Elliott
data(fig6.1nf)
data(fig6.1nf)
Realization from the ARMA(2,1) model (1-1.2B+.6B^2)(X(t)-50)=(1-.5B)a(t) in Figure 6.2 and also shown in Table 6.1 of "Applied Time Series Analysis with R, 2nd edition" by Woodward, Gray, and Elliott
data("fig6.2nf")
data("fig6.2nf")
The format is: num [1:25] 49.5 51.1 50 49.7 50.4 ...
Generated data
"Applied Time Series Analysis with R, 2nd edition" by Woodward, Gray, and Elliott
data(fig6.2nf)
data(fig6.2nf)
Realization from the ARIMA(0,1,0) model for realization in Figure 6.5 of "Applied Time Series Analysis with R, 2nd edition" by Woodward, Gray, and Elliott
data("fig6.5nf")
data("fig6.5nf")
The format is: num [1:50] 105 104 103 102 102 ...
Generated data
"Applied Time Series Analysis with R, 2nd edition" by Woodward, Gray, and Elliott
data(fig6.5nf)
data(fig6.5nf)
Realization from the ARIMA(1,1,0) model (1-.8B)(1-B)X(t)=a(t) for realization in Figure 6.6 of "Applied Time Series Analysis with R, 2nd edition" by Woodward, Gray, and Elliott
data("fig6.6nf")
data("fig6.6nf")
The format is: num [1:50] 139 138 138 140 141 ...
Generated data
"Applied Time Series Analysis with R, 2nd edition" by Woodward, Gray, and Elliott
data(fig6.6nf)
data(fig6.6nf)
Realization from the ARIMA(0,2,0) model for realization in Figure 6.7 of "Applied Time Series Analysis with R, 2nd edition" by Woodward, Gray, and Elliott
data("fig6.7nf")
data("fig6.7nf")
The format is: num [1:50] -582 -579 -578 -578 -579 ...
Generated data
"Applied Time Series Analysis with R, 2nd edition" by Woodward, Gray, and Elliott
data(fig6.7nf)
data(fig6.7nf)
Simulated seasonal data designed for showing seasonal forecasts
data("fig6.8nf")
data("fig6.8nf")
The format is: num [1:48] 5.8 13.66 9.83 7.33 6.96 ...
Simulated Data
"Applied Time series Analysis with R, 2nd edition" by Woodward, Gray, and Elliott
data(fig6.8nf)
data(fig6.8nf)
Realization of length n=200 from the model (1-B)(1-1.79B+1.75B^2-1.61B^3+.765B^4)X(t)=a(t)
data("fig8.11a")
data("fig8.11a")
The format is: num [1:200] 83.2 80.9 78.9 80.4 85.4 ...
Simulated data
Applied time series Analysis with R, second edition by Woodward, Gray, and Elliott
data(fig8.11a)
data(fig8.11a)
Realization of length n=200 from the model (1-.8B)(1-1.6B+.995B^2)X(t)=a(t)
data("fig8.4a")
data("fig8.4a")
The format is: num [1:200] 13.45 -5.52 -19 -21.26 -13.63 ...
simulated data
Applied time series Analysis with R, second edition by Woodward, Gray, and Elliott
data(fig8.4a)
data(fig8.4a)
The realization of length n=200 is from the model (1-B)^2(1-1.2B+.6B^2)X(t)=a(t)
data("fig8.6a")
data("fig8.6a")
The format is: num [1:200] 354 368 383 399 417 ...
Simulated data
Applied time series Analysis with R, second edition by Woodward, Gray, and Elliott
data(fig8.6a)
data(fig8.6a)
Realization of length n=200 from the model (1-B^12)(1-1.25B+.9B^2)(X(t)-50)=a(t)
data("fig8.8a")
data("fig8.8a")
The format is: num [1:200] 48.9 42.9 49.3 57.3 55.5 ...
Simulated data
Applied time series Analysis with R, second edition by Woodward, Gray, and Elliott
data(fig8.8a)
data(fig8.8a)
Annual influenza rate for years 1970-2005
data("flu")
data("flu")
The format is: num [1:36] 9.75 5.82 10.99 10.41 8.42 ...
Alder, et al. (2010)Archives of Surgery 145, 63-71
Applied Time Series Analysis with R, second edition by Woodward, Gray, and Elliott
data(flu)
data(flu)
This function calculates forecasts from a known model that may have stationary ARMA components as well as (1-B)^dand/or seasonal factors
fore.arima.wge(x,phi=0,theta=0,d=0,s=0,n.ahead=5,lastn=FALSE,plot=TRUE,alpha=.05,limits)
fore.arima.wge(x,phi=0,theta=0,d=0,s=0,n.ahead=5,lastn=FALSE,plot=TRUE,alpha=.05,limits)
x |
Realization to be forecast from |
phi |
Vector containing stationary AR parameters |
theta |
Vector containing MA parameters |
d |
Order of difference |
s |
Seasonal order |
n.ahead |
Number of steps ahead to forecast |
lastn |
Logical, lastn=TRUE plots forecasts for the last n.ahead values in the realization |
plot |
Logical, plot=TRUE plots forecasts |
alpha |
Significance level for prediction limits |
limits |
Logical, limits=TRUE plots prediction limits |
f |
Vector of forecasts |
ll |
Lower limits |
ul |
Upper limits |
resid |
Residuals |
wnv |
White noise variance estimate |
xbar |
Sample mean of data in x |
se |
Se for each forecast |
psi |
Psi weights |
ptot |
Total order of all AR components, phi, d, and s |
phtot |
Coefficients after multiplying all stationary and nonstationary coponents on the AR side of the equation |
Wayne Woodward
"Applied Time Series Analysis with R, 2nd edition" by Woodward, Gray, and Elliott
data(airline) x=log(airline) phi12=c(-.36,-.05,-.14,-.11,.04,.09,-.02,.02,.17,.03,-.1,-.38) s=12 d=1 fore.arima.wge(x,phi=phi12,d=1,s=12,n.ahead=12,limits=FALSE)
data(airline) x=log(airline) phi12=c(-.36,-.05,-.14,-.11,.04,.09,-.02,.02,.17,.03,-.1,-.38) s=12 d=1 fore.arima.wge(x,phi=phi12,d=1,s=12,n.ahead=12,limits=FALSE)
Forecasts and associated plots for an ARMA model
fore.arma.wge(x,phi=0,theta=0,n.ahead=5,lastn=FALSE,plot=TRUE,alpha=.05,limits=TRUE)
fore.arma.wge(x,phi=0,theta=0,n.ahead=5,lastn=FALSE,plot=TRUE,alpha=.05,limits=TRUE)
x |
Realization |
phi |
AR vector |
theta |
MA vector |
n.ahead |
Number of steps ahead |
lastn |
Logical variable, TRUE means plot forecast for last n.ahead values of realization |
plot |
Logical variable , TRUE means plot forecasts |
alpha |
Significance level for prediction limits |
limits |
Logical variable, TRUE means plot limits |
f |
Vector of forecasts |
ll |
Lower limits |
ul |
Upper limits |
resid |
Residuals |
wnv |
White noise variance estimate |
xbar |
Sample mean of data in x |
se |
Se for each forecast |
psi |
psi weights |
rmse |
RMSE is output if lastn=TRUE |
mad |
MAD is output if lastn=TRUE |
Wayne Woodward
"Applied Time Series Analysis with R, 2nd edition" by Woodward, Gray, and Elliott
data(fig6.1nf) fore.arma.wge(fig6.1nf,phi=.8,n.ahead=20)
data(fig6.1nf) fore.arma.wge(fig6.1nf,phi=.8,n.ahead=20)
This function calculates forecasts from a known model that may have stationary ARMA components as well as (1-B)^d, seasonal, and/or other nonstationary factors
fore.aruma.wge(x,phi=0,theta=0,d=0,s=0,lambda=0,n.ahead=5, lastn=FALSE,plot=TRUE,alpha=.05,limits=TRUE)
fore.aruma.wge(x,phi=0,theta=0,d=0,s=0,lambda=0,n.ahead=5, lastn=FALSE,plot=TRUE,alpha=.05,limits=TRUE)
x |
Realization to be forecast from |
phi |
Vector containing stationary AR parameters |
theta |
Vector containing MA parameters |
d |
Order of difference |
s |
Seasonal order |
lambda |
Vector containing coefficients of nonstationary factors not covered by the difference or the seasonal factors |
n.ahead |
Number of steps ahead to forecast |
lastn |
Logical, lastn=TRUE plots forecasts for the last n.ahead values in the realization |
plot |
Logical, plot=TRUE plots forecasts |
alpha |
Alpha for prediction limits |
limits |
Logical, limits=TRUE plots prediction limits |
f |
Vector of forecasts |
ll |
Lower limits |
ul |
Upper limits |
resid |
Residuals |
wnv |
White noise variance estimate |
xbar |
Sample mean of data in x |
se |
Se for each forecast |
psi |
Psi weights |
ptot.fore |
Total order of all AR components, phi, d, s, and lambda |
phtot.fore |
Coefficients after multiplying all stationary and nonstationary coponents on the AR side of the equation |
Wayne Woodward
"Applied Time Series Analysis with R, 2nd edition" by Woodward, Gray, and Elliott
data(airline) x=log(airline) phi12=c(-.36,-.05,-.14,-.11,.04,.09,-.02,.02,.17,.03,-.1,-.38) s=12 d=1 fore.aruma.wge(x,phi=phi12,d=1,s=12,n.ahead=12,limits=FALSE)
data(airline) x=log(airline) phi12=c(-.36,-.05,-.14,-.11,.04,.09,-.02,.02,.17,.03,-.1,-.38) s=12 d=1 fore.aruma.wge(x,phi=phi12,d=1,s=12,n.ahead=12,limits=FALSE)
Find forecasts using a specified FARMA model
fore.farma.wge(x, d, phi, theta = 0, n.ahead = 10, lastn = TRUE, plot = TRUE)
fore.farma.wge(x, d, phi, theta = 0, n.ahead = 10, lastn = TRUE, plot = TRUE)
x |
Realization to be analyzed |
d |
Parameter d in FARMA model |
phi |
Coefficients of the AR component of the FARMA model |
theta |
Coefficients of the MA component of the FARMA model |
n.ahead |
Number of values to forecast |
lastn |
If lastn=TRUE then the last n.ahead values are forecast. Otherwise, if lastn=FALSE the next n.ahead values are forecast |
plot |
If plot=TRUE then plots of the data and forecasts are plotted |
Forecasts for an AR model fit to the data are also calculated and optionally plotted
ar.fit.order |
Order of the AR model fit to the data |
ar.fore |
Forecasts based on the AR model |
farma.fore |
Forecasts based on the FARMA model |
Wayne Woodward
Applied Time Series Analysis with R, second edition by Woodward, Gray, and Elliott
fore.farma.wge(Nile, d=.37, phi=0, theta = 0, n.ahead = 30, lastn = TRUE, plot = TRUE)
fore.farma.wge(Nile, d=.37, phi=0, theta = 0, n.ahead = 30, lastn = TRUE, plot = TRUE)
Find forecasts using a specified GARMA model
fore.garma.wge(x,u,lambda,phi,theta=0,n.ahead=10,lastn=TRUE,plot=TRUE)
fore.garma.wge(x,u,lambda,phi,theta=0,n.ahead=10,lastn=TRUE,plot=TRUE)
x |
Realization to be analyzed |
u |
Parameter u in GARMA model |
lambda |
Parameter lambda in GARMA model |
phi |
Coefficients of the AR component of the GARMA model |
theta |
Coefficients of the MA component of the GARMA model |
n.ahead |
Number of values to forecast |
lastn |
If lastn=TRUE then the last n.ahead values are forecast. Otherwise, if lastn=FALSE the next n.ahead values are forecast |
plot |
If plot=TRUE then plots of the data and forecasts are plotted |
Forecasts for an AR model fit to the data are also calculated and optionally plotted
ar.fit.order |
Order of the AR model fit to the data |
ar.fore |
Forecasts based on the AR model |
garma.fore |
Forecasts based on the GARMA model |
Wayne Woodward
Applied Time Series Analysis with R, second edition by Woodward, Gray, and Elliott
data(llynx) fore.garma.wge(llynx,u=.796,lambda=.4,phi=.51,theta=0,n.ahead=30,lastn=TRUE,plot=TRUE)
data(llynx) fore.garma.wge(llynx,u=.796,lambda=.4,phi=.51,theta=0,n.ahead=30,lastn=TRUE,plot=TRUE)
Find forecasts using a specified G(lambda) model
fore.glambda.wge(data.orig,lambda=0,offset=60,phi=0,h=0,n.ahead=10,lastn=TRUE,plot=TRUE)
fore.glambda.wge(data.orig,lambda=0,offset=60,phi=0,h=0,n.ahead=10,lastn=TRUE,plot=TRUE)
data.orig |
Time series data in the original time scale |
lambda |
The value of lambda under the Box-Cox time transformation with parameter lambda. |
offset |
Offset (or shift) value in the G(lambda) model. |
phi |
Coefficients of the AR component of the AR model fit to the dual data |
h |
Value of h which will be calculated to produce the desired number of forecasts in the original time scale |
n.ahead |
Number of values to forecast |
lastn |
If lastn=TRUE then the last n.ahead values are forecast. Otherwise, if lastn=FALSE the next n.ahead values are forecast |
plot |
If plot=TRUE then plots of the data and forecasts are plotted |
Forecasts for an AR model fit to the data in the original time scale are also calculated and optionally plotted
f.ar |
Forecasts using AR model fit to data in original time |
f.glam |
Forecasts using AR model fit to the dual and then reinterpolated |
Wayne Woodward
Applied Time Series Analysis with R, second edition by Woodward, Gray, and Elliott
data(fig13.2c) fore.glambda.wge(fig13.2c,lambda=-.4,offset=63,phi=c(0.93,-0.32,-0.15,-0.15,-0.17),n.ahead=30)
data(fig13.2c) fore.glambda.wge(fig13.2c,lambda=-.4,offset=63,phi=c(0.93,-0.32,-0.15,-0.15,-0.17),n.ahead=30)
Forecast models of the form line plus AR noise or cosine plus AR noise with known frequency
fore.sigplusnoise.wge(x,linear=TRUE,method="mle",freq=0,max.p=5, n.ahead=10,lastn=FALSE,plot=TRUE,alpha=.05,limits=TRUE)
fore.sigplusnoise.wge(x,linear=TRUE,method="mle",freq=0,max.p=5, n.ahead=10,lastn=FALSE,plot=TRUE,alpha=.05,limits=TRUE)
x |
The variable containing the realization to be analyzed |
linear |
If TRUE then the program forecasts a line plus noise model. If FALSE the model is cosine plus noise |
method |
Estimation method |
freq |
Frequency of the cosine term. freq is ignored when using line plus noise |
max.p |
Max value of p for the ARp model fit to the noise |
n.ahead |
The number of steps ahead to forecast |
lastn |
If TRUE then the function forecasts the last n.ahead values of the realization. If FALSE the the forecasts are for n.ahead steps beyond the end of the realization |
plot |
If TRUE then the forecasts and realization are plotted |
alpha |
Significance level |
limits |
If TRUE the forecast limits calculated and plotted |
f |
The n.ahead forecasts |
ll |
The lower limits for the forecasts. zeros are returned if limits were not requested |
ul |
The upper limits for the forecasts. zeros are returned if limits were not requested |
res |
Residuals |
wnv |
The estimated white noise variance based on the residuals |
se |
se is the estimated standard error of the k step ahead forecast. zeros are returned if limits were not requested |
xi |
xi is the kth psi weight associated with the fitted AR model and used to calculate the se above. Note that psi0 is1. zeros are returned if limits were not requested |
Wayne Woodward
"Applied Time Series Analysis with R, 2nd edition" by Woodward, Gray, and Elliott
data(llynx) llynx.for=fore.sigplusnoise.wge(llynx,linear=FALSE,freq=.1,max.p=5,n.ahead=20)
data(llynx) llynx.for=fore.sigplusnoise.wge(llynx,linear=FALSE,freq=.1,max.p=5,n.ahead=20)
Each data value represents the minimum temperature over 10-day period at a location in South America
data("freeze")
data("freeze")
The format is: num [1:500] 8.2 12.3 9.2 8.4 10 8.8 6.8 4.8 5.2 1.7 ...
Unknown
"Applied Time Series Analysis with R, 2nd edition" by Woodward, Gray, and Elliott
data(freeze)
data(freeze)
9 years of monthly freight shipment data
data("freight")
data("freight")
The format is: num [1:120] 1299 1148 1345 1363 1374 ...
Unknown
"Applied Time Series Analysis with R, 2nd edition" by Woodward, Gray, and Elliott
data(freight)
data(freight)
Calculates Gegenbauer polynomials of order n with parameters u and lambda - see (11.9) in Applied Time Series Analysis with R, second edition by Woodward, Gray, and Elliott
gegenb.wge(u, d, n)
gegenb.wge(u, d, n)
u |
Parameter u in (11.9) Applied Time Series Analysis with R, second edition by Woodward, Gray, and Elliott |
d |
Parameter lambda in (11.9) Applied Time Series Analysis with R, second edition by Woodward, Gray, and Elliott |
n |
Order of Gegenbauer polynomial in (11.9) |
This function is called by gen.garma.wge
The coefficients of the nth order Gegenbauer polynomial
Wayne Woodward
Applied Time Series Analysis with R, second edition by Woodward, Gray, and Elliott
gegenb.wge(u=.8,d=.3,n=6)
gegenb.wge(u=.8,d=.3,n=6)
Generates a realization of length n from the GARCH(q0) model (4.23) in "Applied Time Series Analysis with R, 2nd edition" by Woodward, Gray, and Elliott
gen.arch.wge(n, alpha0, alpha, plot = TRUE,sn=0)
gen.arch.wge(n, alpha0, alpha, plot = TRUE,sn=0)
n |
Length of realization to be generated |
alpha0 |
The constant alpha0 in model (4.23) |
alpha |
A vector of length q0 containing alpha1 through alphaq0 |
plot |
If plot=TRUE (default) the generated realization is plotted |
sn |
determines the seed used in the simulation. sn=0 produces new/random realization each time. sn=positive integer produces same realization each time |
returns the generated realization
Wayne Woodward
"Applied Time Series Analysis with R, 2nd edition" by Woodward, Gray, and Elliott
gen.arch.wge(n=200,alpha0=.1,alpha=c(.36,.27,.18,.09))
gen.arch.wge(n=200,alpha0=.1,alpha=c(.36,.27,.18,.09))
This function calls arima.sim but with more simple parameter structure for stationary ARIMA (or ARMA) models
gen.arima.wge(n, phi=0, theta=0, d=0,s=0,mu=0,vara=1,plot=TRUE,sn=0)
gen.arima.wge(n, phi=0, theta=0, d=0,s=0,mu=0,vara=1,plot=TRUE,sn=0)
n |
Length of realization to be generated |
phi |
Vector of AR coefficients |
theta |
Vector of MA coefficients |
d |
Order of the difference |
s |
Seasonal order |
vara |
White noise variance, default=1 |
mu |
Theoretical mean of data in x, default=0 |
plot |
Logical: TRUE=plot, FALSE=no plot |
sn |
determines the seed used in the simulation. sn=0 produces new/random realization each time. sn=positive integer produces same realization each time |
This function simply generates and (optionally plots) an ARIMA (or ARMA) realization
Wayne Woodward
"Applied Time Series Analysis with R, 2nd edition" by Woodward, Gray, and Elliott
gen.arima.wge(n=100, phi=c(1.6,-.9), theta=.8, d=1, vara=1, plot=TRUE)
gen.arima.wge(n=100, phi=c(1.6,-.9), theta=.8, d=1, vara=1, plot=TRUE)
This function calls arima.sim but with more simple parameter structure for stationary ARMA models
gen.arma.wge(n, phi=0, theta=0, mu=0,vara = 1,plot = TRUE,sn=0)
gen.arma.wge(n, phi=0, theta=0, mu=0,vara = 1,plot = TRUE,sn=0)
n |
Length of realization to be generated |
phi |
Vector of AR coefficients |
theta |
Vector of MA coefficients |
vara |
White noise variance, default=1 |
mu |
Theoretical mean, default=0 |
plot |
Logical: TRUE=plot, FALSE=no plot |
sn |
determines the seed used in the simulation. sn=0 produces new/random realization each time. sn=positive integer produces same realization each time |
This function simply generates and (optionally plots) an ARMA realization
Wayne Woodward
"Applied Time Series Analysis with R, 2nd edition" by Woodward, Gray, and Elliott
gen.arma.wge(n=100, phi=c(1.6,-.9), theta=.8, mu=50,vara=1, plot=TRUE)
gen.arma.wge(n=100, phi=c(1.6,-.9), theta=.8, mu=50,vara=1, plot=TRUE)
This function calls arima.sim but an a similar manner to gen.ns.arma.wge and gen.ns.arima.wge but allows for generation of realizations from ARUMA models (see Chapter 5 of "Applied Time Series Analysis with R, 2nd edition" by Woodward, Gray, and Elliott
gen.aruma.wge(n,phi=0,theta=0,d=0,s=0,lambda=0,vara=1,plot=TRUE,sn=0)
gen.aruma.wge(n,phi=0,theta=0,d=0,s=0,lambda=0,vara=1,plot=TRUE,sn=0)
n |
Length of realization to be generated |
phi |
Vector of AR coefficients |
theta |
Vector of MA coefficients |
d |
Order of the difference |
s |
Order of seasonal operator |
lambda |
Vector of nonstaionary coefficients not associated with d or s (see Def. 5.1(b) in Woodward, Gray, and Elliott text) |
vara |
White noise variance, default=1 |
plot |
Logical: TRUE=plot, FALSE=no plot |
sn |
determines the seed used in the simulation. sn=0 produces new/random realization each time. sn=positive integer produces same realization each time |
This function generates and (optionally plots) an ARMA or ARIMA or ARUMA realization
Wayne Woodward
"Applied Time Series Analysis with R, 2nd edition" by Woodward, Gray, and Elliott
gen.aruma.wge(n=100,phi=.7,theta=0, d=1, s=4,lambda=c(1.8,-1),vara=1, plot=TRUE)
gen.aruma.wge(n=100,phi=.7,theta=0, d=1, s=4,lambda=c(1.8,-1),vara=1, plot=TRUE)
Generates a realization of length n from the GARCH(p0,q0) model (4.26) in "Applied Time Series Analysis with R, 2nd edition" by Woodward, Gray, and Elliott
gen.garch.wge(n,alpha0,alpha,beta,plot=TRUE,sn=0)
gen.garch.wge(n,alpha0,alpha,beta,plot=TRUE,sn=0)
n |
Length of realization to be generated |
alpha0 |
The constant alpha0 in model (4.23) |
alpha |
A vector of length q0 containing alpha1 through alphaq0 |
beta |
A vector of length p0 containing beta1 through betap0 |
plot |
If plot=TRUE (default) the generated realization is plotted |
sn |
determines the seed used in the simulation. sn=0 produces new/random realization each time. sn=positive integer produces same realization each time |
returns the generated realization
Wayne Woodward
"Applied Time Series Analysis with R, 2nd edition" by Woodward, Gray, and Elliott
gen.garch.wge(n=200,alpha0=.1,alpha=.45,beta=.45)
gen.garch.wge(n=200,alpha0=.1,alpha=.45,beta=.45)
This function calls gen.geg.wge and arima.sim
gen.garma.wge(n,u,lambda,phi = 0,theta=0,trun=300000,burn_in=600,vara=1,plot=TRUE,sn=0)
gen.garma.wge(n,u,lambda,phi = 0,theta=0,trun=300000,burn_in=600,vara=1,plot=TRUE,sn=0)
n |
the realization length to be generated |
u |
Parameter u in the GARMA model given in (11.16) of Woodward, Gray, and Elliott text |
lambda |
Parameter lambda in the GARMA model given in (11.16) of Woodward, Gray, and Elliott text |
phi |
vector of AR parameters of ARMA part of GARMA model |
theta |
vector of MA parameters of ARMA part of GARMA model using signs as given ijn the Woodward, Grayu, and Elliott text |
trun |
the truncation point of the infinite GLP form |
burn_in |
is the burning-in period for the simulation |
vara |
White noise variance, default=1 |
plot |
Logical: TRUE=plot, FALSE=no plot |
sn |
determines the seed used in the simulation. sn=0 produces new/random realization each time. sn=positive integer produces same realization each time |
This function generates and (optionally plots) an GARMA realization
Wayne Woodward
"Applied Time Series Analysis with R, 2nd edition" by Woodward, Gray, and Elliott
gen.garma.wge(n=100, u=.8,lambda=.4,phi=.9)
gen.garma.wge(n=100, u=.8,lambda=.4,phi=.9)
This function calls macoef.wge
gen.geg.wge(n, u, lambda, trun = 300000, vara=1 ,sn = 0)
gen.geg.wge(n, u, lambda, trun = 300000, vara=1 ,sn = 0)
n |
the realization length to be generated |
u |
Parameter u in the Gegenbauer model given in (11.12) of Woodward, Gray, and Elliott text |
lambda |
Parameter lambda in the Gegenbauer model given in (11.12) of Woodward, Gray, and Elliott text |
trun |
the truncation point of the infinite GLP form |
vara |
White noise variance, default=1 |
sn |
determines the seed used in the simulation. sn=0 produces new/random realization each time. sn=positive integer produces same realization each time |
This function is called by gen.garma.wge and does not have a burn-in time. Thus, we recommend using est.garma.wge for generating realizations from a Gegenbauer model.
This function generates a Gegenbauer realization
Wayne Woodward
"Applied Time Series Analysis with R, 2nd edition" by Woodward, Gray, and Elliott
gen.geg.wge(n=100, u=.8,lambda=.4)
gen.geg.wge(n=100, u=.8,lambda=.4)
This function generates a g(lambda) TVF realization as discussed in Chapter 13 of Applied Time Series Analysis with R, second edition by Woodward, Gray, and Elliott
gen.glambda.wge(n, lambda, phi =0, offset = 20, vara = 1, plot = TRUE, sn = 0)
gen.glambda.wge(n, lambda, phi =0, offset = 20, vara = 1, plot = TRUE, sn = 0)
n |
Length of realization to be generated |
lambda |
The lambda involved in the g(lambda) time transformation - see Applied Time Series Analysis with R, second edition by Woodward, Gray, and Elliott |
phi |
Vector of AR coefficients |
vara |
White noise variance, default=1 |
offset |
The offset parameter in a g(lambda) process. See section 13.2 in Applied Time Series Analysis with R, second edition by Woodward, Gray, and Elliott |
plot |
Logical: TRUE=plot, FALSE=no plot |
sn |
determines the seed used in the simulation. sn=0 produces new/random realization each time. sn=positive integer produces same realization each time |
This function simply generates and (optionally plots) an ARMA realization
Wayne Woodward
"Applied Time Series Analysis with R, 2nd edition" by Woodward, Gray, and Elliott
gen.glambda.wge(n=500, lambda=0.5,phi=c(1.9,-.99), vara=1, plot=TRUE,sn=0)
gen.glambda.wge(n=500, lambda=0.5,phi=c(1.9,-.99), vara=1, plot=TRUE,sn=0)
Generate a realization from the model x(t)=coef[1]*cos(2*pi*freq[1]*t+psi[1])+coef[2]*cos(2*pi*freq[2]*t+psi[2])+a(t)
gen.sigplusnoise.wge(n,b0,b1=0,coef,freq,psi,phi=0,vara=1,plot=TRUE,sn=0)
gen.sigplusnoise.wge(n,b0,b1=0,coef,freq,psi,phi=0,vara=1,plot=TRUE,sn=0)
n |
length of realization to be generated |
b0 |
y intercept of the linear component |
b1 |
slope of the linear component |
coef |
a 2-component vector specifying the coefficients (if only one cosine term is desired define coef[2]=0) |
freq |
a 2-component vector specifying the frequency components (0 to .5) |
psi |
a 2-component vector specifying the phase shift (0 to 2pi) |
phi |
a vector of coefficients of the coefficients of the AR noise |
vara |
vara is the variance of the noise. NOTE: a(t) is a vector of N(0,WNV) noise generated within the function (default=1) |
plot |
if TRUE then plot the data generated (default=TRUE) |
sn |
determines the seed used in the simulation (default=0 indicating new realization each time). sn=positve integer, then the same realization is generated each time |
x |
realization generated |
Wayne Woodward
Applied Time Series Analysis with R, second edition by Woodward, Gray, and Elliott
x=gen.sigplusnoise.wge(n=100,coef=c(3,1),freq=c(.1,.4),psi=c(0,0),vara=2)
x=gen.sigplusnoise.wge(n=100,coef=c(3,1),freq=c(.1,.4),psi=c(0,0),vara=2)
Annual temperature anomalies from the average for the years 1850-2009
data("global.temp")
data("global.temp")
The format is: List of 2 $ year : num [1:160] 1850 1851 1852 1853 1854 ... $ annual: num [1:160] -0.447 -0.292 -0.294 -0.337 -0.307 -0.321 -0.406 -0.503 -0.513 -0.349 ...
Climatic Research Unit at East Anglia, England, in conjunction with the Met Office Hadley Centre
"Applied Time Series Analysis with R, 2nd edition" by Woodward, Gray, and Elliott
data(global.temp)
data(global.temp)
Annual temperature anomalies from the average for the years 1850-2009
data("global.temp")
data("global.temp")
The format is: ts file containing annual temperatures from 1880 through 2020
ncdc.noaa.gov
"Time Series for Data Sience: Analysis and Forecasting" by Woodward, Sadler, and Robertson
data(global2020)
data(global2020)
Global temperature data for 1850-2009. The data are temperature anomalies, i.e. departures from the average for 1850-2009
data("hadley")
data("hadley")
The format is: num [1:160] -0.447 -0.292 -0.294 -0.337 -0.307 -0.321 -0.406 -0.503 -0.513 -0.349 ...
Met Office Hadley Centre
"Applied Time Series Analysis with R, 2nd edition" by Woodward, Gray, and Elliott
data(hadley)
data(hadley)
Function is used with the tswge function wv.wge
hilbert.wge(input)
hilbert.wge(input)
input |
realization to be analyzed |
ans |
Hilbert transformation of the input |
Wayne Woodward
Applied Time Series Analysis with R, second edition by Woodward, Gray, and Elliott
data(airline) hilbert.wge(airline)
data(airline) hilbert.wge(airline)
Calculates instantaneous spectrum (in dB) based on a G(lambda) time transformation
is.glambda.wge(n, phi = 0, sigma2 = 1, lambda, offset)
is.glambda.wge(n, phi = 0, sigma2 = 1, lambda, offset)
n |
Length of realization. |
phi |
Coefficients of AR model fit to dual data. |
sigma2 |
White noise variance |
lambda |
Lambda in the G(lambda) time transformnation used |
offset |
Offset in the G(lambda) time transformnation used |
Simply a plot of the realization
Wayne Woodward
"Applied Time Series Analysis with R, 2nd edition" by Woodward, Gray, and Elliott
is.glambda.wge(n=200,phi=c(.93,-.32,-.15,-.15,-.17),lambda=-.4,offset=63)
is.glambda.wge(n=200,phi=c(.93,-.32,-.15,-.15,-.17),lambda=-.4,offset=63)
Calculates sample instantaneous spectrum (in dB) based on a G(lambda) time transformation
is.sample.wge(data, lambda, offset)
is.sample.wge(data, lambda, offset)
data |
Realization to be analyzed. |
lambda |
Lambda in the G(lambda) time transformation used |
offset |
Offset in the G(lambda) time transformation used |
Simply a plot of the realization
Wayne Woodward
"Applied Time Series Analysis with R, 2nd edition" by Woodward, Gray, and Elliott
data(ss08) is.sample.wge(data=ss08,lambda=-.4,offset=63)
data(ss08) is.sample.wge(data=ss08,lambda=-.4,offset=63)
Kalman function to predict, filter, and smooth in the presence of missing data; see Section 10.6 4 in Applied Time Series Analysis with R
kalman.miss.wge(y,start, gam0, F, gamV, Gtmiss, gamW)
kalman.miss.wge(y,start, gam0, F, gamV, Gtmiss, gamW)
y |
the univariate data set to be analyzed |
start |
the scalar version of X(0) in item (c) following the state equation (10.47) of the text |
gam0 |
the scalar version of Gamma(0) discussed in item (c) following the state equation |
F |
scalar version of the matrix F in the state equation |
gamV |
the value Gamma(v) specified in item (b) following the state equation |
Gtmiss |
specifies which items that are missing |
gamW |
the variance of the (univariate) white noise denoted by Gamma(w) in item (c) following (10.48) |
pfs |
a table giving results such as those in Table 10.1 in Woodward, Gray, and Elliott book |
Calls Ksmooth1 in CRAN package 'astsa'
Wayne Woodward
Applied Time Series Analysis with R, second edition by Woodward, Gray, and Elliott
data(table10.1.signal) data(table10.1.noise) spn=table10.1.signal+table10.1.noise n=75 Gtmiss=array(1,dim=c(1,1,n)) Gtmiss[1,1,2]=0 Gtmiss[1,1,5]=0 kalman.miss.wge(y=spn,start=0,gam0=1,F=.9,gamV=1,Gtmiss,gamW=.75)
data(table10.1.signal) data(table10.1.noise) spn=table10.1.signal+table10.1.noise n=75 Gtmiss=array(1,dim=c(1,1,n)) Gtmiss[1,1,2]=0 Gtmiss[1,1,5]=0 kalman.miss.wge(y=spn,start=0,gam0=1,F=.9,gamV=1,Gtmiss,gamW=.75)
Kalman filter program to predict, filter, and smooth related to the material in Section 10.6 4 in Applied Time Series Analysis with R, second edition by Woodward, Gray, and Elliott
kalman.wge(y, start, gam0, F, gamV, G, gamW)
kalman.wge(y, start, gam0, F, gamV, G, gamW)
y |
the univariate data set to be analyzed |
start |
the scalar version of Xo in item (c) following the state equation (10.47) of the text |
gam0 |
the scalar version of Gamma(0) discussed in item (c) following the state equation |
F |
scalar version of the matrix F in the state equation |
gamV |
the value Gamma(v) specified in item (b) following the state equation |
G |
the scalar observation matrix specified in the observation equation as G(t) |
gamW |
the variance of the (univariate) white noise denoted by Gamma(w) in item (c) following (10.48) |
pfs |
a table giving results such as those in Table 10.1 in Woodward, Gray, and Elliott book |
Requires CRAN package 'astsa'
Wayne Woodward
Applied Time Series Analysis with R, second edition by Woodward, Gray, and Elliott
data(table10.1.signal) data(table10.1.noise) spn=table10.1.signal+table10.1.noise kalman.wge(y=spn,start=0,gam0=1,F=.9,gamV=1,G=1,gamW=.75)
data(table10.1.signal) data(table10.1.noise) spn=table10.1.signal+table10.1.noise kalman.wge(y=spn,start=0,gam0=1,F=.9,gamV=1,G=1,gamW=.75)
Digitized record taken at 8,000 Hz of voltage readings obtained from the acoustical energy generated by Wayne Woodward speaking the words "King Kong eats grass" while a fan was blowing in the background
data("kingkong")
data("kingkong")
The format is: num [1:15418] -0.001831 -0.000916 -0.003357 -0.002716 -0.000977 ...
See description above
"Applied Time Series Analysis with R, 2nd edition" by Woodward, Gray, and Elliott
data(kingkong)
data(kingkong)
Data given in feet above sea level. Quarterly data, 1982-2009
data("lavon")
data("lavon")
The format is: num [1:112] 495 492 500 491 492 ...
http://lavon.uslakes.info/levelcal.asp
"Applied Time Series Analysis with R, 2nd edition" by Woodward, Gray, and Elliott
data(lavon)
data(lavon)
Feet above sea level for Lavon Lake, quarterly data through September 2015. An extension of data lavon
data("lavon15")
data("lavon15")
The format is: num [1:135] 495 492 500 491 492 ...
Lake Data internet
data(lavon15)
data(lavon15)
256 point linear chirp data, the first 150 points of which are shown in Figure 3.16(a) Time Series Analysis for Data Science: Analysis and Forecasting by Woodward, Sadler, and Robertson
data("linearchirp")
data("linearchirp")
The format is: List of 2 $ x : num [1:256] 1 1 0.98 0.95 0.91 0.86 0.8 0.72 0.63 0.53 ... $ spec: num [1:256] 0.511 0.568 0.733 0.991 1.32 ...
Simulated data
Time Series Analysis for Data Science: Analysis and Forecasting by Woodward, Sadler, and Robertson
data(linearchirp)
data(linearchirp)
Performs Ljung-Box Test for white noise
ljung.wge(x, K = 24, p = 0, q = 0)
ljung.wge(x, K = 24, p = 0, q = 0)
x |
Realization to assess for white noise |
K |
Maximum lag for sample autocorrelations to be used in test |
p |
If x is a realization of residuals from an ARMA(p,q) fit then p=AR order. Otherwise, p=0 |
q |
If x is a realization of residuals from an ARMA(p,q) fit then q=MA order. Otherwise, q=0 |
test |
Name of test for output: Ljung-Box Test |
K |
Maximum lag : same as input value |
chi.square |
Value of chi-square statistic |
df |
Degrees of freedom = K-p-q |
pvalue |
pvalue for testing null hypothesis of white noise |
Wayne Woodward
"Applied Time Series Analysis with R, 2nd edition" by Woodward, Gray, and Elliott
data(fig1.22a) ljung.wge(fig1.22a, K=24,p=0,q=0)
data(fig1.22a) ljung.wge(fig1.22a, K=24,p=0,q=0)
The log (base 10) of the annual number of lynx trapped in the Mackenzie River district of the North-West Canada (dataset lynx in this package)
data("llynx")
data("llynx")
The format is: Time-Series [1:114] from 1821 to 1934: 2.43 2.51 2.77 2.94 3.17 ...
Tong (1977). Journal of the Royal Statistical Society A, 432-436.
Applied Time Series Analysis with R, second edition by Woodward, Gray, and Elliott
data(llynx)
data(llynx)
The lynx data are the annual number of lynx trapped in the Mackenzie River district of Canada
data("lynx")
data("lynx")
The format is: Time-Series [1:114] from 1821 to 1934: 269 321 585 871 1475 ...
Tong (1977). Journal of the Royal Statistical Society A, 432-436.
Applied Time Series Analysis with R, second edition by Woodward, Gray, and Elliott
data(lynx)
data(lynx)
Given a time series in the vector x and order (either an odd or even integer) ma.pred.wge computes a predictive moving average giving 1-step ahead predictions through x(n+1). Optionally, you can specify k-step ahead forecasts beyond the end of the data.
ma.pred.wge(x,order=3,n.ahead=1,plot=TRUE)
ma.pred.wge(x,order=3,n.ahead=1,plot=TRUE)
x |
Vector containing original realization |
order |
Order (odd or even integer) of moving average predictor (default=3) |
n.ahead |
Number of steps ahead to forecast beyond the end of the data (default=1) |
plot |
If plot=TRUE then plots of the data and moving average predictors are plotted |
x |
Original data |
pred |
Data file showing 1-step ahead predictors up to x(k.ahead) |
order |
Order (odd or even integer) of the moving average predictor |
Wayne Woodward
"Practical Time Series Analysis with R" by Woodward, Sadler, and Robertson"
data(wtcrude) sm=ma.pred.wge(x=wtcrude,order=5,n.ahead=10)
data(wtcrude) sm=ma.pred.wge(x=wtcrude,order=5,n.ahead=10)
Given a time series in the vector x and order (either an odd or even integer) ma.smooth.wge computes a centered moving average smoother and optionally plots the data and smoothed data
ma.smooth.wge(x,order=3,plot=TRUE)
ma.smooth.wge(x,order=3,plot=TRUE)
x |
Vector containing original realization |
order |
Order (odd or even integer) of moving average smoother |
plot |
If plot=TRUE then plots of the data and smoothed data are plotted |
x |
Original data |
smooth |
Data after application of centered average filter.l |
order |
Order (odd or even integer) of the smoother |
Wayne Woodward
"Practical Time Series Analysis with R" by Woodward, Sadler, and Robertson"
data(wtcrude) sm=ma.smooth.wge(x=wtcrude,order=5)
data(wtcrude) sm=ma.smooth.wge(x=wtcrude,order=5)
This realization is used to obtain the innovations estimates shown in Table 7.1
data("ma2.table7.1")
data("ma2.table7.1")
The format is: num [1:400] 1.299 1.831 -0.162 -0.648 1.243 ...
Simulated data
Applied Time Series Analysis with R, second edition by Woodward, Gray, and Elliott
data(ma2.table7.1)
data(ma2.table7.1)
Calculate coefficients of the general linear process form of a Gegenbauer process based on formula (8), page 6 of Ferrara and Guegan(2001).
macoef.geg.wge(u, lambda, trun = 300000)
macoef.geg.wge(u, lambda, trun = 300000)
u |
The value of u in the Gegenbauer model |
lambda |
The value of lambda in the Gegenbauer model |
trun |
The truncation point of the infinite GLP form |
This function is called by gen.geg.wge
A vector of length trun containing the GLP coefficients
Wayne Woodward
Applied Time Series Analysis with R, second edition by Woodward, Gray, and Elliott and Ferrara and Guegan(2001)
mageg=macoef.geg.wge(u=.8,lambda=.3)
mageg=macoef.geg.wge(u=.8,lambda=.3)
Lg wave from from an earthquake known as Massachusetts Mountain Earthquake(5 August 1971), which was recorded at the Mina Nevada station
data("mass.mountain")
data("mass.mountain")
The format is: num [1:454] -0.03655 -0.01774 0.00218 0.01193 0.00915 ...
Gupta, Chan, and Wagner (2005). Regional sources discrimination of small events based on the use of Lg wavetrain, Bulletin of the Seismological Society of America 95, 341-346.
"Applied Time Series Analysis with R, 2nd edition" by Woodward, Gray, and Elliott
data(mass.mountain)
data(mass.mountain)
Median days a house stayed on the market between July 2016 and April 2020
data("MedDays")
data("MedDays")
ts object consisting of monthly data from July 2016 through April 2020
"Time Series for Data Sience: Analysis and Forecasting" by Woodward, Sadler, and Robertson
data(MedDays)
data(MedDays)
Lg wave for Massachusetts Mountain Earthquake
data("mm.eq")
data("mm.eq")
The format is: num [1:454] -0.03655 -0.01774 0.00218 0.01193 0.00915 ...
Gupta, et al. (2005) Bulletin of the Seismological Society of America 95, 341-346.
Applied Time Series Analysis with R, second edition by Woodward, Gray, and Elliott
data(mm.eq)
data(mm.eq)
The function multiplies the AR (or MA) factors of a model to produce the model in unfactored form. Requires the CRAN package 'PolynomF'.
mult.wge(fac1 = 0, fac2 = 0, fac3 = 0, fac4 = 0, fac5 = 0, fac6 = 0)
mult.wge(fac1 = 0, fac2 = 0, fac3 = 0, fac4 = 0, fac5 = 0, fac6 = 0)
fac1 |
First factor to be multiplied |
fac2 |
Second factor to be multiplied |
fac3 |
Third factor to be multiplied (you may use a maximum of 6 factors) |
fac4 |
Fourth factor to be multiplied (you may use a maximum of 6 factors) |
fac5 |
Fifth factor to be multiplied (you may use a maximum of 6 factors) |
fac6 |
Sixth factor to be multiplied (you may use a maximum of 6 factors) |
char.poly |
The characteristics polynomial of the full model |
model.coef |
Model coefficients of the full model using notation in "Applied Time Series Analysis, 2nd edition" by Woodward, Gray, and Elliott |
Requires CRAN package 'PolynomF'
Wayne Woodward
"Applied Time Series Analysis with R, 2nd edition" by Woodward, Gray, and Elliott
fac1=c(1.6,-.9) fac2=.8 mult.wge(fac1,fac2)
fac1=c(1.6,-.9) fac2=.8 mult.wge(fac1,fac2)
Monthly sales for the North American Industry Classification System (NAICS) code 44X72: Retail Trade and Food Services: 1992-2019
data("NAICS")
data("NAICS")
ts object consisting of monthly data from January 1992- December 2019
https://www.weather.gov/fwd/dmotemp
"Kaggle" and "US Census Bureau" websites
data(NAICS)
data(NAICS)
Noisy bumps signal shown in Figure 12.11(a) in Applied Time Series Analysis with R, second edition by Woodward, Gray, and Elliott
data("nbumps256")
data("nbumps256")
The format is: num [1:256] -0.234 0.123 0.303 0.134 -0.513 ...
Donoho and Johnstone(1994) Biometrika 81,425-455
Applied Time Series Analysis with R, second edition by Woodward, Gray, and Elliott
data(nbumps256)
data(nbumps256)
Water levels for 622 through 1284 measured at Roda gauge near Cairo (Tousson, 1925)
data("nile.min")
data("nile.min")
The format is: Time-Series [1:663] from 622 to 1284: 1157 1088 1169 1169 984 ...
Tousson, O. (1925) M\'emoire sur l'Histoire du Nil, Volume 18 in M\'emoires a l'Institut d'Egypte, pp. 366-404.
Beran, J. (1994) Statistics for Long-Memory Processes, Chapman Hall: Englewood, NJ.
data(nile.min)
data(nile.min)
Echolocation signal for the Nyctalus noctula hunting bat
data("noctula")
data("noctula")
The format is: num [1:96] -18 16 -5 -17 21 -6 -17 20 -6 -16 ...
Internet
"Applied Time Series Analysis with R, 2nd edition" by Woodward, Gray, and Elliott
Monthly Total Vehicle Sales (TOTALNSA) in the United States from January 1976 - December 2019
data("NSA")
data("NSA")
ts object consisting of monthly data from January 1976- December 2019
https://www.weather.gov/fwd/dmotemp
"Kaggle" and "US Census Bureau" websites
data(NSA)
data(NSA)
Daily number of chicken-fried steaks sold at Ozona Bar and Grill during June and July 2019
data("ozona")
data("ozona")
ts object consisting of number of chicken fried steaks sold daily during June and July, 2019
"Time Series for Data Sience: Analysis and Forecasting" by Woodward, Sadler, and Robertson
"Time Series for Data Sience: Analysis and Forecasting" by Woodward, Sadler, and Robertson
data(ozona)
data(ozona)
Compute partial autocorrelations using either YW (default and the classical method), Burg, or ML estimates.)
pacfts.wge(x,lag.max=5, plot=TRUE,na.action,limits=FALSE,method ='yw')
pacfts.wge(x,lag.max=5, plot=TRUE,na.action,limits=FALSE,method ='yw')
x |
Realization |
lag.max |
Max lag |
plot |
Logical variable |
na.action |
Not used |
limits |
Logical variable |
method |
Either "mle" (default),"burg",or"yw" |
method |
Estimation method used: MLE, Burg, or YW |
pacf |
PACF estimates using estimation method specified |
Wayne Woodward
"Time Series for Data Science: Analysis and Forecasting with R" by Woodward, Sadler, and Gray
data(sunspot2.0) pacfts.wge(sunspot2.0,lag.max=10,method='burg')
data(sunspot2.0) pacfts.wge(sunspot2.0,lag.max=10,method='burg')
This function calculates and optionally plots the smoothed periodogram using the Parzen window. The truncation point may be chosen by the user
parzen.wge(x, dbcalc = "TRUE", trunc = 0, plot = "TRUE")
parzen.wge(x, dbcalc = "TRUE", trunc = 0, plot = "TRUE")
x |
Vector containing the time series realization |
dbcalc |
If dbcalc=TRUE, the calculation is in the log (dB) scale. If FALSE, then non-log calculations are made |
trunc |
if M=0 (default) then the function uses the truncation point 2*sqrt(n). If M>0, then the function uses the given value of M as the truncation point |
plot |
If PLOT=TRUE then the smoothed spectral estimate is plotted. If FALSE then no plot is created |
freq |
The frequencies at which the smoothed periodogram is calculated |
pzgram |
The smoothed periodogram using the Parzen window |
Wayne Woodward
"Applied Time Series Analysis with R, 2nd edition" by Woodward, Gray, and Elliott
parzen.wge(rnorm(100))
parzen.wge(rnorm(100))
Pennsylvania average monthly temperatures
data("patemp")
data("patemp")
The format is: num [1:180] 38.1 38.3 44.5 52.3 59.2 70.6 73.9 71.3 63.9 57.3 ...
Internet
"Applied Time Series Analysis with R, 2nd edition" by Woodward, Gray, and elliott
data(patemp)
data(patemp)
Given a realization contained in a vector, this function calculates and optionally plots the periodogram in either log or non-log scale
period.wge(x, dbcalc = "TRUE", plot = "TRUE")
period.wge(x, dbcalc = "TRUE", plot = "TRUE")
x |
The vector containing the time series realization |
dbcalc |
if dbcalc=TRUE (default) then the periodogram is calculated in log scale (in dB). If dbcalc is FALSE then the non-log periodogram is calculated |
plot |
if plot=TRUE (default) the periodogram is plotted. If plot=FALSE no plot is created |
freq |
Frequencies at which the periodogram is calculated |
pgram |
Periodogram values evaluated at the frequencies in freq |
Wayne Woodward
"Applied Time series Analysis with R, 2nd edition" by Woodward, Gray, and Elliott
period.wge(rnorm(100))
period.wge(rnorm(100))
Given the coefficients of the AR and MA parts of an ARMA model, this function calculates the pi weights
pi.weights.wge(phi = 0, theta = 0, lag.max =5)
pi.weights.wge(phi = 0, theta = 0, lag.max =5)
phi |
Vector of AR coefficients (as in "Applied Time Series Analysis with R, 2nd edition" by Woodward, Gray, and Elliott (uses Box and Jenkins notation)) |
theta |
Vector of MA coefficients (as in ATSA and Box Jenkins texts) |
lag.max |
The function will calculates psi weights pi(1), pi(2), ..., pi(lag.max). Note that psi(0)=1. |
A vector containing pi(1), ..., pi(lag.max)
Wayne Woodward
"Applied Time Series Analysis with R, 2nd edition" by Woodward, Gray, and Elliott
pi.weights.wge(phi=c(1.2,-.6), theta=.5, lag.max=5)
pi.weights.wge(phi=c(1.2,-.6), theta=.5, lag.max=5)
Plots DWT obtained using functiond dwt from waveslim
plotts.dwt.wge(x, n.levels, type='S8')
plotts.dwt.wge(x, n.levels, type='S8')
x |
Realization (must be of length 2^k for some integer k between 2 and 14 |
n.levels |
Maximum order of discrete wavelet transforms to be calculated. n.levels must be less than or equal to k where n=2^k |
type |
Discrete wavelet to use: options include 'haar', 'S8','D4','D6',D8' |
The wavelsim dwt function names these :'haar', 'la8','d4','d6',and 'd8' respectively and the conversion is done transparently within the R code. This is done transparently within the R code.
The output is a plot of the DWT.
Requires CRAN package 'waveslim'
Wayne Woodward
Applied Time Series Analysis with R, second edition by Woodward, Gray, and Elliott
data(bumps256) plotts.dwt.wge(bumps256,n.levels=4,type='S8')
data(bumps256) plotts.dwt.wge(bumps256,n.levels=4,type='S8')
Plots MAR ;plot associated with a multiresolution analysis using function mra from waveslim
plotts.mra.wge(x, n.levels, type='S8')
plotts.mra.wge(x, n.levels, type='S8')
x |
Realization (must be of length 2^k for some integer k between 2 and 14 |
n.levels |
Maximum order of discrete wavelet transforms to be calculated. n.levels must be less than or equal to k where n=2^k |
type |
Discrete wavelet to use: options include 'haar', 'S8','D4','D6',D8' |
The wavelsim mra function names these :'haar', 'la8','d4','d6',and 'd8' respectively and the conversion is done transparently within the R code. This is done transparently within the R code.
The output is a plot of the MRA.
Requires CRAN package 'waveslim'
Wayne Woodward
Applied Time Series Analysis with R, second edition by Woodward, Gray, and Elliott
data(bumps256) plotts.mra.wge(bumps256,n.levels=4,type='S8')
data(bumps256) plotts.mra.wge(bumps256,n.levels=4,type='S8')
Given a time series contained in the vector x, plotsp.parzen.wge calculates and plots the periodogram and Parzen window estimates at the default truncation point M=2*sqrt(n) and up to 2 additional user specified trunctaion points.
plotts.parzen.wge(x, m2=c(0,0))
plotts.parzen.wge(x, m2=c(0,0))
x |
The vector containing the time series realization |
m2 |
A 2-component vector specifying up to 2 additional truncation points |
m2=c(10,24) indicates that in addition to the default truncation point, the smoothed spectral estimator is to be calculated using truncation points 10 and 24, m2=c(0,0) indicates that no additional truncation points are to be used, and m2=c(10,0) indicates the use of one additional truncation point (10)
freq |
Frequencies at which the periodogram and parzen widow estimates are calculated |
db |
Periodogram (in dB) calculated at the frequencies in freq |
dbz |
Parzen window estimate (in dB) calculated at the frequencies in freq using truncation point 2*sqrt(n) |
dbz1 |
Parzen window estimate (in dB) calculated at the frequencies in freq using truncation point m2[1] |
dbz2 |
Parzen window estimate (in dB) calculated at the frequencies in freq using truncation point m2[2] |
Wayne Woodward
"Applied Time series Analysis with R, 2nd edition" by Woodward, Gray, and Elliott
data(ss08) m2=c(10,50) plotts.parzen.wge(ss08,m2)
data(ss08) m2=c(10,50) plotts.parzen.wge(ss08,m2)
For a given realization, this function plots the data, and calculates and plots the sample autocorrelations, periodogram, and Parzen window spectral estimator in a 2x2 array of plots.
plotts.sample.wge(x, lag.max = 25, trunc = 0, arlimits=FALSE,speclimits=c(0,0), periodogram=FALSE)
plotts.sample.wge(x, lag.max = 25, trunc = 0, arlimits=FALSE,speclimits=c(0,0), periodogram=FALSE)
x |
A vector containing the realization |
lag.max |
The maximum lag at which to calculate the sample autocorrelations |
trunc |
The truncation point M for the Parzen spectral estimator. If M=0 theN M=2sqrt(n). If M>0 then M is the value entered |
arlimits |
Logical variable. TRUE plots 95 percent limit lines on sample autocorrelation plots |
periodogram |
Logical variable. TRUE plots periodogram, default=FALSE |
speclimits |
User supplied limits for Parzen spectral density and periodogram, default=function decides limits |
xbar |
The sample mean of the realization |
autplt |
A vector containing sample autocorrelations from 0, 1, ..., aut.lag |
freq |
A vector containing the frequencies at which the periodogram and window estimate are calculated |
db |
Periodogram (in dB) calculated at the frequecies in freq |
freq |
Parzen spectral estimate (in dB) calculated at the frequecies in freq |
Wayne Woodward
"Applied Time Series Analysis with R, 2nd edition" by Woodward, Gray, and Elliott
data(wages) plotts.sample.wge(wages,trunc=0)
data(wages) plotts.sample.wge(wages,trunc=0)
For a given ARMA model, this function plots a realization, the true autocorrelations, and the true spectral density. This plot is typical of many plots in Applied Time Series Analysis by Woodward, Gray, and Elliott. For example, see Figure 1.21 and Figure 3.23.
plotts.true.wge(n=100, phi=0, theta=0, lag.max=25, mu=0,vara = 1,sn=0,plot.data=TRUE)
plotts.true.wge(n=100, phi=0, theta=0, lag.max=25, mu=0,vara = 1,sn=0,plot.data=TRUE)
n |
Length of time series realization to be generated. Default is 100 |
phi |
Vector containing AR parameters |
theta |
Vector containing MA parameters |
lag.max |
Maximum lag for calculating and plotting autocorrelations |
mu |
True mean |
vara |
White noise variance: default=1 |
sn |
determines the seed used in the simulation of plotted realization. sn=0 produces new/random realization each time. sn=positive integer produces same realization each time |
plot.data |
Logical variable: If TRUE a simulated realization is plotted |
data |
Realization of length n that is generated from the ARMA model |
aut1 |
True autocorrelations from the ARMA model for lags 0 to lag.max |
acv |
True autocovariances from the ARMA model for lags 0 to lag.max |
spec |
Spectral density (in dB) for the ARMA model calculated at frequencies f=0, .002, .004, ...., .5 |
gvar=g[1], i.e. autocovariance at lag 0
Wayne Woodward
"Applied Time Series Analysis with R, 2nd edition" by Woodward, Gray, and Elliott
plotts.true.wge(n=100, phi=c(1.6,-.9), theta=.8, lag.max=25, vara = 1)
plotts.true.wge(n=100, phi=c(1.6,-.9), theta=.8, lag.max=25, vara = 1)
Given a realization contained in a vector, this function plots it as a time series realization
plotts.wge(x,style = 0, xlab = "Time", ylab = "",main="",col='black',text_size=12, lwd=0.75,cex=0.5,cex.lab=0.75,cex.axis=0.75,xlim=NULL,ylim=NULL)
plotts.wge(x,style = 0, xlab = "Time", ylab = "",main="",col='black',text_size=12, lwd=0.75,cex=0.5,cex.lab=0.75,cex.axis=0.75,xlim=NULL,ylim=NULL)
x |
The vector containing the time series realization to be plotted |
style |
If style is 0 then a simple plot of the realization is rendered. If style is 1 then a ggplot is rendered. |
xlab |
A string that represents the x-axis label. |
ylab |
A string that represents the y-axis label. |
main |
A string that represents the main title. |
col |
Color of plot. |
text_size |
Text size. |
lwd |
Line width. |
cex |
See R documentation. |
cex.lab |
See R documentation. |
cex.axis |
See R documentation. |
xlim |
String giving x-axis plot limits. |
ylim |
String giving y-axis plot limits. |
Simply a plot of the realization
Wayne Woodward
"Applied Time Series Analysis with R, 2nd edition" by Woodward, Gray, and Elliott
data(sunspot2.0);plotts.wge(sunspot2.0)
data(sunspot2.0);plotts.wge(sunspot2.0)
Matrix containing a bivariate VAR data set
data("prob10.4")
data("prob10.4")
The format is: num [1:100, 1:2] 0 0.7184 -0.3448 -2.1638 -0.0342 ... - attr(*, "dimnames")=List of 2 ..$ : NULL ..$ : chr [1:2] "X1" "X2"
Simulated data
"Applied Time Series Analysis with R, 2nd edition" by Woodward, Gray, and Elliott
data(prob10.4)
data(prob10.4)
This realization is the unobservable data associated with the observed data in prob10.6y
data("prob10.6x")
data("prob10.6x")
The format is: num [1:9] 2.61 0.69 0.64 0.37 -0.79 -1.63 -1.14 -1.2 -3.13
Simulated data
Applied Time Series Analysis with R, second edition by Woodward, Gray, and Elliott
data(prob10.6x)
data(prob10.6x)
Kalman filter example data
data("prob10.6y")
data("prob10.6y")
The format is: num [1:9] 3.28 -0.05 0.64 0.31 -0.9 -2.4 -1.83 -1.93 -3.52
Simulated data
Applied Time Series Analysis with R, second edition by Woodward, Gray, and Elliott
data(prob10.6y)
data(prob10.6y)
This realization is the same unobservable data as in prob10.6x
data("prob10.7x")
data("prob10.7x")
The format is: num [1:9] 2.61 0.69 0.64 0.37 -0.79 -1.63 -1.14 -1.2 -3.13
Simulated data
Applied Time Series Analysis with R, second edition by Woodward, Gray, and Elliott
data(prob10.7x)
data(prob10.7x)
Kalman filter example data
data("prob10.7y")
data("prob10.7y")
The format is: num [1:9] 3.28 -0.05 0.64 0.31 -0.9 -2.4 -1.83 -1.93 -3.52
Simulated data
Applied Time Series Analysis with R, second edition by Woodward, Gray, and Elliott
data(prob10.7y)
data(prob10.7y)
Simulated fractional long memory data
data("prob11.5")
data("prob11.5")
The format is: num [1:10] 4.2 -2.5 8.4 14.6 7 9.6 19.8 4.8 6.5 8.3
Simulated data
Applied Time Series Analysis with R, second edition by Woodward, Gray, and Elliott
data(prob11.5)
data(prob11.5)
Data from a problem set in the wavelet chapter
data("prob12.1c")
data("prob12.1c")
The format is: num [1:200] 9.49 8.01 3.43 -1.85 -4.99 -7.21 -5.61 -2.34 2.16 3.88 ...
Simulated data
Applied Time Series Analysis with R, second edition by Woodward, Gray, and Elliott
data(prob12.1c)
data(prob12.1c)
Data from a problem set in the wavelet chapter
data("prob12.3a")
data("prob12.3a")
The format is: num [1:512] -3.09 8.43 -9.74 8.44 -3.46 ...
Simulated data
Applied Time Series Analysis with R, second edition by Woodward, Gray, and Elliott
data(prob12.3a)
data(prob12.3a)
Data from a problem set in the wavelet chapter
data("prob12.3b")
data("prob12.3b")
The format is: num [1:256] 1 1 1 1 1 ...
Simulated data
Applied Time Series Analysis with R, second edition by Woodward, Gray, and Elliott
data(prob12.3b)
data(prob12.3b)
Simulated TVF data set
data("prob12.6c")
data("prob12.6c")
The format is: num [1:512] -0.482 -0.569 -0.656 -0.743 -0.83 ...
Simulated data
Applied Time Series Analysis with R, second edition by Woodward, Gray, and Elliott
data(prob12.6c)
data(prob12.6c)
Simulated data from cosine-plus-noise model
data("prob13.2")
data("prob13.2")
The format is: num [1:256] 1.524 5.886 5.939 4.319 0.573 ...
Simulated data
Applied Time Series Analysis with R, second edition by Woodward, Gray, and Elliott
data(prob13.2)
data(prob13.2)
See title above
data("prob8.1a")
data("prob8.1a")
The format is: num [1:200] 2.19 0.48 0.06 3.86 3.6 -3.38 6.23 1.95 1.4 -5.35 ...
Simulated data
"Applied Time Series Analysis with R, 2nd edition" by Woodward, Gray, and Elliott
data(prob8.1a)
data(prob8.1a)
See title above
data("prob8.1b")
data("prob8.1b")
The format is: num [1:200] 1.54 -0.13 1.93 0.29 -0.13 -0.23 1.27 1.01 -0.65 1.68 ...
Simulated data
"Applied Time Series Analysis with R, 2nd edition" by Woodward, Gray, and Elliott
data(prob8.1b)
data(prob8.1b)
See title above
data("prob8.1c")
data("prob8.1c")
The format is: num [1:200] 0.33 -0.53 -2.36 2.48 -0.36 -2.02 1.87 -0.73 0.41 2.41 ...
Simulated data
"Applied Time Series Analysis with R, 2nd edition" by Woodward, Gray, and Elliott
data(prob8.1c)
data(prob8.1c)
See title above
data("prob8.1d")
data("prob8.1d")
The format is: num [1:200] -0.07 -1.74 -1.37 -0.52 0.14 0.07 -1.5 1.88 -0.03 -1.81 ...
Simulated data
"Applied Time Series Analysis with R, 2nd edition" by Woodward, Gray, and Elliott
data(prob8.1d)
data(prob8.1d)
Data set 1 for Problem 6.1c in "Applied Time Series Analysis with R, 2nd edition" by Woodward, Gray, and Elliott. It is either from line plus noise or random walk with drift.
data("prob9.6c1")
data("prob9.6c1")
The format is: num [1:100] -0.2924 0.0206 0.6595 0.3819 0.0269 ...
Simulated data
"Applied Time Series Analysis with R, 2nd edition" by Woodward, Gray, and Elliott
data(prob9.6c1)
data(prob9.6c1)
Data set 2 for Problem 6.1c in "Applied Time Series Analysis with R, 2nd edition" by Woodward, Gray, and Elliott. It is either from line plus noise or random walk with drift.
data("prob9.6c2")
data("prob9.6c2")
The format is: num [1:100] -0.925 -2.679 -2.378 -3.03 -2.157 ...
Simulated data
"Applied Time Series Analysis with R, 2nd edition" by Woodward, Gray, and Elliott.
data(prob9.6c2)
data(prob9.6c2)
Data set 3 for Problem 6.1c in "Applied Time Series Analysis with R, 2nd edition" by Woodward, Gray, and Elliott. It is either from line plus noise or random walk with drift.
data("prob9.6c3")
data("prob9.6c3")
The format is: num [1:100] -2.79 -3.32 -3.51 -5.13 -3.51 ...
Simulated data
"Applied Time Series Analysis with R, 2nd edition" by Woodward, Gray, and Elliott
data(prob9.6c3)
data(prob9.6c3)
Data set 4 for Problem 6.1c in "Applied Time Series and Data Analysis with R, 2nd edition" by Woodward, Gray, and Elliott. It is either from line plus noise or random walk with drift.
data("prob9.6c4")
data("prob9.6c4")
The format is: num [1:100] -0.0599 -0.0214 0.6589 -0.151 0.4043 ...
Simulated data
"Applied Time Series and Data Analysis with R, 2nd edition" by Woodward, Gray, and Elliott
data(prob9.6c4)
data(prob9.6c4)
Given the coefficients of the AR and MA parts of an ARMA model, this function calculates the psi weights
psi.weights.wge(phi = 0, theta = 0, lag.max = 5)
psi.weights.wge(phi = 0, theta = 0, lag.max = 5)
phi |
Vector of AR coefficients (as in "Applied Time Series Analysis with R, 2nd edition" by Woodward, Gray, and Elliott (uses Box and Jenkins notation)) |
theta |
Vector of MA coefficients (as in ATSA and Box Jenkins texts) |
lag.max |
The function will calculates psi weights psi(1), psi(2), ..., psi(lag.max). Note that psi(0)=1. |
A vector containing psi(1), ..., psi(lag.max)
Wayne Woodward
"Applied Time Series Analysis with R, 2nd edition" by Woodward, Gray, and Elliott
psi.weights.wge(phi=c(1.2,-.6), theta=.5, lag.max=5)
psi.weights.wge(phi=c(1.2,-.6), theta=.5, lag.max=5)
Daily DOW rate of return from 1971 through 2020
data("rate")
data("rate")
ts object consisting of daily dow rate of return from 1971 through 2020
"Time Series for Data Sience: Analysis and Forecasting" by Woodward, Sadler, and Robertson
data(rate)
data(rate)
This function creates as many "windows" as is possible with the data and calculates an RMSE for each window. The resulting "rolling window RMSE" is the average of the individual RMSEs from each window.
roll.win.rmse.nn.wge(series, horizon = 1, fit_model)
roll.win.rmse.nn.wge(series, horizon = 1, fit_model)
series |
The data |
horizon |
The number of observations ahead to be forecasted. |
fit_model |
The mlp object (model) to be evaluated. This model will have been fit before the call to this function. |
rwRMSE |
The average of the individual RMSEs of each window |
numwindows |
The number of windows |
horizon |
The number of observations ahead to be forecasted. |
Bivin Sadler
"The Time Series Tool Kit"
This function creates as many "windows" as is possible with the data and calculates an RMSE for each window. The resulting "rolling window RMSE" is the average of the individual RMSEs from each window.
roll.win.rmse.wge(series, horizon = 2, s = 0, d = 0, phi = 0, theta = 0)
roll.win.rmse.wge(series, horizon = 2, s = 0, d = 0, phi = 0, theta = 0)
series |
The data |
horizon |
The number of observations ahead to be forecasted. |
s |
Order of the seasonal difference, default=1 |
d |
Order of the difference |
phi |
Vector of AR coefficients |
theta |
Vector of MA coefficients |
rwRMSE |
The average of the individual RMSEs of each window |
numwindows |
The number of windows |
horizon |
The number of observations ahead to be forecasted. |
s |
Order of the seasonal difference, default=1 |
d |
Order of the difference |
phis |
Vector of AR coefficients |
thetas |
Vector of MA coefficients |
RMSEs |
Vector of RMSEs ... one for each windwow |
Bivin Sadler
"The Time Series Tool Kit"
Uses Base R routine lm to simplify call for SLR where independent variable is automatocally t=1:n
slr.wge(x)
slr.wge(x)
x |
The TVF data set |
res |
Residuals |
b0hat |
Estimate b0 in model y=b0+b1*t+Z |
b1hat |
Estimate b1 |
pvalue |
pvalue for test:slope=0 |
tstatistic |
tstatistic associated with test:slope=0 |
Wayne Woodward
Applied Time Series Analysis with R, second edition by Woodward, Gray, and Elliott
x=gen.arma.wge(n=100,phi=.96,sn=10) y=slr.wge(x)
x=gen.arma.wge(n=100,phi=.96,sn=10) y=slr.wge(x)
Annual average sunspot numbers for the years 1749-2008
data("ss08")
data("ss08")
The format is: num [1:260] 80.9 83.4 47.7 47.8 30.7 ...
Internet-open source
"Applied Time Series Analysis with R, 2nd edition" by Woodward, Gray, and Elliott
data(ss08)
data(ss08)
Sunspot data from 1850 through 2008 for matching with global temperature data (hadley) for purposes of testing for association in Example 10.5 of "Applied Time Series Analysis with R, 2nd edition" by Woodward, Gray, and Elliott
data("ss08.1850")
data("ss08.1850")
The format is: num [1:160] 66.6 64.5 54.1 39 20.6 ...
Internet
"Applied Time Series Analysis with R, 2nd edition" by Woodward, Gray, and Elliott
data(ss08.1850)
data(ss08.1850)
Lg wave for Starwort explosion data
data("starwort.ex")
data("starwort.ex")
The format is: num [1:420] 43245 48408 47565 7372 -62277 ...
Gupta, et al. (2005) Bulletin of the Seismological Society of America 95, 341-346.
Applied Time Series Analysis with R, second edition by Woodward, Gray, and Elliott
data(starwort.ex)
data(starwort.ex)
The classic 176 point sunspot data from 1749-1924 that has been widely modeled
data("sunspot.classic")
data("sunspot.classic")
The format is: num [1:176] 80.9 83.4 47.7 47.8 30.7 12.2 9.6 10.2 32.4 47.6 ...
Internet
"Applied Time Series Analysis with R, 2nd edition" by Woodward, Gray, and Elliott
data(sunspot.classic)
data(sunspot.classic)
Annual sunspot2.0 numbers from 1700 through 2020
data("sunspot2.0")
data("sunspot2.0")
ts object consisting of annual data from 1700 through 2020
https://www.sidc.oma.be/silso
"Time Series for Data Sience: Analysis and Forecasting" by Woodward, Sadler, and Robertson
data(sunspot2.0)
data(sunspot2.0)
Monthly sunspot2.0 numbers from January 1749 through December 2020
data("sunspot2.0.month")
data("sunspot2.0.month")
ts object consisting of monthly data from January 1749 through December 2020
https://www.sidc.oma.be/silso
"Time Series for Data Sience: Analysis and Forecasting" by Woodward, Sadler, and Robertson
data(sunspot2.0.month)
data(sunspot2.0.month)
The data in Table 10.1 are of the form Y(t)=X(t)+n(t). This data set contains the values for n(t).
data("table10.1.noise")
data("table10.1.noise")
The format is: num [1:75] -0.49 0.126 -0.129 -1.179 0.441 ...
Simulated data
Applied Time Series Analysis with R, second edition by Woodward, Gray, and Elliott
data(table10.1.noise)
data(table10.1.noise)
The X(t) data is unobservable, and is a realization from an AR(1) model
data("table10.1.signal")
data("table10.1.signal")
The format is: num [1:75] -0.2497 -0.0812 -0.6463 -1.7653 -2.719 ...
Simulated data
Applied Time Series Analysis with R, second edition by Woodward, Gray, and Elliott
data(table10.1.signal)
data(table10.1.signal)
MA(2) data for Table 7.1 in "Applied Time Series Analysis with R, 2nd edition" by Woodward, Gray, and Elliott. Uses function ia in package itsmr to show steps in the innovations algorithm for estimating the MA parameters and white noise variance
data("table7.1")
data("table7.1")
The format is: num [1:400] 0.4481 0.5497 -1.6586 -3.1653 -0.0314 ...
Generated data
"Applied Time Series Analysis with R, 2nd edition" by Woodward, Gray, and Elliott
data(table7.1)
data(table7.1)
Teslas daily stock prices from January 1, 2020 through April 30, 2021
data("tesla")
data("tesla")
ts object consisting of daily adjusted close price for TSLA from January 1, 2020 through April 30, 2021
https://finance.yahoo.com
"Time Series for Data Sience: Analysis and Forecasting" by Woodward, Sadler, and Robertson
data(tesla)
data(tesla)
Using the specified values for lambda and offset, this function transforms a TVF data set to a dual data set based on a Glambda time transformation.
trans.to.dual.wge(x, lambda, offset = 60, h = 0, plot = TRUE)
trans.to.dual.wge(x, lambda, offset = 60, h = 0, plot = TRUE)
x |
The TVF data set |
lambda |
The value of lambda in the Glambda time transformation |
offset |
The value of offset in the Glambda time transformation |
h |
Scaling variable, initialized at zero, which assures that the dual data set has the same number of points as the original TVF data set |
plot |
Logical: TRUE=plot, FALSE=no plot |
intX |
See intY description |
intY |
The input realization x is of length n, and the values of x are available at the time points t= 1 to n. The values intY are n interpolated values of the original time series at the values of intX in the original time scale. The dual data set is obtained by associating the n values of intY with t = 1 to n respectively |
h |
The output value of the scaling parameter that assures that the dual realization and the original realization are of the same length |
Wayne Woodward
Applied Time Series Analysis with R, second edition by Woodward, Gray, and Elliott
data(fig13.2c) y=trans.to.dual.wge(x=fig13.2c,lambda=-.4,offset=63)
data(fig13.2c) y=trans.to.dual.wge(x=fig13.2c,lambda=-.4,offset=63)
Using the specified values for lambda and offset, this function transforms a dual data set, based on a Glambda time transformation, back to the original time scale
trans.to.original.wge(xd, lambda, offset, h, plot = TRUE)
trans.to.original.wge(xd, lambda, offset, h, plot = TRUE)
xd |
The dual data set |
lambda |
The value of lambda in the Glambda time transformation |
offset |
The value of offset in the Glambda time transformation |
h |
Scaling variable obtained as output from transform.to.dual.wge that assures that the dual data set has the same number of points as the origuinal TVF data set |
plot |
Logical: TRUE=plot, FALSE=no plot |
Returns the y values to be plotted at time points t=1 to n that approximate the original TVF data set
Wayne Woodward
Applied Time Series Analysis with R, second edition by Woodward, Gray, and Elliott
data(fig13.2c) yd=trans.to.dual.wge(fig13.2c,lambda=-.4,offset=63) yo=trans.to.original.wge(yd$intY,lambda=-.4,offset=63,h=yd$h)
data(fig13.2c) yd=trans.to.dual.wge(fig13.2c,lambda=-.4,offset=63) yo=trans.to.original.wge(yd$intY,lambda=-.4,offset=63,h=yd$h)
R function to calculate the autocovariances and autocorrelations and optionally plot the true autocorrelations of a stationary ARMA model
true.arma.aut.wge(phi = 0, theta = 0, lag.max = 25, vara = 1,plot=TRUE)
true.arma.aut.wge(phi = 0, theta = 0, lag.max = 25, vara = 1,plot=TRUE)
phi |
Vector containing AR coefficients |
theta |
Vector containing MA coefficients |
lag.max |
Maximum lag at which to calculate the true autocorrelations |
vara |
White noise variance of the ARMA model |
plot |
Logical: TRUE=plot, FALSE=no plot |
acf |
Vector of length max.lag+1 containing true autocorrelations at lags 0, 1, ..., lag.max |
acv |
Vector of length max.lag+1 containing true autocovariances at lags 0, 1, ..., lag.max |
Wayne Woodward
"Applied Time Series Analysis with R, 2nd edition" by Woodward, Gray, and Elliott
true.arma.aut.wge(phi=c(1.6,-.9),theta=-.8,lag.max=15,vara=1)
true.arma.aut.wge(phi=c(1.6,-.9),theta=-.8,lag.max=15,vara=1)
R function to calculate and optionally plot the spectral density of a stationary ARMA model
true.arma.spec.wge(phi=0,theta=0, vara=1,plot=TRUE)
true.arma.spec.wge(phi=0,theta=0, vara=1,plot=TRUE)
phi |
Vector containing AR coefficients |
theta |
Vector containing MA coefficients |
vara |
White noise variance of the ARMA model |
plot |
Logical: TRUE=plot, FALSE=no plot |
f |
Frequencies at which true spectral density is evaluated: 0, 1/500, 2/500, ..., .5 |
spec |
True spectral density calculated at the frequencies in f |
Wayne Woodward
"Applied Time Series Analysis with R, 2nd edition" by Woodward, Gray, and Elliott
true.arma.spec.wge(phi=c(1.6,-.9), theta=.7)
true.arma.spec.wge(phi=c(1.6,-.9), theta=.7)
Calculate the autocovariances and autocorrelations and optionally plot the true autocorrlations of a FARMA model
true.farma.aut.wge(d,phi=0,theta=0,lag.max=50,trunc=1000,vara=1,plot=TRUE)
true.farma.aut.wge(d,phi=0,theta=0,lag.max=50,trunc=1000,vara=1,plot=TRUE)
d |
Fractional difference parameter |
phi |
vector of AR parameters of ARMA part of FARMA model |
theta |
vector of MA parameters of ARMA part of FARMA model using signs as given in the Woodward, Gray, and Elliott text |
lag.max |
Maximum lag at which the autocorrelations and autocovariances will be calculated |
trunc |
Number of terms used in sum |
vara |
White noise variance |
plot |
Logical: TRUE=plot, FALSE=no plot |
For fractional model use phi=theta=0
acf |
Vector of length max.lag+1 containing true autocorrelations at lags 0, 1, ..., lag.max |
acv |
Vector of length max.lag+1 containing true autocovariances at lags 0, 1, ..., lag.max |
Wayne Woodward
"Applied Time Series Analysis with R, second editon" by Woodward, Gray, and Elliott
y=true.farma.aut.wge(d=.4,phi=c(0,-.8))
y=true.farma.aut.wge(d=.4,phi=c(0,-.8))
Calculate the autocovariances and autocorrelations and optionally plot the true autocorrelations of a 1-factor based on formula(11.25) of "Applied Time Series Analysis with R, second editon" Woodward, Gray, and Elliott
true.garma.aut.wge(u,lambda,phi=0,theta=0,lag.max=50,vara=1,plot=TRUE)
true.garma.aut.wge(u,lambda,phi=0,theta=0,lag.max=50,vara=1,plot=TRUE)
u |
Parameter u in the GARMA model given in (11.16) of Woodward, Gray, and Elliott text |
lambda |
Parameter lambda in the GARMA model given in (11.16) of Woodward, Gray, and Elliott text |
phi |
vector of AR parameters of ARMA part of GARMA model |
theta |
vector of MA parameters of ARMA part of GARMA model using signs as given in the Woodward, Gray, and Elliott text |
lag.max |
Maximum lag at which the autocorrelations and autocovariances will be calculated |
vara |
White noise variance |
plot |
Logical: TRUE=plot, FALSE=no plot |
For Gegenbauer model use phi=theta=0
acf |
Vector of length max.lag+1 containing true autocorrelations at lags 0, 1, ..., lag.max |
acv |
Vector of length max.lag+1 containing true autocovariances at lags 0, 1, ..., lag.max |
Wayne Woodward
"Applied Time Series Analysis with R, second editon" by Woodward, Gray, and Elliott
y=true.garma.aut.wge(u=.8,lambda=.4,phi=.8)
y=true.garma.aut.wge(u=.8,lambda=.4,phi=.8)
Monthly seasonally adjusted unemployment rate in Texas for the years 2000-2019
data("tx.unemp.adj")
data("tx.unemp.adj")
ts object consisting of monthly seasonally adjusted unemployment rate from January 2000 through December 2019
https://twc.texas.gov
"Time Series for Data Sience: Analysis and Forecasting" by Woodward, Sadler, and Robertson
data(tx.unemp.adj)
data(tx.unemp.adj)
Monthly unemployment rate in Texas for the years 2000-2019
data("tx.unemp.unadj")
data("tx.unemp.unadj")
ts object consisting of monthly unadjusted unemployment rate from January 2000 through December 2019
https://twc.texas.gov
"Time Series for Data Sience: Analysis and Forecasting" by Woodward, Sadler, and Robertson
data(tx.unemp.unadj)
data(tx.unemp.unadj)
This function plots the roots of the characteristic equation on the complex plain and super imposes the Unit Circle to show if a root is inside, outside or on the Unit Circle. The modulus and absolule reciprical are also displayed.
unit.circle.wge(real = 0, imaginary = 0)
unit.circle.wge(real = 0, imaginary = 0)
real |
the real part of the root |
imaginary |
the imaginary part of the root |
returns a plot of the root with respect to the unit circle
Bivin Sadler
"Applied Time Series Analysis with R, 2nd edition" by Woodward, Gray, and Elliott
unit.circle.wge = function(real = .9, imaginary = .95)
unit.circle.wge = function(real = .9, imaginary = .95)
Quarterly US retail sales (in $millions) from the fourth quarter of 1999 through the second quarter of 2021
data("us.retail")
data("us.retail")
ts object consisting of quarterly US retail sales (in $millions) from the fourth quarter of 1999 through the second quarter of 2021
https://www.fred.stlouis.org
"Time Series for Data Sience: Analysis and Forecasting" by Woodward, Sadler, and Robertson
data(us.retail)
data(us.retail)
US estimated annual population from 1900 through 2020.
data("uspop")
data("uspop")
ts object consisting of annual data from 1700 through 2020
Internet
"Time Series for Data Science: Analysis and Forecasting" by Woodward, Sadler, and Robertson
This data set contains the average English daily wages in pounds for each year from 1260 to 1944, inclusive.
data("wages")
data("wages")
The format is: num [1:735] 4.41 4.63 4.38 4.52 4.42 4.64 4.44 5.15 5.23 4.42 ...
Data Market Time Series Data Library (citing: Makridakis, Wheelwright and Hyndman (1998))
data(wages)
data(wages)
Performs the Woodward-Bottone-Gray (WBG) bootstrap-based test for a linear trend in a time series realization.)
wbg.boot.wge(x,nb=399,alpha=.05,pvalue=TRUE,sn=0)
wbg.boot.wge(x,nb=399,alpha=.05,pvalue=TRUE,sn=0)
x |
Realization |
nb |
The number of Bootstrap replications (default is 399) |
alpha |
The significance level of the test (default is .05) |
pvalue |
Logical variable. TRUE(default) prints out the p-value of the test. |
sn |
Sets the seed for the simulations (default = 0)) |
p |
AR order used for the bootstrap simulations |
phi |
The AR coefficients of the AR model fit to data |
pv |
The p-value of the test |
Wayne Woodward
"Applied Time Series Analysis with R, 2nd edition" by Woodward, Gray, and Elliott
data(global.temp) wbg.boot.wge(global.temp)
data(global.temp) wbg.boot.wge(global.temp)
256 point whale click echolocation signal
data("whale")
data("whale")
The format is: num [1:286] 0.0014 -0.008 0.01126 0.00412 0.0069 ...
Stan Kuczaj from University of Southern Mississippi
Applied Time Series Analysis with R, second edition by Woodward, Gray, and Elliott
data(whale)
data(whale)
Monthly West Texas intermediate crude oil prices from January 2000 through October 2009.
data("wtcrude")
data("wtcrude")
The format is: num [1:118] 27.2 29.4 29.9 25.7 28.8 ...
Internet
"Applied Time Series Analysis with R, 2nd edition" by Woodward, Gray, and Elliott
Monthly WTI crude oil prices from January 1990 through December 2020
data("wtcrude2020")
data("wtcrude2020")
ts object consisting of monthly data from January 1990 through December 2020
https://fred.stlouis.org
"Time Series for Data Sience: Analysis and Forecasting" by Woodward, Sadler, and Robertson
data(wtcrude2020)
data(wtcrude2020)
Calculates and plots Wigner-Ville spectrum for a realization
wv.wge(x)
wv.wge(x)
x |
Realization to be analyzed |
Plots Wigner-Ville spectrum
Wayne Woodward
Boashash (2003). Time Frequency Analysis
data(doppler) wv.dop=wv.wge(doppler)
data(doppler) wv.dop=wv.wge(doppler)
The number of Yellow Cab Trips in NYC before and during the COVID outbreak: January 2019 through February 2021
data("yellowcab.precleaned")
data("yellowcab.precleaned")
The format is: Time-Series [1:26] from 2019 to 2021: 247315 250654 252634 247742 ...
NYC Taxi and Limousine website
Time Series for Data Science Woodward, Sadler, and Robertson
data(yellowcab.precleaned)
data(yellowcab.precleaned)