![協(xié)整理論及其R語言的實現(xiàn)_第1頁](http://file3.renrendoc.com/fileroot_temp3/2022-3/13/63a68915-eef0-4bdd-b0bc-d12d0da706dc/63a68915-eef0-4bdd-b0bc-d12d0da706dc1.gif)
![協(xié)整理論及其R語言的實現(xiàn)_第2頁](http://file3.renrendoc.com/fileroot_temp3/2022-3/13/63a68915-eef0-4bdd-b0bc-d12d0da706dc/63a68915-eef0-4bdd-b0bc-d12d0da706dc2.gif)
![協(xié)整理論及其R語言的實現(xiàn)_第3頁](http://file3.renrendoc.com/fileroot_temp3/2022-3/13/63a68915-eef0-4bdd-b0bc-d12d0da706dc/63a68915-eef0-4bdd-b0bc-d12d0da706dc3.gif)
![協(xié)整理論及其R語言的實現(xiàn)_第4頁](http://file3.renrendoc.com/fileroot_temp3/2022-3/13/63a68915-eef0-4bdd-b0bc-d12d0da706dc/63a68915-eef0-4bdd-b0bc-d12d0da706dc4.gif)
![協(xié)整理論及其R語言的實現(xiàn)_第5頁](http://file3.renrendoc.com/fileroot_temp3/2022-3/13/63a68915-eef0-4bdd-b0bc-d12d0da706dc/63a68915-eef0-4bdd-b0bc-d12d0da706dc5.gif)
版權(quán)說明:本文檔由用戶提供并上傳,收益歸屬內(nèi)容提供方,若內(nèi)容存在侵權(quán),請進行舉報或認(rèn)領(lǐng)
文檔簡介
1、LogoLogoAdd Your Company Slogan協(xié)整理論及其協(xié)整理論及其R R語言的實現(xiàn)語言的實現(xiàn)邵晨邵晨上海財經(jīng)大學(xué)上海財經(jīng)大學(xué) 統(tǒng)計與管理學(xué)院統(tǒng)計與管理學(xué)院整理整理ppt為什么要協(xié)整?提綱提綱1 1什么是協(xié)整?2 2如何進行協(xié)整檢驗?3 3R語言中相關(guān)函數(shù)4 4案例:中國進出口之間關(guān)系檢驗5 5整理整理ppt偽回歸(虛假回歸)偽回歸(虛假回歸)回歸分析:回歸分析:一個重要的前提假設(shè):平穩(wěn)性但是,實際上大部分的宏觀經(jīng)濟時間序列和金融時間序列都是非平穩(wěn)的。 整理整理ppt偽回歸(虛假回歸)偽回歸(虛假回歸)案例案例結(jié)果結(jié)果以以1990年至年至2008年年美國美國城鎮(zhèn)居民家城鎮(zhèn)居民
2、家庭人均可支配收入和庭人均可支配收入和中國中國人均消費人均消費性支出為例:性支出為例: data Usincome Chinacoms reg summary(reg) library(zoo) library(lmtest) dwtest(reg)Call:Call:lm(formula = Chinacoms USincome)lm(formula = Chinacoms USincome)Residuals:Residuals: Min 1Q Median 3Q Max Min 1Q Median 3Q Max -640.11 -350.44 -55.96 346.49 1139.42
3、-640.11 -350.44 -55.96 346.49 1139.42 Coefficients:Coefficients: Estimate Std. Error t value Pr(|t|) Estimate Std. Error t value Pr(|t|) (Intercept) -6.886e+03 4.896e+02 -14.06 8.56e-11 (Intercept) -6.886e+03 4.896e+02 -14.06 8.56e-11 * * * *USincome 4.788e-01 1.898e-02 25.23 6.54e-15 USincome 4.788
4、e-01 1.898e-02 25.23 6.54e-15 * * * *-Signif. codes: 0 Signif. codes: 0 * * * * 0.001 0.001 * * * 0.01 0.01 * * 0.05 . 0.1 1 0.05 . 0.1 1 Residual standard error: 477.7 on 17 degrees of freedomResidual standard error: 477.7 on 17 degrees of freedomMultiple R-squared: 0.974, Adjusted R-squared: Multi
5、ple R-squared: 0.974, Adjusted R-squared: 0.9724 0.9724 F-statistic: 636.3 on 1 and 17 DF, p-value: 6.544e-15 F-statistic: 636.3 on 1 and 17 DF, p-value: 6.544e-15 Durbin-Watson test Durbin-Watson testdata: reg data: reg DW = 0.4992, p-value = 4.485e-06DW = 0.4992, p-value = 4.485e-06alternative hyp
6、othesis: true autocorrelation is greater than alternative hypothesis: true autocorrelation is greater than 0 0 顯著的顯著的R R2 2較大的較大的t t值值DWDW統(tǒng)計量很小,存統(tǒng)計量很小,存在嚴(yán)重的自相關(guān)在嚴(yán)重的自相關(guān)整理整理ppt線性回歸模型線性回歸模型lm()函數(shù):用法: fitted.model reg ts(1:30,start=1980,end=2009, ts(1:30,start=1980,end=2009, frequency=1)frequency=1)季度數(shù)據(jù):
7、季度數(shù)據(jù):ts(1:30,start=c(2003,3),end= ts(1:30,start=c(2003,3),end= c(2010,4),frequency=4)c(2010,4),frequency=4)整理整理ppt時間序列舉例時間序列舉例月度數(shù)據(jù):月度數(shù)據(jù):ts(1:30,start=c(2008,5), ts(1:30,start=c(2008,5), frequency=12)frequency=12)每日數(shù)據(jù):每日數(shù)據(jù): a a print(a,calendar=TRUE) print(a,calendar=TRUE)整理整理ppt單位根檢驗單位根檢驗urca包中的ur.d
8、f()函數(shù):用法:ur.df(y, type = c(none, drift, trend), lags = 1, selectlags = c(Fixed, AIC, BIC) 參數(shù):y 被檢驗的時間序列type 檢驗類型: “none”, “drift” 或者 trend.lags 內(nèi)生變量的滯后階數(shù)selectlags 滯后階數(shù)確定方法:the Akaike “AIC” 或者 the Bayes “BIC” 信息 準(zhǔn)則,默認(rèn)值是fixed,由lags確定滯后階數(shù)。 整理整理ppt案例分析:中國進出口貿(mào)易之間關(guān)系案例分析:中國進出口貿(mào)易之間關(guān)系數(shù)據(jù)來源:國家統(tǒng)計數(shù)據(jù)庫( http:/ li
9、brary(urca) library(urca) urt.ex urt.ex summary(urt.ex) summary(urt.ex)# # # Augmented Dickey-Fuller Test Unit Root Test # # Augmented Dickey-Fuller Test Unit Root Test # # # Test regression trend Test regression trend Call:Call:lm(formula = z.diff z.lag.1 + 1 + tt + z.diff.lag)lm(formula = z.diff z
10、.lag.1 + 1 + tt + z.diff.lag)Residuals:Residuals: Min 1Q Median 3Q Max Min 1Q Median 3Q Max -0.17362 -0.05933 0.02236 0.05216 0.12439 -0.17362 -0.05933 0.02236 0.05216 0.12439 Coefficients:Coefficients: Estimate Std. Error t value Pr(|t|) Estimate Std. Error t value Pr(|t|)(Intercept) 0.77701 0.5325
11、3 1.459 0.158(Intercept) 0.77701 0.53253 1.459 0.158z.lag.1 -0.15325 0.11600 -1.321 0.199z.lag.1 -0.15325 0.11600 -1.321 0.199tt 0.02699 0.01723 1.566 0.130tt 0.02699 0.01723 1.566 0.130z.diff.lag 0.20945 0.20765 1.009 0.323z.diff.lag 0.20945 0.20765 1.009 0.323Residual standard error: 0.08564 on 24
12、 degrees of freedomResidual standard error: 0.08564 on 24 degrees of freedomMultiple R-squared: 0.2354, Adjusted R-squared: 0.1398 Multiple R-squared: 0.2354, Adjusted R-squared: 0.1398 F-statistic: 2.462 on 3 and 24 DF, p-value: 0.08697 F-statistic: 2.462 on 3 and 24 DF, p-value: 0.08697 Value of t
13、est-statistic is: Value of test-statistic is: -1.3211 -1.3211 7.0028 3.0289 7.0028 3.0289 Critical values for test statistics: Critical values for test statistics: 1pct 5pct 10pct 1pct 5pct 10pcttau3 tau3 -4.15 -3.50 -3.18-4.15 -3.50 -3.18phi2 7.02 5.13 4.31phi2 7.02 5.13 4.31phi3 9.31 6.73 5.61phi3
14、 9.31 6.73 5.61 urt.im urt.im summary(urt.im) summary(urt.im)Value of test-statistic is: Value of test-statistic is: -2.2266 -2.2266 6.0966 6.0966 3.3771 3.3771 Critical values for test statistics: Critical values for test statistics: 1pct 5pct 10pct 1pct 5pct 10pcttau3 tau3 -4.15 -3.50 -3.18-4.15 -
15、3.50 -3.18phi2 7.02 5.13 4.31phi2 7.02 5.13 4.31phi3 9.31 6.73 5.61phi3 9.31 6.73 5.61整理整理ppt單位根檢驗單位根檢驗對dlnexdlnex單位根檢驗結(jié)果:Value of test-statistic is: -3.2348 5.2379 Critical values for test statistics: 1pct 5pct 10pcttau2 -3.58 -2.93 -2.60phi1 7.06 4.86 3.94對dlnimdlnim單位根檢驗結(jié)果:Value of test-statistic
16、 is: -4.8372 11.7049 Critical values for test statistics: 1pct 5pct 10pcttau2 -3.58 -2.93 -2.60phi1 7.06 4.86 3.94結(jié)論:中國進口和出口的對數(shù)時間序列不平穩(wěn),但一階差分后平穩(wěn),結(jié)論:中國進口和出口的對數(shù)時間序列不平穩(wěn),但一階差分后平穩(wěn),說明是一階單整序列,即說明是一階單整序列,即lnex,lnim lnex,lnim I(1) I(1),滿足協(xié)整檢驗條件。,滿足協(xié)整檢驗條件。dlnex - diff(lnex)dlnim exim exim ex ex im im lnim lnim
17、 lnex lnex reg reg summary(reg) summary(reg) library(lmtest) library(lmtest) dw dw |t|) Estimate Std. Error t value Pr(|t|) (Intercept) (Intercept) -0.48270 -0.48270 0.14717 -3.28 0.14717 -3.28 0.00278 0.00278 * * * lnim lnim 1.07457 1.07457 0.02077 51.74 0.02077 51.74 2e-16 2e-16 * * * *-Signif. co
18、des: 0 Signif. codes: 0 * * * * 0.001 0.001 * * * 0.01 0.01 * * 0.05 . 0.05 . 0.1 1 0.1 1 Residual standard error: 0.1401 on 28 degrees of Residual standard error: 0.1401 on 28 degrees of freedomfreedomMultiple R-squared: 0.9897, Adjusted R-Multiple R-squared: 0.9897, Adjusted R-squared: squared: 0.
19、9893 0.9893 F-statistic: 2677 on 1 and 28 DF, p-value: F-statistic: 2677 on 1 and 28 DF, p-value: error urt.resid summary(urt.resid)Value of test-statistic is: -3.6185 Critical values for test statistics: 1pct 5pct 10pcttau1 -2.62 -1.95 -1.61結(jié)論:殘差平穩(wěn),說明兩個時間序列之間存在協(xié)整關(guān)系。結(jié)論:殘差平穩(wěn),說明兩個時間序列之間存在協(xié)整關(guān)系。意味著我國的進口
20、和出口之間具有長期均衡關(guān)系,增長或者減少具有協(xié)同效意味著我國的進口和出口之間具有長期均衡關(guān)系,增長或者減少具有協(xié)同效應(yīng)。應(yīng)。整理整理pptEGEG兩步協(xié)整檢驗:第二步(誤差修正模型的建立)兩步協(xié)整檢驗:第二步(誤差修正模型的建立) error error error.lagged error.lagged ecm.reg1 ecm.reg1 summary(ecm.reg1) summary(ecm.reg1) dwtest(ecm.reg1) dwtest(ecm.reg1)Call:Call:lm(formula = dlnex error.lagged + dlnim, data = l
21、m(formula = dlnex error.lagged + dlnim, data = diff.dat)diff.dat)Residuals:Residuals: Min 1Q Median 3Q Max Min 1Q Median 3Q Max -0.17214 -0.05198 0.01546 0.05053 0.14514 -0.17214 -0.05198 0.01546 0.05053 0.14514 Coefficients:Coefficients: Estimate Std. Error t value Pr(|t|) Estimate Std. Error t val
22、ue Pr(|t|) (Intercept) (Intercept) 0.10648 0.10648 0.02358 4.516 0.000131 0.02358 4.516 0.000131 * * * *error.lagged error.lagged -0.29647 -0.29647 0.11430 -2.594 0.015645 0.11430 -2.594 0.015645 * * dlnim dlnim 0.33929 0.33929 0.12470 2.721 0.011681 0.12470 2.721 0.011681 * * -Signif. codes: 0 Signif. codes: 0 * * * * 0.001 0.001 * * * 0.01 0.01 * * 0.05 . 0.1 0.05 . 0.1 1 1 Residual standard error: 0.08024 on 25 degrees of Residual standard error: 0.08024 on 25 degrees of freedomfreedomMultiple R-squared: 0.3008, Adjusted R-squared: Multiple R-squared: 0.3008, Adju
溫馨提示
- 1. 本站所有資源如無特殊說明,都需要本地電腦安裝OFFICE2007和PDF閱讀器。圖紙軟件為CAD,CAXA,PROE,UG,SolidWorks等.壓縮文件請下載最新的WinRAR軟件解壓。
- 2. 本站的文檔不包含任何第三方提供的附件圖紙等,如果需要附件,請聯(lián)系上傳者。文件的所有權(quán)益歸上傳用戶所有。
- 3. 本站RAR壓縮包中若帶圖紙,網(wǎng)頁內(nèi)容里面會有圖紙預(yù)覽,若沒有圖紙預(yù)覽就沒有圖紙。
- 4. 未經(jīng)權(quán)益所有人同意不得將文件中的內(nèi)容挪作商業(yè)或盈利用途。
- 5. 人人文庫網(wǎng)僅提供信息存儲空間,僅對用戶上傳內(nèi)容的表現(xiàn)方式做保護處理,對用戶上傳分享的文檔內(nèi)容本身不做任何修改或編輯,并不能對任何下載內(nèi)容負(fù)責(zé)。
- 6. 下載文件中如有侵權(quán)或不適當(dāng)內(nèi)容,請與我們聯(lián)系,我們立即糾正。
- 7. 本站不保證下載資源的準(zhǔn)確性、安全性和完整性, 同時也不承擔(dān)用戶因使用這些下載資源對自己和他人造成任何形式的傷害或損失。
最新文檔
- 四年級下冊簡單口算題大全
- 《賣火柴的小女孩》公開課一等獎創(chuàng)新教案(共兩課時)
- 武漢工貿(mào)職業(yè)學(xué)院《工程法學(xué)》2023-2024學(xué)年第二學(xué)期期末試卷
- 上海應(yīng)用技術(shù)大學(xué)《預(yù)防醫(yī)學(xué)導(dǎo)論》2023-2024學(xué)年第二學(xué)期期末試卷
- 南通大學(xué)《社交禮儀與職業(yè)形象設(shè)計》2023-2024學(xué)年第二學(xué)期期末試卷
- 2025年冷拔鋼合作協(xié)議書
- 煙臺工程職業(yè)技術(shù)學(xué)院《微電影創(chuàng)作》2023-2024學(xué)年第二學(xué)期期末試卷
- 2024年02月廣東2024年廣州銀行韶關(guān)分行(籌)社會招考筆試歷年參考題庫附帶答案詳解
- 寧波城市職業(yè)技術(shù)學(xué)院《信息系統(tǒng)》2023-2024學(xué)年第二學(xué)期期末試卷
- 湖北鐵道運輸職業(yè)學(xué)院《網(wǎng)絡(luò)經(jīng)濟》2023-2024學(xué)年第二學(xué)期期末試卷
- 安徽新宸新材料有限公司年產(chǎn)6000噸鋰離子電池材料雙氟磺酰亞胺鋰項目環(huán)境影響報告書
- 日本酒類消費行業(yè)市場分析報告
- GB/T 4151-1996硝酸鈰
- GB/T 29594-2013可再分散性乳膠粉
- 西子奧的斯電梯ACD2調(diào)試說明書
- 成長感恩責(zé)任高中主題班會-課件
- 化工裝置實用操作技術(shù)指南
- 建設(shè)項目全過程工程咨詢服務(wù)指引(咨詢企業(yè)版)(征求意見稿)
- 分手的協(xié)議書模板(5篇)
- 2020年度安徽省中考數(shù)學(xué)科目試卷
- 2023年山東藥品食品職業(yè)學(xué)院單招綜合素質(zhì)考試筆試題庫及答案解析
評論
0/150
提交評論