Thursday 14 September 2017

Bewegungs Durchschnitt Autokorrelation


Einführung in ARIMA: Nichtseasonal-Modelle ARIMA (p, d, q) Prognosegleichung: ARIMA-Modelle sind in der Theorie die allgemeinste Klasse von Modellen für die Prognose einer Zeitreihe, die gemacht werden kann, um 8220stationary8221 durch differencing (wenn nötig), vielleicht In Verbindung mit nichtlinearen Transformationen wie Logging oder Deflating (falls erforderlich). Eine zufällige Variable, die eine Zeitreihe ist, ist stationär, wenn ihre statistischen Eigenschaften alle über die Zeit konstant sind. Eine stationäre Serie hat keinen Trend, ihre Variationen um ihre Mittel haben eine konstante Amplitude, und es wackelt in einer konsistenten Weise. D. h. seine kurzzeitigen zufälligen Zeitmuster sehen immer in einem statistischen Sinn gleich aus. Die letztere Bedingung bedeutet, daß ihre Autokorrelationen (Korrelationen mit ihren eigenen vorherigen Abweichungen vom Mittelwert) über die Zeit konstant bleiben oder äquivalent, daß sein Leistungsspektrum über die Zeit konstant bleibt. Eine zufällige Variable dieses Formulars kann (wie üblich) als eine Kombination von Signal und Rauschen betrachtet werden, und das Signal (wenn man offensichtlich ist) könnte ein Muster der schnellen oder langsamen mittleren Reversion oder sinusförmigen Oszillation oder eines schnellen Wechsels im Zeichen sein , Und es könnte auch eine saisonale Komponente haben. Ein ARIMA-Modell kann als 8220filter8221 betrachtet werden, das versucht, das Signal vom Rauschen zu trennen, und das Signal wird dann in die Zukunft extrapoliert, um Prognosen zu erhalten. Die ARIMA-Prognosegleichung für eine stationäre Zeitreihe ist eine lineare (d. h. regressionstypische) Gleichung, bei der die Prädiktoren aus Verzögerungen der abhängigen Variablen und Verzögerungen der Prognosefehler bestehen. Das heißt: vorhergesagter Wert von Y eine Konstante undeiner gewichteten Summe von einem oder mehreren neueren Werten von Y und einer gewichteten Summe von einem oder mehreren neueren Werten der Fehler. Wenn die Prädiktoren nur aus verzögerten Werten von Y bestehen, ist es ein reines autoregressives Modell (8220 selbst-regressed8221), das nur ein Spezialfall eines Regressionsmodells ist und mit Standardregressionssoftware ausgestattet werden kann. Zum Beispiel ist ein autoregressives (8220AR (1) 8221) Modell erster Ordnung für Y ein einfaches Regressionsmodell, bei dem die unabhängige Variable nur Y um eine Periode (LAG (Y, 1) in Statgraphics oder YLAG1 in RegressIt hinterlässt). Wenn einige der Prädiktoren die Fehler der Fehler sind, ist es ein ARIMA-Modell, es ist kein lineares Regressionsmodell, denn es gibt keine Möglichkeit, 828last period8217s error8221 als unabhängige Variable anzugeben: Die Fehler müssen auf einer Periodenperiode berechnet werden Wenn das Modell an die Daten angepasst ist. Aus technischer Sicht ist das Problem bei der Verwendung von verzögerten Fehlern als Prädiktoren, dass die Vorhersagen des Modells8217 nicht lineare Funktionen der Koeffizienten sind. Obwohl sie lineare Funktionen der vergangenen Daten sind. So müssen Koeffizienten in ARIMA-Modellen, die verzögerte Fehler enthalten, durch nichtlineare Optimierungsmethoden (8220hill-climbing8221) geschätzt werden, anstatt nur ein Gleichungssystem zu lösen. Das Akronym ARIMA steht für Auto-Regressive Integrated Moving Average. Die Verzögerungen der stationärisierten Serien in der Prognosegleichung werden als quartalspezifische Begriffe bezeichnet, die Verzögerungen der Prognosefehler werden als quadratische Begrenzungsterme bezeichnet, und eine Zeitreihe, die differenziert werden muss, um stationär zu sein, wird als eine quotintegrierte Quotversion einer stationären Serie bezeichnet. Random-Walk - und Random-Trend-Modelle, autoregressive Modelle und exponentielle Glättungsmodelle sind alle Sonderfälle von ARIMA-Modellen. Ein Nicht-Seasonal-ARIMA-Modell wird als ein Quoten-Modell von quaremA (p, d, q) klassifiziert, wobei p die Anzahl der autoregressiven Terme ist, d die Anzahl der für die Stationarität benötigten Nichtseasondifferenzen und q die Anzahl der verzögerten Prognosefehler in Die Vorhersagegleichung. Die Prognosegleichung wird wie folgt aufgebaut. Zuerst bezeichne y die d-te Differenz von Y. Das bedeutet: Beachten Sie, dass die zweite Differenz von Y (der Fall d2) nicht der Unterschied von 2 Perioden ist. Vielmehr ist es der erste Unterschied zwischen dem ersten Unterschied. Welches das diskrete Analog einer zweiten Ableitung ist, d. h. die lokale Beschleunigung der Reihe und nicht deren lokaler Trend. In Bezug auf y. Die allgemeine Prognosegleichung lautet: Hier werden die gleitenden Durchschnittsparameter (9528217s) so definiert, dass ihre Zeichen in der Gleichung nach der von Box und Jenkins eingeführten Konventionen negativ sind. Einige Autoren und Software (einschließlich der R-Programmiersprache) definieren sie so, dass sie stattdessen Pluszeichen haben. Wenn tatsächliche Zahlen in die Gleichung gesteckt sind, gibt es keine Mehrdeutigkeit, aber it8217s wichtig zu wissen, welche Konvention Ihre Software verwendet, wenn Sie die Ausgabe lesen. Oft werden die Parameter dort mit AR (1), AR (2), 8230 und MA (1), MA (2), 8230 usw. bezeichnet. Um das entsprechende ARIMA-Modell für Y zu identifizieren, beginnen Sie mit der Bestimmung der Reihenfolge der Differenzierung (D) die Serie zu stationieren und die Brutto-Merkmale der Saisonalität zu entfernen, vielleicht in Verbindung mit einer abweichungsstabilisierenden Transformation wie Protokollierung oder Entleerung. Wenn Sie an dieser Stelle anhalten und vorhersagen, dass die differenzierte Serie konstant ist, haben Sie nur einen zufälligen Spaziergang oder ein zufälliges Trendmodell ausgestattet. Allerdings können die stationärisierten Serien immer noch autokorrelierte Fehler aufweisen, was darauf hindeutet, dass in der Prognosegleichung auch eine Anzahl von AR-Terme (p 8805 1) und einigen einigen MA-Terme (q 8805 1) benötigt werden. Der Prozess der Bestimmung der Werte von p, d und q, die am besten für eine gegebene Zeitreihe sind, wird in späteren Abschnitten der Noten (deren Links oben auf dieser Seite), aber eine Vorschau auf einige der Typen diskutiert werden Von nicht-seasonalen ARIMA-Modellen, die häufig angetroffen werden, ist unten angegeben. ARIMA (1,0,0) Autoregressives Modell erster Ordnung: Wenn die Serie stationär und autokorreliert ist, kann man sie vielleicht als Vielfaches ihres eigenen vorherigen Wertes und einer Konstante voraussagen. Die prognostizierte Gleichung in diesem Fall ist 8230which ist Y regressed auf sich selbst verzögerte um einen Zeitraum. Dies ist ein 8220ARIMA (1,0,0) constant8221 Modell. Wenn der Mittelwert von Y Null ist, dann wäre der konstante Term nicht enthalten. Wenn der Steigungskoeffizient 981 & sub1; positiv und kleiner als 1 in der Grße ist (er muß kleiner als 1 in der Grße sein, wenn Y stationär ist), beschreibt das Modell das Mittelwiederkehrungsverhalten, bei dem der nächste Periode8217s-Wert 981 mal als vorher vorausgesagt werden sollte Weit weg von dem Mittelwert als dieser Zeitraum8217s Wert. Wenn 981 & sub1; negativ ist, prognostiziert es ein Mittelrückkehrverhalten mit einem Wechsel von Zeichen, d. h. es sagt auch, daß Y unterhalb der mittleren nächsten Periode liegt, wenn es über dem Mittelwert dieser Periode liegt. In einem autoregressiven Modell zweiter Ordnung (ARIMA (2,0,0)) wäre auch ein Y-t-2-Term auf der rechten Seite und so weiter. Abhängig von den Zeichen und Größen der Koeffizienten könnte ein ARIMA (2,0,0) Modell ein System beschreiben, dessen mittlere Reversion in einer sinusförmig oszillierenden Weise stattfindet, wie die Bewegung einer Masse auf einer Feder, die zufälligen Schocks ausgesetzt ist . ARIMA (0,1,0) zufälliger Spaziergang: Wenn die Serie Y nicht stationär ist, ist das einfachste Modell für sie ein zufälliges Spaziergangmodell, das als Begrenzungsfall eines AR (1) - Modells betrachtet werden kann, in dem das autoregressive Koeffizient ist gleich 1, dh eine Serie mit unendlich langsamer mittlerer Reversion. Die Vorhersagegleichung für dieses Modell kann wie folgt geschrieben werden: wobei der konstante Term die mittlere Periodenänderung (dh die Langzeitdrift) in Y ist. Dieses Modell könnte als ein Nicht-Intercept-Regressionsmodell eingebaut werden, in dem die Die erste Differenz von Y ist die abhängige Variable. Da es (nur) eine nicht-seasonale Differenz und einen konstanten Term enthält, wird es als ein quotARIMA (0,1,0) Modell mit constant. quot eingestuft. Das random-walk-without - drift-Modell wäre ein ARIMA (0,1, 0) Modell ohne Konstante ARIMA (1,1,0) differenzierte Autoregressive Modell erster Ordnung: Wenn die Fehler eines zufälligen Walk-Modells autokorreliert werden, kann das Problem eventuell durch Hinzufügen einer Verzögerung der abhängigen Variablen zu der Vorhersagegleichung behoben werden - - ie Durch den Rücktritt der ersten Differenz von Y auf sich selbst um eine Periode verzögert. Dies würde die folgende Vorhersagegleichung ergeben: die umgewandelt werden kann Dies ist ein autoregressives Modell erster Ordnung mit einer Reihenfolge von Nicht-Seasonal-Differenzen und einem konstanten Term - d. h. Ein ARIMA (1,1,0) Modell. ARIMA (0,1,1) ohne konstante, einfache exponentielle Glättung: Eine weitere Strategie zur Korrektur autokorrelierter Fehler in einem zufälligen Walk-Modell wird durch das einfache exponentielle Glättungsmodell vorgeschlagen. Erinnern Sie sich, dass für einige nichtstationäre Zeitreihen (z. B. diejenigen, die geräuschvolle Schwankungen um ein langsam variierendes Mittel aufweisen), das zufällige Wandermodell nicht so gut wie ein gleitender Durchschnitt von vergangenen Werten ausführt. Mit anderen Worten, anstatt die jüngste Beobachtung als die Prognose der nächsten Beobachtung zu nehmen, ist es besser, einen Durchschnitt der letzten Beobachtungen zu verwenden, um das Rauschen herauszufiltern und das lokale Mittel genauer zu schätzen. Das einfache exponentielle Glättungsmodell verwendet einen exponentiell gewichteten gleitenden Durchschnitt von vergangenen Werten, um diesen Effekt zu erzielen. Die Vorhersagegleichung für das einfache exponentielle Glättungsmodell kann in einer Anzahl von mathematisch äquivalenten Formen geschrieben werden. Eine davon ist die so genannte 8220error Korrektur8221 Form, in der die vorherige Prognose in Richtung des Fehlers eingestellt wird, die es gemacht hat: Weil e t-1 Y t-1 - 374 t-1 per Definition, kann dies wie folgt umgeschrieben werden : Das ist eine ARIMA (0,1,1) - ohne Konstante Prognose Gleichung mit 952 1 1 - 945. Dies bedeutet, dass Sie eine einfache exponentielle Glättung passen können, indem Sie es als ARIMA (0,1,1) Modell ohne Konstant und der geschätzte MA (1) - Koeffizient entspricht 1-minus-alpha in der SES-Formel. Erinnern daran, dass im SES-Modell das Durchschnittsalter der Daten in den 1-Perioden-Prognosen 1 945 beträgt. Dies bedeutet, dass sie dazu neigen, hinter Trends oder Wendepunkten um etwa 1 945 Perioden zurückzukehren. Daraus folgt, dass das Durchschnittsalter der Daten in den 1-Periodenprognosen eines ARIMA (0,1,1) - without-constant-Modells 1 (1 - 952 1) beträgt. So, zum Beispiel, wenn 952 1 0.8, ist das Durchschnittsalter 5. Wenn 952 1 sich nähert, wird das ARIMA (0,1,1) - without-konstantes Modell zu einem sehr langfristigen gleitenden Durchschnitt und als 952 1 Nähert sich 0 wird es zu einem zufälligen Walk-ohne-Drift-Modell. Was ist der beste Weg, um Autokorrelation zu korrigieren: Hinzufügen von AR-Terme oder Hinzufügen von MA-Terme In den vorangegangenen zwei Modellen, die oben diskutiert wurden, wurde das Problem der autokorrelierten Fehler in einem zufälligen Walk-Modell auf zwei verschiedene Arten festgelegt: durch Hinzufügen eines verzögerten Wertes der differenzierten Serie Zur Gleichung oder Hinzufügen eines verzögerten Wertes des Prognosefehlers. Welcher Ansatz ist am besten Eine Faustregel für diese Situation, die später noch ausführlicher erörtert wird, ist, dass eine positive Autokorrelation in der Regel am besten durch Hinzufügen eines AR-Termes zum Modell behandelt wird und eine negative Autokorrelation wird meist am besten durch Hinzufügen eines MA Begriff. In geschäftlichen und ökonomischen Zeitreihen entsteht oftmals eine negative Autokorrelation als Artefakt der Differenzierung. (Im Allgemeinen verringert die Differenzierung die positive Autokorrelation und kann sogar einen Wechsel von positiver zu negativer Autokorrelation verursachen.) So wird das ARIMA (0,1,1) - Modell, in dem die Differenzierung von einem MA-Term begleitet wird, häufiger als ein ARIMA (1,1,0) Modell. ARIMA (0,1,1) mit konstanter, einfacher, exponentieller Glättung mit Wachstum: Durch die Implementierung des SES-Modells als ARIMA-Modell erhalten Sie gewisse Flexibilität. Zunächst darf der geschätzte MA (1) - Koeffizient negativ sein. Dies entspricht einem Glättungsfaktor größer als 1 in einem SES-Modell, was in der Regel nicht durch das SES-Modell-Anpassungsverfahren erlaubt ist. Zweitens haben Sie die Möglichkeit, einen konstanten Begriff im ARIMA-Modell einzubeziehen, wenn Sie es wünschen, um einen durchschnittlichen Trend ungleich Null abzuschätzen. Das ARIMA (0,1,1) - Modell mit Konstante hat die Vorhersagegleichung: Die Prognosen von einem Periodenvorhersage aus diesem Modell sind qualitativ ähnlich denen des SES-Modells, mit der Ausnahme, dass die Trajektorie der Langzeitprognosen typischerweise ein Schräge Linie (deren Steigung gleich mu ist) anstatt einer horizontalen Linie. ARIMA (0,2,1) oder (0,2,2) ohne konstante lineare exponentielle Glättung: Lineare exponentielle Glättungsmodelle sind ARIMA-Modelle, die zwei Nichtseason-Differenzen in Verbindung mit MA-Terme verwenden. Der zweite Unterschied einer Reihe Y ist nicht einfach der Unterschied zwischen Y und selbst, der um zwei Perioden verzögert ist, sondern vielmehr der erste Unterschied der ersten Differenz - i. e. Die Änderung der Änderung von Y in der Periode t. Somit ist die zweite Differenz von Y in der Periode t gleich (Y t - Y t - 1) - (Y t - 1 - Y t - 2) Y t - 2Y t - 1 Y t - 2. Eine zweite Differenz einer diskreten Funktion ist analog zu einer zweiten Ableitung einer stetigen Funktion: sie misst die quotaccelerationquot oder quotcurvaturequot in der Funktion zu einem gegebenen Zeitpunkt. Das ARIMA (0,2,2) - Modell ohne Konstante prognostiziert, dass die zweite Differenz der Serie gleich einer linearen Funktion der letzten beiden Prognosefehler ist: die umgeordnet werden kann: wobei 952 1 und 952 2 die MA (1) und MA (2) Koeffizienten Dies ist ein allgemeines lineares exponentielles Glättungsmodell. Im Wesentlichen das gleiche wie Holt8217s Modell, und Brown8217s Modell ist ein Sonderfall. Es verwendet exponentiell gewichtete Bewegungsdurchschnitte, um sowohl eine lokale Ebene als auch einen lokalen Trend in der Serie abzuschätzen. Die langfristigen Prognosen von diesem Modell konvergieren zu einer geraden Linie, deren Hang hängt von der durchschnittlichen Tendenz, die gegen Ende der Serie beobachtet wird. ARIMA (1,1,2) ohne konstante gedämpfte Trendlineare exponentielle Glättung. Dieses Modell wird in den beiliegenden Folien auf ARIMA-Modellen dargestellt. Es extrapoliert den lokalen Trend am Ende der Serie, aber erhebt es bei längeren Prognosehorizonten, um eine Note des Konservatismus einzuführen, eine Praxis, die empirische Unterstützung hat. Sehen Sie den Artikel auf quotWhy der Damped Trend Workquot von Gardner und McKenzie und die quotGolden Rulequot Artikel von Armstrong et al. für Details. Es ist grundsätzlich ratsam, an Modellen zu bleiben, bei denen mindestens eines von p und q nicht größer als 1 ist, dh nicht versuchen, ein Modell wie ARIMA (2,1,2) zu passen, da dies wahrscheinlich zu Überfüllung führen wird Und quotcommon-factorquot-Themen, die ausführlicher in den Anmerkungen zur mathematischen Struktur von ARIMA-Modellen diskutiert werden. Spreadsheet-Implementierung: ARIMA-Modelle wie die oben beschriebenen sind einfach in einer Tabellenkalkulation zu implementieren. Die Vorhersagegleichung ist einfach eine lineare Gleichung, die sich auf vergangene Werte der ursprünglichen Zeitreihen und vergangene Werte der Fehler bezieht. So können Sie eine ARIMA-Prognosekalkulationstabelle einrichten, indem Sie die Daten in Spalte A, die Prognoseformel in Spalte B und die Fehler (Daten minus Prognosen) in Spalte C speichern. Die Prognoseformel in einer typischen Zelle in Spalte B wäre einfach Ein linearer Ausdruck, der sich auf Werte in vorangehenden Zeilen der Spalten A und C bezieht, multipliziert mit den entsprechenden AR - oder MA-Koeffizienten, die in anderen Zellen auf der Spreadsheet gespeichert sind. Schritte bei der Auswahl eines Prognosemodells Ihr Prognosemodell sollte Merkmale enthalten, die alle wichtigen qualitativen Eigenschaften erfassen Der Daten: Muster der Veränderung in Level und Trend, Auswirkungen von Inflation und Saisonalität, Korrelationen zwischen Variablen, etc. Darüber hinaus sollten die Annahmen, die Ihrem gewählten Modell zugrunde liegen, mit Ihrer Intuition übereinstimmen, wie sich die Serie wahrscheinlich in der Zukunft verhalten wird. Bei der Anpassung eines Prognosemodells haben Sie einige der folgenden Optionen: Diese Optionen werden im Folgenden kurz beschrieben. Weitere Informationen finden Sie im dazugehörigen Prognose-Ablaufdiagramm für eine bildliche Darstellung des Modellspezifikationsprozesses und verweisen auf das Statgraphics Model Specification Panel, um zu sehen, wie die Modellmerkmale in der Software ausgewählt werden. Deflation Wenn die Serie das Inflationswachstum zeigt, dann wird die Deflation dazu beitragen, das Wachstumsmuster zu berücksichtigen und die Heterosedastizität in den Residuen zu reduzieren. Sie können entweder (i) die vergangenen Daten entleeren und die langfristigen Prognosen mit einer konstanten angenommenen Rate neu anlegen oder (ii) die vergangenen Daten durch einen Preisindex wie den CPI deflationieren und dann die langfristigen Prognosen quellenfristig neu erstellen Eine Prognose des Preisindexes. Option (i) ist am einfachsten. In Excel können Sie einfach eine Spalte von Formeln erstellen, um die ursprünglichen Werte durch die entsprechenden Faktoren zu teilen. Zum Beispiel, wenn die Daten monatlich sind und Sie mit einer Rate von 5 pro 12 Monate deflationieren möchten, würden Sie durch einen Faktor von (1.05) (k12) teilen, wobei k der Zeilenindex (Beobachtungsnummer) ist. RegressIt und Statgraphics haben integrierte Tools, die dies automatisch für Sie tun. Wenn Sie diese Route gehen, ist es in der Regel am besten, die angenommene Inflationsrate gleich Ihrer besten Schätzung der aktuellen Rate, vor allem, wenn Sie gehen zu prognostizieren mehr als eine Periode vor. Wenn Sie stattdessen Option (ii) wählen, müssen Sie zuerst die deflationierten Prognosen und Vertrauensgrenzen auf Ihre Datenkalkulationstabelle speichern, dann eine Prognose für den Preisindex erzeugen und speichern und schließlich die entsprechenden Spalten zusammen multiplizieren. (Rückkehr nach oben) Logarithmus-Transformation Wenn die Reihe das zusammengesetzte Wachstum und ein multiplikatives saisonales Muster zeigt, kann eine Logarithmus-Transformation zusätzlich zu oder lieu der Deflation hilfreich sein. Die Protokollierung der Daten wird ein inflationäres Wachstumsmuster nicht verkleinern, aber es wird es so ausrichten, dass es durch ein lineares Modell (z. B. ein zufälliges Spaziergang oder ARIMA-Modell mit konstantem Wachstum oder ein lineares exponentielles Glättungsmodell) angepasst werden kann. Auch das Protokollieren wird multiplikative saisonale Muster zu additiven Mustern umwandeln, so dass, wenn Sie saisonale Anpassung nach dem Protokollieren durchführen, sollten Sie den additiven Typ verwenden. Die Protokollierung befasst sich mit der Inflation implizit, wenn Sie wollen, dass die Inflation explizit modelliert wird - d. h. Wenn Sie möchten, dass die Inflationsrate ein sichtbarer Parameter des Modells ist oder wenn Sie Plots von deflationierten Daten anzeigen möchten, dann sollten Sie sich entleeren, anstatt sich zu loggen. Eine weitere wichtige Verwendung für die Log-Transformation ist die Linearisierung von Beziehungen zwischen Variablen in einem Regressionsmodus l. Wenn zum Beispiel die abhängige Variable eine multiplikative und nicht additive Funktion der unabhängigen Variablen ist oder wenn die Beziehung zwischen abhängigen und unabhängigen Variablen in Form von prozentualen Änderungen anstelle von absoluten Änderungen linear ist, dann eine Log-Transformation auf eine oder mehrere Variablen anwenden Kann angemessen sein, wie im Beispiel des Bierverkaufs. (Zurück zum Seitenanfang.) Saisonale Anpassung Wenn die Serie ein starkes Saisonmuster hat, von dem angenommen wird, dass sie von Jahr zu Jahr konstant ist, kann die saisonale Anpassung ein geeigneter Weg sein, um das Muster zu schätzen und zu extrapolieren. Der Vorteil der saisonalen Anpassung ist, dass es das saisonale Muster explizit modelliert und Ihnen die Möglichkeit gibt, die saisonalen Indizes und die saisonbereinigten Daten zu studieren. Der Nachteil ist, dass es die Schätzung einer großen Anzahl von zusätzlichen Parametern erfordert (insbesondere für monatliche Daten), und es stellt keine theoretische Begründung für die Berechnung von fehlerhaften Konfidenzintervallen zur Verfügung. Out-of-Sample-Validierung ist besonders wichtig, um das Risiko der Überlagerung der vergangenen Daten durch saisonale Anpassung zu reduzieren. Wenn die Daten stark saisonal sind, aber Sie nicht wählen saisonale Anpassung, die Alternativen sind entweder (i) verwenden Sie eine saisonale ARIMA-Modell. Die implizit das saisonale Muster mit saisonalen Verzögerungen und Unterschieden prognostiziert, oder (ii) das Winters saisonale exponentielle Glättungsmodell verwenden, das zeitveränderliche saisonale Indizes schätzt. (Zurück zum Seitenanfang.) QuotIndependentquot Variablen Wenn es noch andere Zeitreihen gibt, von denen man glaubt, dass sie in Bezug auf Ihre interessante Serie (zB führende Wirtschaftsindikatoren oder politische Variablen wie Preis, Werbung, Promotionen etc.) Möchte die Regression als Modelltyp betrachten. Ob Sie Regression wählen oder nicht, müssen Sie die oben genannten Möglichkeiten für die Umwandlung Ihrer Variablen (Deflation, Log, saisonale Anpassung - und vielleicht auch differenzierende) berücksichtigen, um die Zeitdimension zu nutzen und die Beziehungen zu linearisieren. Auch wenn Sie an dieser Stelle keine Regression wählen, können Sie erwähnen, Regressoren später zu einem Zeitreihenmodell (z. B. einem ARIMA-Modell) hinzuzufügen, wenn die Residuen sich mit anderen Variablen signifikanten Kreuzkorrelationen ergeben. (Zurück zum Seitenanfang) Glättung, Mittelung oder zufälliger Spaziergang Wenn Sie sich für die saisonale Anpassung der Daten entschieden haben - oder wenn die Daten nicht saisonal beginnen, dann können Sie vielleicht ein Mittelwert oder ein Glättungsmodell verwenden Passt das nicht-seasonal Muster, das in den Daten an dieser Stelle bleibt. Ein einfaches gleitendes durchschnittliches oder einfaches exponentielles Glättungsmodell berechnet lediglich einen lokalen Durchschnitt von Daten am Ende der Reihe, unter der Annahme, dass dies die beste Schätzung des aktuellen Mittelwerts ist, um den die Daten schwanken. (Diese Modelle gehen davon aus, dass der Mittelwert der Serie langsam und zufällig ohne anhaltende Trends variiert.) Eine einfache exponentielle Glättung wird normalerweise einem einfachen gleitenden Durchschnitt bevorzugt, weil ihr exponentiell gewichteter Durchschnitt eine sinnvollere Aufgabe hat, die älteren Daten zu diskontieren, weil seine Glättungsparameter (alpha) ist kontinuierlich und lässt sich leicht optimieren und weil es eine zugrundeliegende theoretische Grundlage für die Berechnung von Konfidenzintervallen hat. Wenn Glättung oder Mittelung nicht hilfreich zu sein scheint - d. h. Wenn der beste Prädiktor des nächsten Wertes der Zeitreihe einfach seinen vorherigen Wert ist - dann wird ein zufälliges Wandermodell angezeigt. Dies ist beispielsweise dann der Fall, wenn die optimale Anzahl von Terme im einfachen gleitenden Durchschnitt 1 ist oder wenn der optimale Wert von alpha in einfacher exponentieller Glättung 0,9999 beträgt. Browns lineare exponentielle Glättung kann verwendet werden, um eine Serie mit langsam zeitveränderlichen linearen Trends passen, aber vorsichtig sein, um solche Trends sehr weit in die Zukunft zu extrapolieren. (Die sich schnell wachsenden Konfidenzintervalle für dieses Modell belegen seine Ungewissheit über die ferne Zukunft.) Holts lineare Glättung schätzt auch zeitveränderliche Trends, verwendet aber separate Parameter für die Glättung von Level und Trend, was in der Regel eine bessere Anpassung an die Daten liefert Als Brown8217s Modell. Q uadratische exponentielle Glättung versucht, zeitvariable quadratische Trends abzuschätzen und sollte praktisch niemals verwendet werden. (Dies entspricht einem ARIMA-Modell mit drei Ordnungen von Nichtseason-Differenzen.) Lineare exponentielle Glättung mit einem gedämpften Trend (d. h. ein Trend, der sich in entfernten Horizonten abflacht) wird oft in Situationen empfohlen, in denen die Zukunft sehr unsicher ist. Die verschiedenen exponentiellen Glättungsmodelle sind Sonderfälle von ARIMA Modellen (siehe unten) und können mit ARIMA Software ausgestattet werden. Insbesondere ist das einfache exponentielle Glättungsmodell ein ARIMA (0,1,1) Modell, das Holt8217s lineare Glättungsmodell ist ein ARIMA (0,2,2) Modell und das gedämpfte Trendmodell ist ein ARIMA (1,1,2 ) Modell. Eine gute Zusammenfassung der Gleichungen der verschiedenen exponentiellen Glättungsmodelle finden Sie auf dieser Seite auf der SAS-Website. (Die SAS-Menüs für die Spezifizierung von Zeitreihenmodellen werden auch dort gezeigt, wie sie in den Statgraphiken ähnlich sind.) Lineare, quadratische oder exponentielle Trendlinienmodelle sind weitere Optionen für die Extrapolation einer entsetzten Serie, aber sie übertreffen selten zufällige Spaziergänge, Glättung oder ARIMA-Modelle auf Geschäftsdaten. (Zurück zum Seitenanfang) Winters Seasonal Exponential Smoothing Winters Saisonale Glättung ist eine Erweiterung der exponentiellen Glättung, die gleichzeitig zeitveränderliche Level-, Trend - und saisonale Faktoren mit rekursiven Gleichungen schätzt. (So, wenn du dieses Modell benutzt, würdest du die Daten nicht saisonal anpassen.) Die Wintersaisonfaktoren können entweder multiplikativ oder additiv sein: Normalerweise sollten Sie die multiplikative Option wählen, wenn Sie die Daten nicht angemeldet haben. Obwohl das Winters-Modell clever und vernünftig intuitiv ist, kann es schwierig sein, in der Praxis anzuwenden: Es hat drei Glättungsparameter - Alpha, Beta und Gamma - für die getrennte Glättung der Level-, Trend - und Saisonfaktoren, die geschätzt werden müssen gleichzeitig. Die Bestimmung der Startwerte für die saisonalen Indizes kann durch Anwendung der Verhältnis-zu-Verschiebung durchschnittlichen Methode der saisonalen Anpassung an Teil oder alle der Serie und oder durch Backforecasting erfolgen. Der Schätzalgorithmus, den Statgraphics für diese Parameter verwendet, scheitert manchmal nicht und liefert Werte, die bizarr aussehende Prognosen und Konfidenzintervalle geben, also würde ich bei der Verwendung dieses Modells Vorsicht walten lassen. (Zurück zum Seitenanfang.) ARIMA Wenn Sie keine saisonale Anpassung wählen (oder wenn die Daten nicht saisonal sind), können Sie das ARIMA-Modell-Framework verwenden. ARIMA-Modelle sind eine sehr allgemeine Klasse von Modellen, die zufälligen Spaziergang, zufälligen Trend, exponentielle Glättung und autoregressive Modelle als spezielle Fälle beinhaltet. Die konventionelle Weisheit ist, dass eine Serie ein guter Kandidat für ein ARIMA-Modell ist, wenn (i) es durch eine Kombination von differenzierenden und anderen mathematischen Transformationen wie Protokollierung stationiert werden kann, und (ii) Sie haben eine beträchtliche Menge an Daten zu arbeiten : Mindestens 4 volle Jahreszeiten bei saisonalen Daten. (Wenn die Serie durch Differenzierung nicht adäquat stationärisiert werden kann - zB wenn es sehr unregelmäßig ist oder ihr Verhalten im Laufe der Zeit qualitativ verändert hat - oder wenn Sie weniger als 4 Datenperioden haben, dann wäre es besser, mit einem Modell besser zu sein Das saisonale Anpassung und eine Art einfache Mittelung oder Glättung verwendet.) ARIMA Modelle haben eine spezielle Namenskonvention von Box und Jenkins eingeführt. Ein nicht-seasonales ARIMA-Modell wird als ARIMA (p, d, q) - Modell klassifiziert, wobei d die Anzahl der nicht-seasonalen Differenzen ist, p die Anzahl der autoregressiven Terme (Verzögerungen der differenzierten Reihe) und q die Anzahl der Moving - Durchschnittliche Ausdrücke (Verzögerungen der Prognosefehler) in der Vorhersagegleichung. Ein saisonales ARIMA-Modell wird als ARIMA (p, d, q) x (P, D, Q) klassifiziert. Wobei D, P und Q jeweils die Anzahl der saisonalen Unterschiede, saisonale autoregressive Begriffe (Verzögerungen der differenzierten Reihen bei Vielfachen der Saisonperiode) und saisonale gleitende Durchschnittsterme (Verzögerungen der Prognosefehler bei Vielfachen der Saison Periode). Der erste Schritt in der Anpassung eines ARIMA-Modells ist es, die richtige Reihenfolge der Differenzierung zu bestimmen, die benötigt wird, um die Serie zu stationieren und die Brutto-Features der Saisonalität zu entfernen. Dies ist gleichbedeutend mit der Bestimmung, welche Quoten-Zufalls-Spaziergang oder Zufalls-Trend-Modell den besten Ausgangspunkt bietet. Versuchen Sie nicht, mehr als 2 Gesamtaufträge von differencing (nicht saisonale und saisonale kombiniert) zu verwenden, und verwenden Sie nicht mehr als einen saisonalen Unterschied. Der zweite Schritt ist zu bestimmen, ob ein konstanter Begriff in das Modell gehören: in der Regel haben Sie einen konstanten Begriff, wenn die gesamte Reihenfolge der Differenzierung ist 1 oder weniger, sonst sind Sie nicht. In einem Modell mit einer Reihenfolge der Differenzierung stellt der konstante Begriff den durchschnittlichen Trend in den Prognosen dar. In einem Modell mit zwei Ordnungen der Differenzierung wird der Trend in den Prognosen durch den am Ende der Zeitreihe beobachteten lokalen Trend bestimmt und der konstante Term repräsentiert den Trend-in-the-Trend, dh die Krümmung der Langzeit - Langfristige prognosen Normalerweise ist es gefährlich, Trends-in-Trends zu extrapolieren, also unterdrücken Sie den dazugehörigen Begriff in diesem Fall. Der dritte Schritt besteht darin, die Anzahl der autoregressiven und gleitenden Durchschnittsparameter (p, d, q, P, D, Q) zu wählen, die benötigt werden, um jegliche Autokorrelation zu beseitigen, die in den Resten des naiven Modells verbleibt (dh jegliche Korrelation, Bloß differenzierend). Diese Zahlen bestimmen die Anzahl der Verzögerungen der differenzierten Serien und die Verzögerungen der Prognosefehler, die in der Prognosegleichung enthalten sind. Wenn es an dieser Stelle keine signifikante Autokorrelation in den Residuen gibt, dann ist das getan: das beste Modell ist ein naives Modell Wenn es eine signifikante Autokorrelation bei den Verzögerungen 1 oder 2 gibt, sollten Sie versuchen, q1 einzustellen, wenn einer der folgenden Punkte zutrifft: ( I) Es gibt einen nicht-saisonalen Unterschied im Modell, (ii) die Verzögerung 1 Autokorrelation ist negativ. Und (iii) die restliche Autokorrelationskurve ist sauberer (weniger, mehr isolierte Spikes) als die restliche partielle Autokorrelationskurve. Wenn es keinen nicht-saisonalen Unterschied in der Modell-und und die Lag 1 Autokorrelation ist positiv und und die restlichen partiellen Autokorrelation Handlung sieht sauberer, dann versuchen p1. (Manchmal sind diese Regeln für die Wahl zwischen p1 und q1 in Konflikt mit einander, in welchem ​​Fall es wahrscheinlich nicht viel Unterschied, die Sie verwenden. Versuchen Sie sie beide und vergleichen.) Wenn es Autokorrelation bei Verzögerung 2, die nicht durch die Einstellung p1 entfernt wird Oder q1, dann kannst du p2 oder q2 oder gelegentlich p1 und q1 ausprobieren. Noch seltener kann man Situationen begegnen, in denen p2 oder 3 und q1 oder umgekehrt die besten Ergebnisse liefert. Es wird sehr dringend empfohlen, dass Sie pgt1 und qgt1 nicht im selben Modell verwenden. Im Allgemeinen sollten Sie bei der Montage von ARIMA-Modellen eine zunehmende Modellkomplexität vermeiden, um nur winzige weitere Verbesserungen der Fehlerstatistiken oder das Aussehen der ACF - und PACF-Plots zu erhalten. Auch in einem Modell mit pgt1 und qgt1 gibt es eine gute Möglichkeit der Redundanz und Nicht-Eindeutigkeit zwischen den AR - und MA-Seiten des Modells, wie in den Anmerkungen zur mathematischen Struktur des ARIMA-Modells s erläutert. Es ist in der Regel besser, in einer vorwärts schrittweise statt rückwärts schrittweise Weise vorzugehen, wenn man die Modellspezifikationen anpasst: Mit einfacheren Modellen beginnen und nur noch mehr Begriffe hinzufügen, wenn es einen klaren Bedarf gibt. Die gleiche Regelung gilt für die Anzahl der saisonalen autoregressiven Begriffe (P) und die Anzahl der saisonalen gleitenden Durchschnittstermine (Q) in Bezug auf die Autokorrelation zum Saisonzeitraum (z. B. Verzögerung 12 für monatliche Daten). Versuchen Sie Q1, wenn es bereits einen saisonalen Unterschied im Modell gibt und die saisonale Autokorrelation negativ ist und die restliche Autokorrelationskurve in der Nähe der Saisonverzögerung sauberer aussieht, sonst versuchen Sie P1. (Wenn es logisch ist, dass die Serie eine starke Saisonalität aufweist, dann müssen Sie einen saisonalen Unterschied verwenden, sonst wird das saisonale Muster bei Langzeitprognosen ausblenden.) Gelegentlich können Sie P2 und Q0 oder Vice v ersa ausprobieren, Oder PQ1. Allerdings ist es sehr dringend empfohlen, dass PQ nie größer sein sollte als 2. Saisonmuster haben selten die Art von perfekter Regelmäßigkeit über eine ausreichend große Anzahl von Jahreszeiten, die es ermöglichen würde, zuverlässig zu identifizieren und zu schätzen, dass viele Parameter. Außerdem wird der Backforecasting-Algorithmus, der bei der Parameterschätzung verwendet wird, wahrscheinlich zu unzuverlässigen (oder sogar verrückten) Ergebnissen führen, wenn die Anzahl der Jahreszeiten von Daten nicht signifikant größer als PDQ ist. Ich würde nicht weniger als PDQ2 volle Jahreszeiten empfehlen, und mehr ist besser. Auch bei der Montage von ARIMA-Modellen sollten Sie darauf achten, dass die Daten nicht übertrieben werden, trotz der Tatsache, dass es eine Menge Spaß sein kann, sobald Sie den Hang davon bekommen. Wichtige Sonderfälle: Wie oben erwähnt, ist ein ARIMA (0,1,1) - Modell ohne Konstante identisch mit einem einfachen exponentiellen Glättungsmodell und nimmt einen Floating-Level an (d. h. keine mittlere Reversion), aber mit null langfristigem Trend. Ein ARIMA (0,1,1) Modell mit Konstante ist ein einfaches exponentielles Glättungsmodell mit einem linearen Trendbegriff. Ein ARIMA (0,2,1) oder (0,2,2) Modell ohne Konstante ist ein lineares exponentielles Glättungsmodell, das einen zeitveränderlichen Trend ermöglicht. An ARIMA(1,1,2) model without constant is a linear exponential smoothing model with damped trend, i. e. a trend that eventually flattens out in longer-term forecasts. The most common seasonal ARIMA models are the ARIMA(0,1,1)x(0,1,1) model without constant and the ARIMA(1,0,1)x(0,1,1) model with constant. The former of these models basically applies exponential smoothing to both the nonseasonal and seasonal components of the pattern in the data while allowing for a time-varying trend, and the latter model is somewhat similar but assumes a constant linear trend and therefore a bit more long-term predictability. You should always include these two models among your lineup of suspects when fitting data with consistent seasonal patterns. One of them (perhaps with a minor variation such increasing p or q by 1 andor setting P1 as well as Q1) is quite often the best. (Return to top of page.)GEOS 585A, Applied Time Series Analysis Phone: (520) 621-3457 Fax: (520) 621-8229 Office hours Friday, 1:00-6:00 PM (please email to schedule meeting) Course Description Analysis tools in the time and frequency domains are introduced in the context of sample time series. I use a dataset of sample time series to illustrate methods, and change the dataset each semester the course is offered. This year the sample dataset comes from an NSF project on snowpack variability in the American River Basin of California. This dataset includes tree-ring chronologies, climate indices, streamflow records, and time series of snow-water equivalent measured at snow-course stations. You will assemble your own time series for use in the course. These might be from your own research project. Back to Top of Page This is an introductory course, with emphasis on practical aspects of time series analysis. Methods are hierarchically introduced -- starting with terminology and exploratory graphics, moving to descriptive statistics, and ending with basic modeling procedures. Topics include detrending, filtering, autoregressive modeling, spectral analysis and regression. You spend the first two weeks installing Matlab on your laptop, getting a basic introduction to Matlab, and assembling your dataset of time series for the course. Twelve topics, or lessons are then covered, each allotted a week, or two class periods. Twelve class assignments go along with the topics. Assignments consist of applying methods by running pre-written Matlab scripts (programs) on your time series and interpreting the results. The course 3 credits for students on campus at the University of Arizona in Tucson, and 1 credit for online students. Any time series with a constant time increment (e. g. day, month, year) is a candidate for use in the course. Examples are daily precipitation measurements, seasonal total streamflow, summer mean air temperature, annual indices of tree growth, indices of sea-surface temperature, and the daily height increment of a shrub. As a result of taking the course, you should: understand basic time series concepts and terminology be able to select time series methods appropriate to goals be able to critically evaluate scientific literature applying the time series methods covered have improved understanding of time series properties of your own dataset be able to concisely summarize results of time series analysis in writing Prerequisites An introductory statistics course Access to a laptop computer capable of having Matlab installed on it Permission of the instructor (undergraduates and online students) Other Requirements If you are on a University of Arizona (UA) student on campus in Tucson, you have access to Matlab and required toolboxes through a UA site license as no cost software. No previous experience with Matlab is required, and computer programming is not part of the course. If you are an online, not on campus at the UA, you will be able to take the course in Spring 2017 semester as an iCourse. You must make sure that you have access to Matlab and the required toolboxes (see below) at your location. Access to the internet. There is no paper exchange in the course. Notes and assignments are exchanged electronically and completed assignments are submitted electronically through the University of Arizona Desire2Learn (D2L) system. Matlab version. I update scripts and functions now and then using the current site-license release of Matlab, and the updates might use Matlab features not available in earlier Matlab releases. For 2017, I am using Matlab Version 9.1.0.441655 (R2016b). If you are using an earlier release, make sure it is Matlab Release 2007b or higher. In addition to the main Matlab package, four toolboxes are used: Statistics, Signal Processing, System Identification, and either Spline (Matlab Release 2010a or earlier), or Curve Fitting (Matlab Release 2010b or later) Availability The course is offered in Spring Semester every other year (2015, 2017, etc.). It is open to graduate students and may also be taken by undergraduate seniors with permission of the instructor. Enrollment of resident UA students is capped at 18 for Spring Semester 2017. A small number of online students has also usually been accommodated by offering the course in various ways. The way now is the iCourse venue described above. Back to Top of Page Course Outline (Lessons) The schedule typically allows about two weeks for gathering data and becoming familiar with Matlab. Then one week (two class periods) are devoted to each of the 12 lessons or topics. Class meets on Tuesday and Thursday. A new topic is introduced on Tuesday, and is continued on the following Thursday. Thursdays class ends with an assignment and a demonstration of running the script on my sample data. The assignment is due (must be uploaded by you to D2L) before class the following Tuesday. The first 12 hour of that Tuesdays class is used for guided self-assessment and grading of the assignment and uploading of assessed (graded) assignments to D2L. The remaining 45 minutes are used to introduce the next topic. You must bring your laptop to class on Tuesdays. The 12 lessons or topics covered in the course are listed in the class outline. Online students are expected to follow the same schedule of submitting assignments as the resident students, but do not have access to the lectures. Submitted assignments of online students are not self-assessed, but are graded by me. Online students should have access to D2L for submitting assignments. Spring 2017 semester. Class meets twice a week for 75 minute sessions, 9:00-10:15 AM TTh, in room 424 (Conference Room) of Bryant Bannister Tree-Ring Building (building 45B). The first day of class is Jan 12 (Thurs). The last day of class is May 2 (Tues). There is no class during the week of Spring Break (Mar 11-19). You analyze data of your own choosing in the class assignments. As stated in the course overview. there is much flexibility in the choice of time series. I will make a catalog of suitable time series available, but it is best to focus the course on your own data set. The first assignment involves running a script that stores the data and metadata you have gathered in mat file, the native format of Matlab. Subsequent assignments draw data from the mat file for time series analysis. Assignments The 12 topics are addressed sequentially over the semester, which covers approximately 15 weeks. About the first two weeks (4-5 class meetings) are used for some introductory material, deciding on and gathering your time series, and readying Matlab on your laptop. Each week after that is devoted to one of the 12 course topics. Each assignment consists of reading a chapter of notes, running an associated Matlab script that applies selected methods of time series analysis to your data, and writing up your interpretation of the results. Assignments require understanding of the lecture topics as well as ability to use the computer and software. You submit assignments by uploading them to D2L before the Tuesday class when the next topic is introduced. The first half hour of that Tuesday class is used for guided self-assessment of the assignment, including uploading of self-graded pdfs to D2L. I check one or more of the self-graded assignments each week (by random selection), and may change the grade. To find out how to access assignments, click assignment files. Readings consist of class notes. There are twelve sets of. pdf notes files. one for each of the course topics. These. pdf files can be accessed over the Web. More information on the various topics covered in the course can be found through references listed at the end of each chapter of class notes. Grades are based entirely on performance on the assignments, each of which is worth 10 points. There are no exams. The total number of possible points for the 12 topics is 12 x 10 120. A grade of A required 90-100 percent of the possible points. A grade of B requires 80-90 percent. A grade of C requires 70-80 percent, and so forth. The grades are assigned by self-assessment guided by a rubric presented in class. The number of points earned should be marked at the top of each graded assignment. Your markup of the assignment should include annotation of any markdowns by reference to a rubric point illustrated in class (e. g. -0.5, rp3 indicates deduction of -0.5 because of an error related to rubric point 3) Assignments, given in class on Thursday, will be due (uploaded to D2L by you) before the start of class the following Tuesday. The first half hour of Tuesdays meeting period will be dedicated to presentation of a grading rubric, self-assessment of completed assignments, and uploading of self-graded assignments to D2L. This schedule gives you 4 days to complete and upload the assignment to D2L before 9:00 am Tuesday. D2L keeps track of the time the assignment was uploaded, and no penalty is assessed as long as it is uploaded before 9:00 AM on Tuesday of the due date. If you have some scheduled need to be away from class (e. g. attendance at a conference), you are responsible for uploading your assignment before 9:00 AM the Tuesday it is due, and for uploading the self-graded version by 10:15 AM the same day. In other words, the schedule is the same as for the students who are in class. If an emergency comes up (e. g. you get the flu) and cannot do the assignment or assessment on schedule, please send me an email and we will reach some accommodation. Otherwise, a penalty of 5 points (half of the total available points for the exercise) will be assessed. Introduction to time series organizing data for analysis A time series is broadly defined as any series of measurements taken at different times. Some basic descriptive categories of time series are 1) long vs short, 2) even time-step vs uneven time-step, 3) discrete vs continuous, 4) periodic vs aperiodic, 5) stationary vs nonstationary, and 6) univariate vs multivariate. These properties as well as the temporal overlap of multiple series, must be considered in selecting a dataset for analysis in this course. You will analyze your own time series in the course. The first steps are to select those series and to store them in structures in a mat file. Uniformity in storage at the outset is convenient for this class so that attention can then be focused on understanding time series methods rather debugging computer code to ready the data for analysis. A structure is a Matlab variable similar to a database in that the contents are accessed by textual field designators. A structure can store data of different forms. For example, one field might be a numeric time series matrix, another might be text describing the source of data, etc. In the first assignment you will run a Matlab script that reads your time series and metadata from ascii text files you prepare beforehand and stores the data in Matlab structures in a single mat file. In subsequent assignments you will apply time series methods to the data by running Matlab scripts and functions that load the mat file and operate on those structures. Select sample data to be use for assignments during the course Read: (1) Notes1.pdf, (2) Getting Started, accessible from the MATLAB help menu Answer: Run script geosa1.m and answer questions listed in the file in a1.pdf How to distinguish the categories of time series How to start and quit MATLAB How to enter MATLAB commands at command prompt How to create figures in figure window How to export figures to your word processor Difference between MATLAB scripts and functions How to run scripts and functions The form of a MATLAB structure variable How to apply the script geosa1.m to get a set of time series and metadata into MATLAB structures The probability distribution of a time series describes the probability that an observation falls into a specified range of values. An empirical probability distribution for a time series can be arrived at by sorting and ranking the values of the series. Quantiles and percentiles are useful statistics that can be taken directly from the empirical probability distribution. Many parametric statistical tests assume the time series is a sample from a population with a particular population probability distribution. Often the population is assumed to be normal. This chapter presents some basic definitions, statistics and plots related to the probability distribution. In addition, a test (Lilliefors test) is introduced for testing whether a sample comes from a normal distribution with unspecified mean and variance. Answer: Run script geosa2.m and answer questions listed in the file in a2.pdf Definitions of terms: time series, stationarity, probability density, distribition function, quantile, spread, location, mean, standard deviation, and skew How to interpret the most valuable graphic in time series analysis -- the time series plot How to interpret the box plot, histogram and normal probability plot Parameters and shape of the normal distribution Lilliefors test for normality: graphical description, assumptions, null and alternative hypotheses Caveat on interpretation of significance levels of statistical tests when time series not random in time How to apply geosa2.m to check the distribution properties of a time series and test the series for normality Autocorrelation refers to the correlation of a time series with its own past and future values. Autocorrelation is also sometimes called lagged correlation or serial correlation . which refers to the correlation between members of a series of numbers arranged in time. Positive autocorrelation might be considered a specific form of persistence . a tendency for a system to remain in the same state from one observation to the next. For example, the likelihood of tomorrow being rainy is greater if today is rainy than if today is dry. Geophysical time series are frequently autocorrelated because of inertia or carryover processes in the physical system. For example, the slowly evolving and moving low pressure systems in the atmosphere might impart persistence to daily rainfall. Or the slow drainage of groundwater reserves might impart correlation to successive annual flows of a river. Or stored photosynthates might impart correlation to successive annual values of tree-ring indices. Autocorrelation complicates the application of statistical tests by reducing the number of independent observations. Autocorrelation can also complicate the identification of significant covariance or correlation between time series (e. g. precipitation with a tree-ring series). Autocorrelation can be exploited for predictions: an autocorrelated time series is predictable, probabilistically, because future values depend on current and past values. Three tools for assessing the autocorrelation of a time series are (1) the time series plot, (2) the lagged scatterplot, and (3) the autocorrelation function. Answer: Run script geosa3.m and answer questions listed in the file in a3.pdf Definitions: autocorrelation, persistence, serial correlation, autocorrelation function (acf), autocovariance function (acvf), effective sample size How to recognize autocorrelation in the time series plot How to use lagged scatterplots to assess autocorrelation How to interpret the plotted acf How to adjust the sample size for autocorrelation Mathematical definition of the autocorrelation function Terms affecting the width of the computed confidence band of the acf The difference between a one-sided and two-sided test of significant lag-1 autocorrelation How to apply geos3.m to study the autocorrelation of a time series The spectrum of a time series is the distribution of variance of the series as a function of frequency. The object of spectral analysis is to estimate and study the spectrum. The spectrum contains no new information beyond that in the autocovariance function (acvf), and in fact the spectrum can be computed mathematically by transformation of the acvf. But the spectrum and acvf present the information on the variance of the time series from complementary viewpoints. The acf summarizes information in the time domain and the spectrum in the frequency domain. Answer: Run script geosa4.m and answer questions listed in the file in a4.pdf Definitions: frequency, period, wavelength, spectrum, Nyquist frequency, Fourier frequencies, bandwidth Reasons for analyzing a spectrum How to interpret a plotted spectrum in terms of distribution of variance The difference between a spectrum and a normalized spectrum Definition of the lag window as used in estimating the spectrum by the Blackman-Tukey method How the choice of lag window affects the bandwidth and variance of the estimated spectrum How to define a white noise spectrum and autoregressive spectrum How to sketch some typical spectral shapes: white noise, autoregressive, quasi-periodic, low-frequency, high-frequency How to apply geosa4.m to analyze the spectrum of a time series by the Blackman-Tukey method Autoregressive-Moving Average (ARMA)modeling Autoregressive-moving-average (ARMA) models are mathematical models of the persistence, or autocorrelation, in a time series. ARMA models are widely used in hydrology, dendrochronology, econometrics, and other fields. There are several possible reasons for fitting ARMA models to data. Modeling can contribute to understanding the physical system by revealing something about the physical process that builds persistence into the series. For example, a simple physical water-balance model consisting of terms for precipitation input, evaporation, infiltration, and groundwater storage can be shown to yield a streamflow series that follows a particular form of ARMA model. ARMA models can also be used to predict behavior of a time series from past values alone. Such a prediction can be used as a baseline to evaluate possible importance of other variables to the system. ARMA models are widely used for prediction of economic and industrial time series. ARMA models can also be used to remove persistence. In dendrochronology, for example, ARMA modeling is applied routinely to generate residual chronologies time series of ring-width index with no dependence on past values. This operation, called prewhitening, is meant to remove biologically-related persistence from the series so that the residual may be more suitable for studying the influence of climate and other outside environmental factors on tree growth. Answer: Run script geosa5.m and answer questions listed in the file in a5.pdf The functional form of the simplest AR and ARMA models Why such models are referred to as autoregressive or moving average The three steps in ARMA modeling The diagnostic patterns of the autocorrelation and partial autocorrelation functions for an AR(1) time series Definition of the final prediction error (FPE) and how the FPE is used to select a best ARMA model Definition of the Portmanteau statistic, and how it and the acf of residuals can be used to assess whether an ARMA model effectively models the persistence in a series How the principle of parsimony is applied in ARMA modeling Definition of prewhitening How prewhitening affects (1) the appearance of a time series, and (2) the spectrum of a time series How to apply geosa5.m to ARMA-model a time series Spectral analysis -- smoothed periodogram method There are many available methods for estimating the spectrum of a time series. In lesson 4 we looked at the Blackman-Tukey method, which is based on Fourier transformation of the smoothed, truncated autocovariance function. The smoothed periodogram method circumvents the transformation of the acf by direct Fourier transformation of the time series and computation of the raw periodogram, a function first introduced in the 1800s for study of time series. The raw periodogram is smoothed by applying combinations or spans of one or more filters to produce the estimated spectrum. The smoothness, resolution and variance of the spectral estimates is controlled by the choice of filters. A more accentuated smoothing of the raw periodogram produces an underlying smoothly varying spectrum, or null continuum, against which spectral peaks can be tested for significance. This approach is an alternative to the specification of a functional form of the null continuum (e. g. AR spectrum). Answer: Run script geosa6.m and answer questions listed in the file in a6.pdf Definitions: raw periodogram, Daniell filter, span of filter, null continuum smoothness, stability and resolution of spectrum tapering, padding, leakage The four main steps in estimating the spectrum by the smoothed periodogram How the effect of choice of filter spans on the smoothness, stability and resolution of the spectrum How the null continuum is used in testing for significance of spectral peaks How to apply geosa6.m to estimate the spectrum of a time series by the smoothed periodogram method and test for periodicity at a specified frequency Trend in a time series is a slow, gradual change in some property of the series over the whole interval under investigation. Trend is sometimes loosely defined as a long term change in the mean (Figure 7.1), but can also refer to change in other statistical properties. For example, tree-ring series of measured ring width frequently have a trend in variance as well as mean (Figure 7.2). In traditional time series analysis, a time series was decomposed into trend, seasonal or periodic components, and irregular fluctuations, and the various parts were studied separately. Modern analysis techniques frequently treat the series without such routine decomposition, but separate consideration of trend is still often required. Detrending is the statistical or mathematical operation of removing trend from the series. Detrending is often applied to remove a feature thought to distort or obscure the relationships of interest. In climatology, for example, a temperature trend due to urban warming might obscure a relationship between cloudiness and air temperature. Detrending is also sometimes used as a preprocessing step to prepare time series for analysis by methods that assume stationarity. Many alternative methods are available for detrending. Simple linear trend in mean can be removed by subtracting a least-squares-fit straight line. More complicated trends might require different procedures. For example, the cubic smoothing spline is commonly used in dendrochronology to fit and remove ring-width trend that might not be linear, or not even monotonically increasing or decreasing over time. In studying and removing trend, it is important to understand the effect of detrending on the spectral properties of the time series. This effect can be summarized by the frequency response of the detrending function. Answer: Run script geosa7.m and answer questions listed in the file in a7.pdf Definitions: frequency response, spline, cubic smoothing spline Pros and cons of ratio vs difference detrending Interpretation of terms in the equation for the spline parameter How to choose a spline interactively from desired frequency response How the spectrum is affected by detrending How to measure the importance of the trend component in a time series How to apply geosa7.m to interactively choose a spline detrending function and detrend a time series The estimated spectrum of a time series gives the distribution of variance as a function of frequency. Depending on the purpose of analysis, some frequencies may be of greater interest than others, and it may be helpful to reduce the amplitude of variations at other frequencies by statistically filtering them out before viewing and analyzing the series. For example, the high-frequency (year-to-year) variations in a gauged discharge record of a watershed may be relatively unimportant to water supply in a basin with large reservoirs that can store several years of mean annual runoff. Where low-frequency variations are of main interest, it is desirable to smooth the discharge record to eliminate or reduce the short-period fluctuations before using the discharge record to study the importance of climatic variations to water supply. Smoothing is a form of filtering which produces a time series in which the importance of the spectral components at high frequencies is reduced. Electrical engineers call this type of filter a low-pass filter, because the low-frequency variations are allowed to pass through the filter. In a low-pass filter, the low frequency (long-period) waves are barely affected by the smoothing. It is also possible to filter a series such that the low-frequency variations are reduced and the high-frequency variations unaffected. This type of filter is called a high-pass filter. Detrending is a form of high-pass filtering: the fitted trend line tracks the lowest frequencies, and the residuals from the trend line have had those low frequencies removed. A third type of filtering, called band-pass filtering, reduces or filters out both high and low frequencies, and leaves some intermediate frequency band relatively unaffected. In this lesson, we cover several methods of smoothing, or low-pass filtering. We have already discussed how the cubic smoothing spline might be useful for this purpose. Four other types of filters are discussed here: 1) simple moving average, 2) binomial, 3) Gaussian, and 4) windowing (Hamming method). Considerations in choosing a type of low-pass filter are the desired frequency response and the span, or width, of the filter. Answer: Run script geosa8.m and answer questions listed in the file in a8.pdf Definitions: filter, filter weights, filter span, low-pass filter, high-pass filter, band-pass filter frequency response of a filter How the Gaussian filter is related to the Gaussian distribution How to build a simple binomial filter manually (without the computer) How to describe the frequency response function in terms of a system with sinusoidal input and output How to apply geosa8.m to interactively design a Gaussian, binomial or Hamming-window lowpass filter for a time series The Pearson product-moment correlation coefficient is probably the single most widely used statistic for summarizing the relationship between two variables. Statistical significance and caveats of interpretation of the correlation coefficient as applied to time series are topics of this lesson. Under certain assumptions, the statistical significance of a correlation coefficient depends on just the sample size, defined as the number of independent observations. If time series are autocorrelated, an effective sample size, lower than the actual sample size, should be used when evaluating significance. Transient or spurious relationships can yield significant correlation for some periods and not for others. The time variation of strength of linear correlation can be examined with plots of correlation computed for a sliding window. But if many correlation coefficients are evaluated simultaneously, confidence intervals should be adjusted ( Bonferroni adjustment ) to compensate for the increased likelihood of observing some high correlations where no relationship exists. Interpretation of sliding correlations can be also be complicated by time variations of mean and variance of the series, as the sliding correlation reflects covariation in terms of standardized departures from means in the time window of interest, which may differ from the long-term means. Finally, it should be emphasized that the Pearson correlation coefficient measures strength of linear relationship. Scatterplots are useful for checking whether the relationship is linear. Answer: Run script geosa9.m and answer questions listed in the file in a9.pdf Mathematical definition of the correlation coefficient Assumptions and hypothesis for significance testing of correlation coefficient How to compute significance level of correlation coefficient and to adjust the significance level for autocorrelation in the individual time series Caveats to interpretation of correlation coefficient Bonferroni adjustment to signficance level of correlation under multiple comparisons Inflation of variance of estimated correlation coefficient when time series autocorrelated Possible effects of data transformation on correlation How to interpret plots of sliding correlations How to apply geosa9.m to analyze correlations and sliding correlations between pairs of time series Lagged relationships are characteristic of many natural physical systems. Lagged correlation refers to the correlation between two time series shifted in time relative to one another. Lagged correlation is important in studying the relationship between time series for two reasons. First, one series may have a delayed response to the other series, or perhaps a delayed response to a common stimulus that affects both series. Second, the response of one series to the other series or an outside stimulus may be smeared in time, such that a stimulus restricted to one observation elicits a response at multiple observations. For example, because of storage in reservoirs, glaciers, etc. the volume discharge of a river in one year may depend on precipitation in the several preceding years. Or because of changes in crown density and photosynthate storage, the width of a tree-ring in one year may depend on climate of several preceding years. The simple correlation coefficient between the two series properly aligned in time is inadequate to characterize the relationship in such situations. Useful functions we will examine as alternative to the simple correlation coefficient are the cross-correlation function and the impulse response function. The cross-correlation function is the correlation between the series shifted against one another as a function of number of observations of the offset. If the individual series are autocorrelated, the estimated cross-correlation function may be distorted and misleading as a measure of the lagged relationship. We will look at two approaches to clarifying the pattern of cross-correlations. One is to individually remove the persistence from, or prewhiten, the series before cross-correlation estimation. In this approach, the two series are essentially regarded on equal footing . An alternative is the systems approach: view the series as a dynamic linear system -- one series the input and the other the output -- and estimate the impulse response function. The impulse response function is the response of the output at current and future times to a hypothetical pulse of input restricted to the current time. Answer: Run script geosa10.m and answer questions listed in the file in a10.pdf Definitions: cross-covariance function, cross-correlation function, impulse response function, lagged correlation, causal, linear How autocorrelation can distort the pattern of cross-correlations and how prewhitening is used to clarify the pattern The distinction between the equal footing and systems approaches to lagged bivariate relationships Which types of situations the impulse response function (irf) is an appropriate tool How to represent the causal system treated by the irf in a flow diagram How to apply geos10.m to analyze the lagged cross-correlation structure of a a pair of time series Multiple linear regression Multiple linear regression (MLR) is a method used to model the linear relationship between a dependent variable and one or more independent variables. The dependent variable is sometimes also called the predictand, and the independent variables the predictors. MLR is based on least squares: the model is fit such that the sum-of-squares of differences of observed and predicted values is minimized. MLR is probably the most widely used method in dendroclimatology for developing models to reconstruct climate variables from tree-ring series. Typically, a climatic variable is defined as the predictand and tree-ring variables from one or more sites are defined as predictors. The model is fit to a period -- the calibration period -- for which climatic and tree-ring data overlap. In the process of fitting, or estimating, the model, statistics are computed that summarize the accuracy of the regression model for the calibration period. The performance of the model on data not used to fit the model is usually checked in some way by a process called validation. Finally, tree-ring data from before the calibration period are substituted into the prediction equation to get a reconstruction of the predictand. The reconstruction is a prediction in the sense that the regression model is applied to generate estimates of the predictand variable outside the period used to fit the data. The uncertainty in the reconstruction is summarized by confidence intervals, which can be computed by various alternative ways. Answer: Run script geosa11.m (Part 1) and answer questions listed in the file in a11.pdf The equation for the MLR model Assumptions for the MLR model Definitions of MLR statistics: coefficient of determination, sums-of-squares terms, overall-F for the regression equation, standard error of the estimate, adjusted R-squared, pool of potential predictors The steps in an analysis of residuals How to apply geosa11.m (part 1) to fit a MLR regression model to predict one variable from a set of several predictor variables Validating the regression model Regression R-squared, even if adjusted for loss of degrees of freedom due to the number of predictors in the model, can give a misleading, overly optimistic view of accuracy of prediction when the model is applied outside the calibration period. Application outside the calibration period is the rule rather than the exception in dendroclimatology. The calibration-period statistics are typically biased because the model is tuned for maximum agreement in the calibration period. Sometimes too large a pool of potential predictors is used in automated procedures to select final predictors. Another possible problem is that the calibration period itself may be anomalous in terms of the relationships between the variables: modeled relationships may hold up for some periods of time but not for others. It is advisable therefore to validate the regression model by testing the model on data not used to fit the model. Several approaches to validation are available. Among these are cross-validation and split-sample validation. In cross-validation, a series of regression models is fit, each time deleting a different observation from the calibration set and using the model to predict the predictand for the deleted observation. The merged series of predictions for deleted observations is then checked for accuracy against the observed data. In split-sample calibration, the model is fit to some portion of the data (say, the second half), and accuracy is measured on the predictions for the other half of the data. The calibration and validation periods are then exchanged and the process repeated. In any regression problem it is also important to keep in mind that modeled relationships may not be valid for periods when the predictors are outside their ranges for the calibration period: the multivariate distribution of the predictors for some observations outside the calibration period may have no analog in the calibration period. The distinction of predictions as extrapolations versus interpolations is useful in flagging such occurrences. Answer: Run script geosa11.m (Part 2) and answer questions listed in the file in a12.pdf Definitions: validation, cross-validation, split-sample validation, mean square error (MSE), root-mean-square error (RMSE) standard error of prediction, PRESS statistic, hat matrix, extrapolation vs interpolation Advantages of cross-validation over alternative validation methods How to apply geosa11.m (part 2) for cross-validated MLR modeling of the relationship between a predictand and predictors, including generation of a reconstruction and confidence bands Downloading Files -- tsfiles. zip The Matlab class scripts and user-written functions are zipped in a file called tsfiles. zip. To get the files, first create an empty directory on your computer. This is where you will store all functions, scripts and data used in the course. Go to D2L, or click on tsfiles. zip to download the zip file to that directory and unzip it there. When you run matlab, be sure that directory is your current matlab working directory. Powerpoint lecture outlines miscellaneous files. Downloadable file other. zip has miscellaneous files used in lectures. Included are Matlab demo scripts, sample data files, user-written functions used by demo scripts, and powerpoint presentations, as pdfs (lect1a. pdf, lect1b. pdf, etc.) used in on-campus lectures. I update other. zip over the semester, and add the presentation for the current lecture within a couple of days after that lecture is given. To run the Matlab scripts for the assignments, you must have your data, the class scripts, and the user-written Matlab functions called by the scripts in a single directory on your computer. The name of this directory is unimportant. Under Windows, it might be something like C:geos585a. The functions and scripts provided for the course should not require any tailoring, but some changes can be made for convenience. For example, scripts and functions will typically prompt you for the name of your input data file and present Spring17 as the default. That is because Ive stored the sample data in Spring17.mat. If you want to avoid having to type over Spring17 with the name of your own data file each time you run the script, edit the matlab script with the Matlab editordebugger to change one line. In the editor, search for the string Spring17 and replace it with the name of your. mat storage file (e. g. Smith2017), then be sure to re-save the edited script.

No comments:

Post a Comment