资源描述:
《the r book spatial statistics》由会员上传分享,免费在线阅读,更多相关内容在工程资料-天天文库。
1、24TimeSeriesAnalysisTimeseriesdataarevectorsofnumbers,typicallyregularlyspacedintime.Yearlycountsofanimals,dailypricesofshares,monthlymeansoftemperature,andminute-by-minutedetailsofbloodpressureareallexamplesoftimeseries,buttheyaremeasuredondifferentti
2、mescales.Sometimestheinterestisinthetimeseriesitself(e.g.whetherornotitiscyclic,orhowwellthedatafitaparticulartheoreticalmodel),andsometimesthetimeseriesisincidentaltoadesignedexperiment(e.g.repeatedmeasures).Wecovereachofthesecasesinturn.Thethreekeycon
3、ceptsintimeseriesanalysisaretrend,serialdependence,andstationarity.Mosttimeseriesanalysesassumethatthedataareuntrended.Iftheydoshowaconsistentupwardordownwardtrend,thentheycanbedetrendedbeforeanalysis(e.g.bydifferencing).Serialdependencearisesbecaus
4、ethevaluesofadjacentmembersofatimeseriesmaywellbecorrelated.Stationarityisatechnicalconcept,butitcanbethoughtofsimplyasmeaningthatthetimeserieshasthesamepropertieswhereveryoustartlookingatit(e.g.whitenoiseisasequenceofmutuallyindependentrandomvariables
5、eachwithmeanzeroandvarianceσ2>0).24.1Nicholson’sblowfliesTheAustralianecologist,A.J.Nicholson,rearedblowflylarvaeonpiecesofliverinlaboratoryculturesthathistechnicianskeptrunningcontinuouslyforalmost7years(361weeks,tobeexact).Thetimeseriesfornumbersofadul
6、tflieslookslikethis:blowfly<-read.table("c:\temp\blowfly.txt",header=T)attach(blowfly)names(blowfly)[1]"flies"TheRBook,SecondEdition.MichaelJ.Crawley.©2013JohnWiley&Sons,Ltd.Published2013byJohnWiley&Sons,Ltd.786THERBOOKFirst,makethefliesvariableintoati
7、meseriesobjectandplotit:flies<-ts(flies)plot(flies)1000015000flies50000050100150200250300350TimeThisclassictimeserieshastwoclearfeatures:Forthefirst200weeksthesystemexhibitsbeautifullyregularcycles.Afterweek200thingschange(perhapsageneticmutationhadar
8、isen);thecyclesbecomemuchlessclear-cut,andthepopulationbeginsapronouncedupwardtrend.Therearetwoimportantideastounderstandintimeseriesanalysis:autocorrelationandpartialautocorrelation.Thefirstdescribeshowthisweek’spopulationisrelatedtolas