懿說學區(42) | SPSS統計分析(52)時間序列分析基礎

learningyard學苑 發佈 2024-03-30T10:43:54.010220+00:00

In this issue, we learned the theoretical knowledge of time series analysis and the creation of time series. In the next issue, we will learn exponential smoothing.

「分享興趣,傳播快樂,增長見聞,留下美好!大家好,這裡是小編。歡迎大家繼續訪問學苑內容,我們將竭誠為您帶來更多更好的內容分享。

【思維導圖】

【理論基礎】

上一期我們學習了,因子分析的實踐操作。這一期,我們來學習時間序列分析。時間系列分析是多元統計分析的一項重要內容。時間序列是指按時間順序取得的觀測資料的集合。

In the last issue, we learned the practical operation of factor analysis. In this issue, we will learn time series analysis. Time series analysis is an important part of multivariate statistical analysis. Time series refers to the collection of observation data obtained in time sequence.

很多數據以時間序列形式呈現,如貨運碼頭的逐月吞吐量、公路交通次數周度報告、城市空氣污染物的日均值序列、醫院每日門診接診人數序列、地區工業總產值的年度數據序列、逐年人口統計資料等。時間序列區別於普通資料的本質特徵是相鄰觀測值之間的依賴性或相關性,這種特徵使得時間序列資料的統計分析方法區別於一般數據的統計分析方法。

Many data are presented in the form of time series, such as monthly throughput of freight terminals, Zhou Du report of road traffic times, daily average series of urban air pollutants, daily outpatient number series of hospitals, annual data series of regional total industrial output value, annual demographic data and so on. The essential characteristic of the difference between time series and general data is the dependence or correlation between adjacent observations, which makes the statistical analysis method of time series data different from that of general data.

事實上,有關時間序列分析的特殊技巧,幾乎都是基於對自相關性處理的技巧,分析時間序列數據可以從運動的角度認識事物的本質,如幾個時間序列之間的差別,一個較長時間序列的周期性,或對未來情況進行預測。

In fact, the special techniques related to time series analysis are almost all based on the techniques of autocorrelation processing. Analyzing time series data can understand the essence of things from the perspective of motion, such as the differences between several time series, the periodicity of a longer time series, or predict the future situation.

【時間序列預處理的必要性】

在對數據用時間序列模型進行擬合處理前,應先對數據進行必要的觀察和預處理,直到它平穩後再用這些過程對其進行分析,(判斷序列是否平穩可以看它的均值和方差是否不再隨時間的變化而變化,自相關係數是否只與時間間隔有關而與所處的時間無關。)

Before fitting the data with time series model, The data should be observed and preprocessed first, and then analyzed by these processes until it is stable. (To judge whether the series is stable, we can see whether its mean and variance no longer change with time, and whether the autocorrelation coefficient is only related to the time interval and has nothing to do with the time.)

因此,根據對數據建模前預處理工作的先後順序,將它分為三個步驟:首先,對有缺失者的數據進行補齊;其次,將數據資料定義為相應的時間序列;最後,對時間序列數據的平穩性進行計算觀察。如果數據文件中存在一個變量,其值是按某一時間間隔採集的,要進行時間序列分析,還需要有一個表明採集時間的日期變量。

Therefore, according to the sequence of preprocessing work before data modeling, it is divided into three steps: first, make up the missing data; Secondly, the data is defined as the corresponding time series; Finally, the stationarity of time series data is calculated and observed. If there is a variable in the data file whose value is collected at a certain time interval, a date variable indicating the collection time is needed for time series analysis.

【SPSS實例訓練】

下面我們來用一個SPSS實例來說明。時間序列的建立和平穩化的過程:

Let's use an SPSS example to illustrate. The process of establishing and stabilizing time series:

第1步,填補缺失值。時間序列分析中的缺失值不能採用通常刪除的辦法來解決,因為這樣會導致原有時間序列周期性的破壞,而無法得到正確的分析結果。

Step 1, fill in the missing value. The missing values in time series analysis can not be solved by the usual deletion method, because it will lead to the periodic destruction of the original time series, and the correct analysis results can not be obtained.

第2步,定義日期變量。定義日期模塊可以產生周期性的時間序列日期變量,使用「定義日期」對話框定義日期變量,需要在數據窗口讀入一個按某種時間順序排列的數據文件,數據文件中的變量名不能與系統默認的時間變量名重複,否則系統建立的日期變量會覆蓋同名變量。系統默認的變量名有:年份,年份、季度,年份、月份,年份、季度、月份,日,星期、日,日、小時等。

Step 2, define the date variable. The Definition Date module can generate periodic time series date variables, To define a date variable using the "Define Date" dialog box, you need to read a data file arranged in a certain time order in the data window. The variable name in the data file cannot duplicate the default time variable name of the system, otherwise the date variable established by the system will overwrite the variable with the same name. The default variable names are: year, year, quarter, year, month, year, quarter, month, day, week, day, day, hour, etc.

第3步,創建時間序列。時間序列分析建立在序列平穩的條件上,判斷序列是否平穩,可以看它的均數方差是否不再隨時間的變化而變化,自相關係數是否只與時間間隔有關而與所處時間無關。在時間序列分析中為檢驗時間序列的平穩性,經常要用一階差分、二階差分,有時會選擇一個合適的時間序列模型,還要對原時間序列數據進行對數轉換或平方轉換等,這就需要在已經建立的時間序列文件數據文件中再建立一個新的時間序列變量。

Step 3: Create a time series. Time series analysis is based on the stationary condition of the series. To judge whether the series is stationary, we can see whether its mean variance no longer changes with time, and whether the autocorrelation coefficient is only related to the time interval but has nothing to do with the time. In order to test the stationarity of time series in time series analysis, First-order difference and second-order difference are often used, sometimes a suitable time series model is selected, and logarithmic transformation or square transformation is carried out on the original time series data, which requires establishing a new time series variable in the established time series file data file.

下期預告:本期,我們學習了時間序列分析的理論知識和時間序列的創建。下一期,我們將會學習指數平滑法。

In this issue, we learned the theoretical knowledge of time series analysis and the creation of time series. In the next issue, we will learn exponential smoothing.

如果您對今天的文章有獨特的想法,歡迎給我們留言,讓我們相約明天,祝您今天過得開心快樂!

If you have a unique idea of today's article, welcome to leave us a message, let us meet tomorrow, I wish you a happy today!

——————————————————————————————

參考資料:《SPSS23(中文版)統計分析實用教程》、百度百科

翻譯:訊飛語音

本文由learningyard新學苑原創,部分圖片文字來源於他處。如有侵權,請聯繫刪除。

關鍵字: