sas時間序列課后作業(yè)相關(guān)系數(shù)_第1頁
sas時間序列課后作業(yè)相關(guān)系數(shù)_第2頁
sas時間序列課后作業(yè)相關(guān)系數(shù)_第3頁
sas時間序列課后作業(yè)相關(guān)系數(shù)_第4頁
sas時間序列課后作業(yè)相關(guān)系數(shù)_第5頁
已閱讀5頁,還剩22頁未讀, 繼續(xù)免費閱讀

下載本文檔

版權(quán)說明:本文檔由用戶提供并上傳,收益歸屬內(nèi)容提供方,若內(nèi)容存在侵權(quán),請進行舉報或認領(lǐng)

文檔簡介

1、第二章習題第一題代碼如下data example2;in putfreq;time=intnx( year ,1,_n_-1);format year year4; |cards ;1 2 3 4 5 6 7 8 9 10 11 12 13 1415 16 17 18 19 20 proc gplot data =example2;plot freq*time;symbol c=black v=star i =join;run ;結(jié)果如下平穩(wěn)序列的時序圖應(yīng)該顯示該序列始終在一個常數(shù)值附近波動,而且波動范圍有界的特點。 可是上述時序圖是一次函數(shù)遞增趨勢的,所以該序列是非平穩(wěn)序列。uU li丘i

2、I導g朮耳m p ; 卯皆出胃中矽gAS 累統(tǒng)ThursdayasyuptotIc approx Inal Ioused for correThe ARILiA Procedurelie of NLAC is lar&er than 25X of the 淀i ies lerth. The ics anti conf Iderwe interveils miy bt poor.Naims of Variable = f reqMen of fforkinr Series10*5Standard Deviation5.766261Number of Obscrvat ions20Antocarr

3、e I at i on?Std Error033.2500001.00000diiU-diiU-diiL JiiLHjill-iJiHiqfjHidjdi Jadi 斤|1,心|11八1112TuT|t1MTHTMTHTi|Tn 1 nT*128.2625000.85000山Ur山山*山邊山*山l| 111 l| 11 p !| 1 IfTll|lTll|lTll|l!Tll|ll ;223.3250000.70150JI I Lrill L1j lIj nj J |_Li J a tfjrpr|Btii ll if ll ip T1 T lip318.4875000*55602桝冊附榊柑榊.

4、418.8000000.41504附常附瀬出榊HtB09.312G000.28008附岸出壯弗常.65.0750000.1626811.1375000.084218-2.460000-.07386Hi9-5.637500-.1695610-8.876000-,2518811-10.61250C-,31917聃串當串|E:12-12.300000-,36992-H家串當串|E串13-13.367500-,4026314-13.825000-.4157915-13.56250C-.40708*:*#*#*La Covari anceCorral ati on/ fiirks two standft

5、rd errors0.2236070,3496490.4140700.4498620.4686170.4769130.4793490.4794710.4800370,4830220.4895450,4993420.5133430.52630?0.545000從圖中我們發(fā)現(xiàn)序列的自相關(guān)系數(shù)遞減到零的速度相當緩慢,在很長的時間延遲時期里, 自相關(guān)系數(shù)一直為正,而后又一直為負,在子相關(guān)圖上顯示出明顯的三角對稱性,這是具 有單調(diào)趨勢的非平穩(wěn)序列的一種典型自相關(guān)圖形式,這和該序列時序圖的單調(diào)遞增是一致 的。各個延遲階數(shù)下的自相關(guān)系數(shù)如下K=1 =0.85K=2? =0.7015K=3 =0.55602K

