当前位置:网站首页>Why do we do autocorrelation analysis? Explain application scenarios and specific operations
Why do we do autocorrelation analysis? Explain application scenarios and specific operations
2022-06-25 12:20:00 【Halosec_ Wei】
1、 effect
Autocorrelation (ACF) It means that there is a certain degree of correlation between the sequence and the sequence formed by some order lag , Partial autocorrelation function (PACF) It is a measure function of the conditional correlation of two sequences given by other sequences . Generally speaking ( partial ) Autocorrelation is used in time series analysis AR、MA Of p、q Perform order determination .
2、 Input / output description
Input :1 Quantitative variables of sequence data
Output :pacf/acf chart , be used for AR、MA Of p、q Perform order determination
3、 Learning Websites
SPSSPRO- Free professional online data analysis platform
4、 Case example
Case study : be based on 5 Annual monthly sales of goods , Forecast the sales volume of a commodity in the next five months .
5、 Case data

( partial ) Autocorrelation analysis case data
6、 Case operation

Step1: New analysis ;
Step2: Upload data ;
Step3: Select the corresponding data to open and preview , Click start analysis after confirmation ;

step4: choice 【( partial ) Autocorrelation analysis (pcaf/acf)】;
step5: View the corresponding data format ,【( partial ) Autocorrelation analysis (pcaf/acf)】 Request input 1 Quantitative variables of time series data .
step6: Set the differential hierarchy ( Be careful : In general ,( partial ) Autocorrelation analysis requires the sequence to be stable or several order difference sequence to be stable . If the original sequence is a stationary sequence , Then select the difference class as 0; If the original sequence is a nonstationary sequence , The first-order difference sequence is a stationary sequence , Then select the difference class as 1; If the original sequence is a nonstationary sequence , The first-order difference sequence is a nonstationary sequence , The second-order difference sequence is a stationary sequence , Then select the difference class as 2.( In this case, it is found that the original sequence is unstable in the unit root test , The first-order difference sequence is stable , So set the differential hierarchy to 1)
step7: Click on 【 To analyze 】, Complete the operation .
7、 Output result analysis
Output results 1: Model residual autocorrelation diagram (ACF)

Chart description : The figure above shows the autocorrelation diagram (ACF), Inclusion factor 、 Upper and lower confidence limits . It can be seen from the picture that , The first and third order autocorrelation coefficients are obviously larger than 2 Multiple standard deviation range , And the process that the autocorrelation coefficient decays into a small value fluctuation is relatively slow or very continuous , We can judge that the autocorrelation graph is trailing .
Output results 2: Partial autocorrelation of model residuals (PACF)

Chart description : The above figure shows the partial autocorrelation diagram (PACF), Inclusion factor , Upper and lower confidence limits . It can be seen from the picture that , The first and second order partial autocorrelation coefficients are obviously larger than 2 Multiple standard deviation range , After the first order partial autocorrelation coefficient , The other partial autocorrelation coefficients are all in 2 Within times the standard deviation , And the second-order post biased autocorrelation coefficient decays into a small value fluctuation near zero, which is very sudden . We can judge that the partial autocorrelation graph is truncated .
8、 matters needing attention
- There are the following , Usually regarded as ( partial ) Autocorrelation coefficient d Order truncation :
- In the initial d The order is significantly greater than 2 Multiple standard deviation range
- Then almost 95% Of ( partial ) The autocorrelation coefficients fall in 2 Within times the standard deviation
- And the process of attenuation from non-zero autocorrelation coefficient to small value fluctuation near zero is very sudden
There are the following , Usually regarded as ( partial ) Autocorrelation coefficient tailing :
- If there is more than 5% The sample of ( partial ) The autocorrelation coefficients fall outside the range of double standard deviation
- Or by significant non 0 Of ( partial ) The attenuation of autocorrelation coefficient to small value fluctuation is slow or very continuous
- After analyzing the autocorrelation diagram and partial autocorrelation diagram , Can be established ARMA Model :
- Partial autocorrelation (PACF) The picture is p Step to truncate , Autocorrelation (ACF) Figure trailing ,ARMA The model can be simplified to AR(p) Model ;
- Autocorrelation (PACF) The picture is q Step to truncate , Partial autocorrelation (ACF) Figure trailing ,ARMA The model can be simplified to MA(q) Model ;
- If both autocorrelation and partial autocorrelation are tailed , Can be combined with PACF、ACF The most significant order in the graph ( minimum value ) As p、q value ;
- If both autocorrelation and partial autocorrelation are truncated , You can choose to change to a higher differential , Or not suitable for establishing ARMA Model ;
- We recommend that you use ARIMA Of AIC( Arrange and combine all parameters , solve AIC The combination parameter corresponding to the minimum value ) Automatic optimization mode , adopt PACF And ACF The method of determining the order of the graph is not accurate , It is also difficult to be persuasive .
9、 Model theory
Autocorrelation coefficient and partial autocorrelation coefficient are defined in statistics , It is a statistical index used to reflect the degree of correlation between variables , However, the relationship between the two specific variables is different .
Autocorrelation coefficient measures the degree of correlation between two different periods of the same event , Speaking figuratively is to measure the impact of your past behavior on your present .
Mathematical expression :

according to ACF Find the lag k Autocorrelation coefficient ACF(k) when , In fact, it's not Z(t) And Z(t-k) A simple correlation between .
because Z(t) At the same time, it will suffer from the middle k-1 Random variables Z(t-1)、Z(t-2)、……、Z(t-k+1) Influence , And this k-1 All random variables and z(t-k) There is a correlation , So the autocorrelation coefficient is actually doped with other variable pairs Z(t) And Z(t-k) Influence .
In order to measure simply Z(t-k) Yes Z(t) Influence , Partial autocorrelation coefficient is introduced (PACF) The concept of . For stationary time series {Z(t)}, The so-called lag k Partial autocorrelation coefficient means that in a given middle k-1 Random variables Z(t-1)、Z(t-2)、……、Z(t-k+1) Under the condition of , Or say , In the middle k-1 Random variables Z(t-1)、Z(t-2)、……、Z(t-k+1) After the interference of ,Z(t-k) Yes Z(t) The relevance of the impact .
Mathematical expression :

10、 reference
[1] Yu Ningli , Yi Dongyun , Tu Xianqin . Analysis of autocorrelation and partial correlation functions in time series [J]. Mathematical theory and application ,2007(01):54-57.
边栏推荐
- Is it safe to open an account and buy stocks on the Internet?
- Architects reveal the difference between working in Alibaba, Tencent and meituan
- R语言使用glm函数构建泊松对数线性回归模型处理三维列联表数据构建饱和模型、epiDisplay包的poisgof函数对拟合的泊松回归模型进行拟合优度检验(检验模型效果)
- How to use SPSS to do grey correlation analysis? Quick grasp of hand-to-hand Teaching
- The R language uses the follow up The plot function visualizes the longitudinal follow-up map of multiple ID (case) monitoring indicators, and uses stress The type parameter specifies the line type of
- Oracle Spatial creating spatial tables
- WebRTC Native M96 基础Base模块介绍之实用方法的封装(MD5、Base64、时间、随机数)
- plt. GCA () picture frame and label
- 实现领域驱动设计 - 使用ABP框架 - 系列文章汇总
- VFP serial port communication is difficult for 9527. Maomao just showed his skill and was defeated by kiss
猜你喜欢

Explain factor analysis in simple terms, with case teaching (full)

Time series analysis - how to use unit root test (ADF) correctly?

How to use ARIMA model for prediction?

Why can't you Ping the website but you can access it?

plt.gca()画框及打标签

Why can't the form be closed? The magic of revealing VFP object references

An easy-to-use seal design tool - (can be converted to ofd file)

一套自动化无纸办公系统(OA+审批流)源码:带数据字典

Windows11 MySQL service is missing

刷入Magisk通用方法
随机推荐
SQL server saves binary fields to disk file
How terrible is it not to use error handling in VFP?
ArcGIS services query filter by time field
架构师为你揭秘在阿里、腾讯、美团工作的区别
Gradle knowledge points
Actual combat summary of Youpin e-commerce 3.0 micro Service Mall project
R语言caTools包进行数据划分、scale函数进行数据缩放、e1071包的naiveBayes函数构建朴素贝叶斯模型
What is principal component analysis? Dimension reduction of classical case analysis variables
RecyclerView滚动到指定位置
VFP serial port communication is difficult for 9527. Maomao just showed his skill and was defeated by kiss
Pd1.4 to hdmi2.0 adapter cable disassembly.
揭秘GaussDB(for Redis):全面对比Codis
Why should Apple change objc_ Type declaration for msgsend
Implementing Domain Driven Design - using the ABP framework - Summary of a series of articles
Oracle Spatial creating spatial tables
An easy-to-use seal design tool - (can be converted to ofd file)
黑马畅购商城---3.商品管理
The idea of mass distribution of GIS projects
VFP calls the command line image processing program, and adding watermark is also available
Network related encapsulation introduced by webrtc native M96 basic base module