Calculates the p-value of the statistical test for the population autocorrelation function.
Syntax
ACFTest(X, Order, k, Method, rho, Return_type, Alpha)
- X
- is the univariate time series data (a one dimensional array of cells (e.g. rows or columns)).
- Order
- is the time order in the data series (i.e. the first data point's corresponding date (earliest date=1 (default), latest date=0)).
Order Description 1 ascending (the first data point corresponds to the earliest date) (default) 0 descending (the first data point corresponds to the latest date) - k
- is the lag order (e.g. 0=no lag, 1=1st lag, etc.). If missing, the default lag order of one (i.e. Lag=1) is assumed.
- Method
- is the calculation method for estimating the autocorrelation (0= Sample Autocorrelation (Default), 2=Periodogram-based estimate , 2=Cross corelation).
Value Method 0 Sample autocorrelation method.(default) 1 Periodogram-based estimate. 2 Cross-correlation method - rho
- is the assumed autocorrelation function value. If missing, the default of zero is assumed.
- Return_type
- is a switch to select the return output (1 = P-Value (default), 2 = Test Stats, 3 = Critical Value.
Method Description 1 P-Value 2 Test Statistics (e.g. Z-score) 3 Critical Value - Alpha
- is the statistical significance of the test (i.e. alpha). If missing or omitted, an alpha value of 5% is assumed.
Remarks
- The time series is homogeneous or equally spaced.
- The time series may include missing values (e.g. #N/A) at either end.
- The lag order (k) must be less than the time series size, or an error value (#VALUE!) is returned.
- The test hypothesis for the population autocorrelation: $$H_{o}: \rho_{k}=\rho_o$$ $$H_{1}: \rho_{k}\neq a$$ Where:
- $H_{o}$ is the null hypothesis.
- $H_{1}$ is the alternate hypothesis.
- $\hat \rho_o$ is the assumed population autocorrelation function for lag k.
- $k$ is the lag order.
- Assuming a normal distributed population, the sample autocorrelation has a normal distribution: $$\hat \rho_k \sim N(\rho_k,\sigma_{\rho_k}^2)$$ Where:
- $\hat \rho_k $ is the sample autocorrelation for lag k.
- $\rho_k $ is the population autocorrelation for lag k.
- $\sigma_{\rho_k}$ is the standard deviation of the sample autocorrelation function for lag k.
- The variance of the sample autocorrelation is computed as: $$ \sigma_{\rho_k}^2 = \frac{1+\sum_{j=1}^{k-1}\hat\rho_j^2}{T} $$ Where:
- $\sigma_{\rho_k}$ is the standard error of the sample autocorrelation for lag k.
- $T$ is the sample data size.
- $\hat\rho_j$ is the sample autocorrelation function for lag j.
- $k$ is the lag order.
- This is a two-sides (i.e. two-tails) test, so the computed p-value should be compared with half of the significance level ($\alpha/2$).
Examples
Example 1:
|
|
Formula | Description (Result) |
---|---|
=ACF(\$B\$2:\$B\$30,1,2) | Autocorrelation of order 2 (-0.008) |
=ACFTest(\$B\$2:\$B\$30,1,2,0) | p-value of ACF(2) test when ACF(2) = 0 (0.483) |
Files Examples
References
- D. S.G. Pollock; Handbook of Time Series Analysis, Signal Processing, and Dynamics; Academic Press; Har/Cdr edition(Nov 17, 1999), ISBN: 125609906
- James Douglas Hamilton; Time Series Analysis; Princeton University Press; 1st edition(Jan 11, 1994), ISBN: 691042896
- Tsay, Ruey S.; Analysis of Financial Time Series; John Wiley & SONS; 2nd edition(Aug 30, 2005), ISBN: 0-471-690740
- Box, Jenkins and Reisel; Time Series Analysis: Forecasting and Control; John Wiley & SONS.; 4th edition(Jun 30, 2008), ISBN: 470272848
- Walter Enders; Applied Econometric Time Series; Wiley; 4th edition(Nov 03, 2014), ISBN: 1118808568
Comments
Article is closed for comments.