6、=4? =0.41504K=5=0.28008K=6? =0.152635SPSSFile Edit也 ewQata IransformB LI旦1: fre1(revar11.0022.0033.00A4,0055.006S.OO77.00a3.0099.001010.001111.001212.001313.0014H.OO151500161S.OO1717001819001919.002020. DOReportsBSGrp1jB 寶血iiwTablesCornparB Meansfijerieral Lin剛 ModeiiorrelalfiRegressionLoglinsarNeur

7、al Networksdassiiy卻牟 ReductionScaleypnparameiric TeslsTpw SeriesIMutiple RespcriEaComplBX SemplesS aUntitl.Al DtSBiD - POueHy Control0 RCCC.SurviveValue Arasis.L t DInaiye Graphs Utillies Acid-Qns Window HelpModels辰r1 resie Mocfs. 芮1 Affily Models.Generahzed Linear iMjoctefcSeasorialDewnnposition.Sp

8、ectral Anialysis.Series:freAutocorrelationsLagAutocorrelationStd. ErroraBox-Ljung StatisticValuedfo. bSig.1.850.20816.7321.0002.702.20228.7612.0003.556.19736.7623.0004.415.19141.5004.0005.280.18543.8005.0006.153.17844.5336.0007.034.17244.5727.0008-.074.16544.7718.0009-.170.15845.9219.00010-.252.1514

9、8.71310.00011-.319.14353.69311.00012-.370.13561.22012.00013-.403.12671.40913.00014-.416.11784.08714.00015|-.408 |.107 |98.729 15 .000a. The underlying process assumed is independence (white noise).b. Based on the asymptotic chi-square approximation.fre10- CaefficierrtUpper tonfklgnue Limit Lower Con

10、fidence Limit05-y ooa-0 5-10-tiiiitriii i ( i r1234567e910 1112 13 14 15Lg Number第二題代碼如下data example2;in putppm;time=intnx(month, 01jan1975d,_n_- 1);format time monyy.;cards ;330.45 330.97 331.64 332.87 333.61 333.55 331.90 330.05 328.58 328.31 329.41 330.63331.63 332.46 333.36 334.45 334.82 334.323

11、33.05 330.87 329.24 328.87 330.18 331.50332.81 333.23 334.55 335.82 336.44 335.99334.65 332.41 331.32 330.73 332.05 333.53334.66 335.07 336.33 337.39 337.65 337.57336.25 334.39 332.44 332.25 333.59 334.76335.89 336.44 337.63 338.54 339.06 338.95337.41 335.71 333.68 333.69 335.05 336.53337.81 338.16

12、339.88 340.57 341.19 340.87339.25 337.19 335.49 336.63 337.74 338.36 proc gplot data =example2;plot ppm*time;symbol c=black v=star i =join;run結(jié)果如下平穩(wěn)序列的時序圖應(yīng)該顯示該序列始終在一個常數(shù)值附近波動,而且波動范圍有界的特點。 可是上述時序圖顯示每月釋放的co2數(shù)據(jù)以年為周期呈現(xiàn)出規(guī)則的周期性,除此之外還有明顯的逐年遞增的趨勢。顯然該序列也一定不是平穩(wěn)序列。繪制樣本自相關(guān)圖代碼如下data example2_2;in putppm;time=intn

13、x(month, 1jan1975d,_n_- 1);format time monyy.;cards ;330.45 330.97 331.64 332.87 333.61 333.55331.90 330.05 328.58 328.31 329.41 330.63331.63 332.46 333.36 334.45 334.82 334.32333.05 330.87 329.24 328.87 330.18 331.50332.81 333.23 334.55 335.82 336.44 335.99334.65 332.41 331.32 330.73 332.05 333.533

14、34.66 335.07 336.33 337.39 337.65 337.57336.25 334.39 332.44 332.25 333.59 334.76335.89 336.44 337.63 338.54 339.06 338.95337.41 335.71 333.68 333.69 335.05 336.53337.81 338.16 339.88 340.57 341.19 340.87339.25 337.19 335.49 336.63 337.74 338.36Jproc arima data =example2_2;identifyvar =ppm nlag =24

15、;run ;Name of Variable = ppmi3- .crk ins -?eries 334.5044Standard De?Ietion3,151627Number of Observat ians72AntocorrelatIonsLag Ccvari anceCorrelat i onStd Error2345678901234567890123409.33275219.Q14C507.1S86045.090713.4747002.4623612.0172852.0S79442.S251089.G188214.6145715.S0G3065.9793085.1492643.6

16、608442.0582200.3033340,013455 -OJ22S07 -0.2691B70.1116040.82191G1.Sm322.41E8312.5082481,000000,907510,721710.512520.349820.246900.203090.210210.2S4290,384380,434720.5845S0.B01380.51S410.36S560.208710,081380.00135 -,03248,027100.011240+092750.170110.243200.252521 山 lLf山 il1 山 山1Qnb Jj il*11廠序那-那鄧礙中 尊

17、衝CLH15爐和可町那d準if1T11 i|i ip i|i 1111 j 1111T111 j 11111111 |i 111 yn 1iiUj lLp li-i T T* 6應(yīng)L Jj Jj 山山if -ip rpiniif |-ip1 丄”A 山 山 a,山1 *X* i| ii | |i i|i i|iT1 lTlb if nfjipi 1屮山 7Mb* 1illip m rri. rp jTi ap rfi卅!KHfiH. *跡融,ipii|-ipT1-1937654321012345676910DJ1P851 0.191744 0.226350 0.241932 0.243556

18、0.252237 0.254498 0.256898 a.?60647 0.267627 0*279554 0.296045 0.812584 0.324305 0.330072 0.331865 0.332142 0.332142 Q.382W6 0.882217 0.332222 0.882508 0.333715 0.886167 marks tword errors從圖中我們發(fā)現(xiàn)自相關(guān)系數(shù)長期位于零軸一邊,這是具有單調(diào)趨勢序列的典型特征,同時 自相關(guān)圖呈現(xiàn)出明顯的正弦波動規(guī)律,這是具有周期變化規(guī)律的非平穩(wěn)序列的典型特征, 這和該序列時序圖的帶長期遞增趨勢的周期性質(zhì)非常吻合。各個延遲階數(shù)

19、下的自相關(guān)系數(shù)如下:就是上圖中第三列correlation的值K=1;? =0.90751K=2? =0.72171K=3? =0.51252K=4=0.34982K=5 =0.24690K=6=0.20309后面的圖中有顯示所以省略。SPSSAutocorrelationsSeries:PPMLagAutocorrelationStd. ErroraBox-Ljung StatisticValuedfo. bSig.1.908.11561.8031.0002.722.115101.4482.0003.513.114121.7313.0004.350.113131.3204.0005.247.

20、112136.1675.0006.203.111139.4976.0007.210.110143.1197.0008.264.110148.9348.0009.364.109160.1609.00010.485.108180.35010.00011.585.107210.19711.00012.602.106242.37612.00013.518.105266.64613.00014.369.104279.12414.00015.207.103283.11815.000a. The underlying process assumed is independence (white noise)

21、.b. Based on the asymptotic chi-square approximation.PPMU_1234567 S 910 1112 13 14 15 CoeffldertUpper ConfitJenc總 Limit Lower Confidence LimitLag Number第二題代碼如下data example2;in putmm;time=intnx(month, 01jan1945d,_n_- 1);format timemony y7.;cards ;69.380.040.974.984.6101.1225.095.3100.648.3144.528.338

22、.452.368.637.1148.6218.7131.6112.881.831.047.570.196.861.555.6171.7220.5119.463.2181.673.964.8166.948.0137.780.5105.289.9174.8124.086.4136.931.535.3112.3 43.0160.897.080.562.5158.27.6165.9106.792.263.226.277.052.3 105.4144.349.5116.154.1148.6159.385.367.3112.859.4Jproc gplot data =example2;plot mm*t

23、ime;symbol c=black v=star i =join;run ;結(jié)果如下mm300200100JAN1945JUL1945JAN1946JUL1946JAN1947JUL1947JAN1948JUL1948JAN1949JUL1949JAN1950JUL1950JAN1951time平穩(wěn)序列的時序圖應(yīng)該顯示該序列始終在一個常數(shù)值附近波動,而且波動范圍有界的特點??墒巧鲜鰰r序圖顯示每月的降雨量數(shù)據(jù)大致在一個常數(shù)波動,可以主觀的認為大致趨于平穩(wěn)。繪制樣本自相關(guān)圖代碼如下data example2_2;in putmm;time=intnx(month , 1jan1945d,_n_-

24、 1);format time mony y7.;cards ;69.3 80.040.974.984.6101.1225.095.3100.648.3144.528.338.447.552.370.168.637.1148.6218.7131.6112.881.831.096.861.555.6171.7220.5119.463.2181.673.964.8166.948.0137.780.5105.289.9174.8124.086.4136.931.535.3112.343.0160.897.080.562.5158.27.6165.9106.792.263.226.277.052.31

25、05.4144.349.5116.154.1148.6159.385.367.3112.859.4proc arima data =example2_2; identifyvar =mm nlag =24 ;95.3458349.5B06472run ; |hfesn of Iorkirif Ser i cs Standard Devi at ion Mumber of Observat iorsLae Govftr ianteCorreia titwi 1Autcccrreleit ions02456.24731,366B0C102.151 -106.195 -438,914 -G17.2B

26、2 -230.421 -166.479-176.79734.00B1762S0.897583.73012 5 用 6113 -61.538174m185.ooe15 -34E.fi3916 -500.06C17 -602.S951$163.24719 -342.53420 -$3,507721 506.307鋰-24.23335023137.26514 283.9751.000000.012770.04160-.04323-.25130-.09581-.0B77B-.Q713S0.103450.217300.31587 -.02606 0.07532*.14121-20359*.!454S0J

27、SB46-.13945-.:I34O0.20572-.00387Q.080310.11406T ! |n| |n| *T“r T* sT* T1 T bit*00.117851蠱*0.1178700.1190740.1192940.1219850.128976 *0.129319 #1304100.130360i0.130881iWM,0.182245i*榊*啊0.137114用0.148373D.1469330.147403D.143884QJ53141QJ585120.158889, $:O.1GO6S0啊啊0.1606301-0.1643070.164816OJ648GOStd Erro

28、rmarks two standeird errors從圖中我們發(fā)現(xiàn)自相關(guān)系數(shù)大致在0軸附近波動,所以可以主觀的認為它是平穩(wěn)的,各個延遲階數(shù)下的自相關(guān)系數(shù)如下:就是上圖中第三列correlation的值K=1?=0. 01277K=2? =0.04160K=3 =-0.04323K=4=-0.17869后面的圖中有顯示所以省略。Autoccrrelation Check for White I4oiseToLasChi-SqjareDFPr i Chi Eq&8.5260.2028Q.0130,042-0.D43-0,178-0.251-0.0341223.36120,0248-0,168-0

29、,0720.0140,1090.21701,316IB36.02190.0070-0.0250.075-0.141-0.204-0.245Oi.OCE2444.77240.00620J39-0.034(L2朋-0.010o.oeoo.ne數(shù)據(jù)個數(shù)是72,他的四分之一是 18,所以觀察前三行的 p值,由純隨機檢驗圖可以看出, 在延遲階數(shù)為6時,p值大于0.05,是純隨機的,則該規(guī)律的波動沒有任何統(tǒng)計規(guī)律可行。而12、18階的p值則小于0.05,拒絕原假設(shè),所以認為月度降雨量不屬于純隨機波動,說 明該序列不僅可以認為是平穩(wěn)的,而且還蘊含著值得提取的信息。第四題用exceI計算LB統(tǒng)計量尸0.95(

30、6)=1.635尤:.9(12) 5. 226國文件輪輯視團辺插入格式辺工具泊帀日山壽丨曲丨直丨總(a“町“包無-ziE17 AABCD10. 020. 00044. 0404E-0620. 05a 00252. 55102E-0530.10.010. 0001030934-0. 020. 00044.16667E-0650. 050. 00252. 63158E-0560. 010. 00011.06383E-0670. 120. 0144CL 000154839S-0. 06CL 00363. 91304E-051. 674735g0. 08a 00647. 0329館-0510-Q 05

31、0, 00252. 77778E-05it0. 020. 00044. 49438E-0612-0. 050. 00252. 84091E-05134. 989531所以根據(jù)自己的計算結(jié)果:當延遲階數(shù)為6階時,大于1.635,所以拒絕原假設(shè),認為是非純隨機的,所以該序列是有 價值的。當延遲階數(shù)為12階時,小于5.226,所以接收原假設(shè),認為是純隨機的,所以該序列再延 遲階數(shù)為12時是沒有價值的。第五題代碼如下data example2;in putsale;n_- 1);time=intnx( month , 01jan2000d format time mony y7.;cards ;153

32、13414511718717520317823424318914921222721417830029829524822125622020220123723116217516517413512312411912010410685968587679078747563proc gplot data =example2;plot sale*time;symbol c=black v =star i =join;run結(jié)果如下JAN2000APR2000JUL2000 OCT2000JAN2001APR2001JUL2001 OCT2001JAN2002 APR2002JUL2002 OCT2002JA

33、N2003APR2003JUL2003 OCT2003JAN2004 time該時序圖顯示某公司銷售量在后期有明顯的遞減趨勢,是非平穩(wěn)序列繪制樣本自相關(guān)圖代碼如下data example2_2;in putsale;n_- 1);time=intnx( month , 1jan2000d format time mony y7.;cards ;1531341451171871752031782342431891492122272141783002982952482212562202022012372311621751651741351231241191201041068596858767907

34、8747563proc arima data =example2_2; identifyvar =sale nlag =24 ;runDeviation64,82357Number of ObservationsSid Error04202.373LO0000jiiliiiljdf lirdrdinii-JiiijiiliiljdfilBdrdifJididiiai ii ii iy rfi 171 T* T11T1 uH1 T1 T1 T11T11 13548.5140.84431Ji1111HiLjiK11 a Ul1-|Jj*j1jiLlll|LrlU-Uj23158.S340.7515

35、4lLh iJjiJj iJj L* hJj dV Jj Jj Qj lLp lLi4 邛i|iifiiy*!滬rp qi平-qilyiiTnri*T, Prp32924.2880.6S577lli.JjI Ii IIiilitil ir l ii liilnriilai !42818.4S80.694405Z47B.3160.58920LiliJiliudfdfdi-iildlsJlUililiihi i11| JIp11|ii1111.E1929,7380.459151 jl 11H 1 1 llji 11 111 宙也出辭MR審不11647.8020.49S53 ll ill |T 1i

36、h mm幅用eem中m.81644.907Q.43896l91545.2080.3S7BB出眾*1|1圖:+101020.1680.244639fJjLgjiiuilrdf11582.850O.138SS12449.1880.10688出1*+Autocorrelat i onsLag Covariance Correlat ion -1 9376543?1 0 1 2345678S 1/ tfirks to standard errors0.14483S0.2248010.2721670.30B98G0,3381290.35S8S20.3709180.3816140.3919930.3931

37、120.402224C.403?19自相關(guān)圖顯示自相關(guān)系數(shù)一直為正,而且有遞減趨勢,所以是非平穩(wěn)序列。Li&12Squart148,41188.39DFE12ChiSqAutocorrelat ions-D.4690.10?.0001ChiSqhU I cor re 1 al 1 oriS 664.0?EC00010.50K0.539D.87J0.2910.25S0.1481288.9812.0001D.2700.188D,1780.2580.2070.226對數(shù)據(jù)進行函數(shù)y廠xt-xz運算后的結(jié)果如下代碼如下data example2; |in putfreq;time=i ntnx( 28

38、 ,O1ja n1969d,_n_- 1);format timemonyy7.;cards ;5-502-2-303 4-69-3 4-1562-1-462-415 440-217-330-722-1921-7-3-5-42-674-12-68-86-326-5-46 0 -2-732-713-80-15-6 4-22-5 proc gplot data =example2;plot freq*time;symbol c=black v=star i =joi n; run ;結(jié)果如下frag-30JUL19CB JANI9B9 JUL19B9 JAN1370 JUL 1370 JAN197

39、I JUL1971 JMl97f JUL1972 JANI973 J11L19 苗 JAN1974t m30-10;-20 ;20由時序圖可知該序列大致在零左右波動,基本穩(wěn)定,為了穩(wěn)妥,繼續(xù)進行自相 關(guān)圖檢驗,初步可以認為平穩(wěn)序列。繪制樣本自相關(guān)圖代碼如下data example2_2;in put freq;time=intnx( 28, 1jan1969d,_n_- 1);format timemonyy7.;cards ;5-502-2-3034-69-34-156 2-1-462-415 440-217-330-722-1921-7-3-5-42-67 4-12-68-86-32 6-

40、5-460-2-73 2-713-80-15-64-22-55proc arimadata =example2_2;iden tifyvar =freq ;run ;Name of Vari able = freqMean of Work I re Series -0,07246Standard Deviatian7.42561Number of Observat ions69Autocar re I at iQ-12345 6789Q123456755.1396771.00000-29.193783-.6294510.7513710.10498-4.435011-.08043-3,267475-.059285.08

溫馨提示

  • 1. 本站所有資源如無特殊說明,都需要本地電腦安裝OFFICE2007和PDF閱讀器。圖紙軟件為CAD,CAXA,PROE,UG,SolidWorks等.壓縮文件請下載最新的WinRAR軟件解壓。
  • 2. 本站的文檔不包含任何第三方提供的附件圖紙等,如果需要附件,請聯(lián)系上傳者。文件的所有權(quán)益歸上傳用戶所有。
  • 3. 本站RAR壓縮包中若帶圖紙,網(wǎng)頁內(nèi)容里面會有圖紙預覽,若沒有圖紙預覽就沒有圖紙。
  • 4. 未經(jīng)權(quán)益所有人同意不得將文件中的內(nèi)容挪作商業(yè)或盈利用途。
  • 5. 人人文庫網(wǎng)僅提供信息存儲空間,僅對用戶上傳內(nèi)容的表現(xiàn)方式做保護處理,對用戶上傳分享的文檔內(nèi)容本身不做任何修改或編輯,并不能對任何下載內(nèi)容負責。
  • 6. 下載文件中如有侵權(quán)或不適當內(nèi)容,請與我們聯(lián)系,我們立即糾正。
  • 7. 本站不保證下載資源的準確性、安全性和完整性, 同時也不承擔用戶因使用這些下載資源對自己和他人造成任何形式的傷害或損失。

評論

0/150

提交評論