Purpose
This App can be used to analyze time series data using stationarity test, Granger causality test and prewhitening etc.
Notes: This App needs Embedded Python and statsmodels library.
Features include:
- Stationarity Test: Test stationarity in time series data. A stationary series is one in which the mean, variance and covariance do not vary with time. The Augmented Dickey-Fuller (ADF) test and Kwiatkowski-Phillips-Schmidt-Shin (KPSS) test are used.
- Granger Causality Test: Perform Granger causality test between two time series.
- Prewhiten: Prewhiten data using AMRIMA model. Determine an ARIMA model for the x-variable and calucate its residuals. Use the ARIMA model to fit y-variable and calculate the residuals for y-variable. Their residuals are used as prewhitened data.
Installation
- Download the advts.opx file, then drag-and-drop onto the Origin workspace.
- The App will start downloading dependent Python libraries. Please restart Origin after the download is completed.
Operation
- Stationarity Test:
- Choose XY range data and enter significance level.
- Augmented Dickey-Fuller (ADF) test:
- Terms to include in regression: Constant and trend order to include in regression.
- Method to determine lag: If None, use int(12*(N/100)^(1/4)) as maximum number of lags. If AIC or BIC, then the number of lags is chosen to minimize the corresponding information criterion. If t-stat, then starts with maxlag and drops a lag until the t-statistic on the last lag length is significant using a 5% test.
- Kwiatkowski-Phillips-Schmidt-Shin (KPSS) test:
- Terms to include in regression: Constant or trend to include in regression.
- Method to determine lag: If auto, lags is calculated using the data-dependent method. If set to legacy, uses int(12 * (N/ 100)^(1 / 4)).
- Click OK to output report.
- Granger Causality Test:
- Choose two datasets as XY time series data.
- On Options tab, enter Maximum Number of Lags, and Significance Level.
- Click OK to output report.
- Prewhiten:
- Choose two datasets as input.
- On Options tab, specify autoregressive order(p), degress of differencing(d) and moving average order(q) for nonseasonal order. You can optionally specify seasonal order by entering (p,d,q) and periodicity. Choose whether to Include a Constant Term.
- Click OK to output report.
Sample OPJU File
This app provides a sample OPJU file. Right click the App icon in the Apps Gallery window, and choose Show Samples Folder from the short-cut menu. A folder will open. Drag-and-drop the project file Advanced Time Series Analysis Sample.opju from the folder onto Origin. The Notes window in the project shows detailed steps.
Note: If you wish to save the OPJU after changing, it is recommended that you save to a different folder location (e.g. User Files Folder).
Reference: https://www.statsmodels.org