Statistics Homework #4

Similar documents
Statistics 910, #15 1. Kalman Filter

Problem Set 1 Solution Sketches Time Series Analysis Spring 2010

X t = a t + r t, (7.1)

State-space Model. Eduardo Rossi University of Pavia. November Rossi State-space Model Financial Econometrics / 49

Statistics 910, #5 1. Regression Methods

Problem Set 2 Solution Sketches Time Series Analysis Spring 2010

Chapter 4: Models for Stationary Time Series

MAT3379 (Winter 2016)

The Box-Cox Transformation and ARIMA Model Fitting

STAT 443 Final Exam Review. 1 Basic Definitions. 2 Statistical Tests. L A TEXer: W. Kong

Kalman Filtering. Namrata Vaswani. March 29, Kalman Filter as a causal MMSE estimator

ECE531 Lecture 11: Dynamic Parameter Estimation: Kalman-Bucy Filter

State-space Model. Eduardo Rossi University of Pavia. November Rossi State-space Model Fin. Econometrics / 53

Time Series I Time Domain Methods

MID-TERM EXAM ANSWERS. p t + δ t = Rp t 1 + η t (1.1)

CS281 Section 4: Factor Analysis and PCA

Lecture 16: State Space Model and Kalman Filter Bus 41910, Time Series Analysis, Mr. R. Tsay

The Kalman Filter ImPr Talk

Stochastic Modelling Solutions to Exercises on Time Series

Exercises - Time series analysis

Chapter 12 - Lecture 2 Inferences about regression coefficient

TMA4285 December 2015 Time series models, solution.

Time Series Solutions HT 2009

Open Economy Macroeconomics: Theory, methods and applications

Lecture Notes 4 Vector Detection and Estimation. Vector Detection Reconstruction Problem Detection for Vector AGN Channel

Study Sheet. December 10, The course PDF has been updated (6/11). Read the new one.

Covariance and Correlation

1 Introduction to Generalized Least Squares

University of Oxford. Statistical Methods Autocorrelation. Identification and Estimation

Advanced Econometrics

4 Derivations of the Discrete-Time Kalman Filter

STA 6857 ARIMA and SARIMA Models ( 3.8 and 3.9)

Econ 2120: Section 2

Classic Time Series Analysis

Stat 248 Lab 2: Stationarity, More EDA, Basic TS Models

STA 6857 ARIMA and SARIMA Models ( 3.8 and 3.9) Outline. Return Rate. US Gross National Product

Data assimilation with and without a model

Elements of Multivariate Time Series Analysis

Time Series 2. Robert Almgren. Sept. 21, 2009

ECONOMETRIC METHODS II: TIME SERIES LECTURE NOTES ON THE KALMAN FILTER. The Kalman Filter. We will be concerned with state space systems of the form

Orthogonality. Orthonormal Bases, Orthogonal Matrices. Orthogonality

Lecture 4: Least Squares (LS) Estimation

Linear models. Rasmus Waagepetersen Department of Mathematics Aalborg University Denmark. October 5, 2016

Ch 4. Models For Stationary Time Series. Time Series Analysis

The Multivariate Gaussian Distribution [DRAFT]

STA 6857 Autocorrelation and Cross-Correlation & Stationary Time Series ( 1.4, 1.5)

Least Squares Estimation Namrata Vaswani,

Random vectors X 1 X 2. Recall that a random vector X = is made up of, say, k. X k. random variables.

Association studies and regression

Economics 240A, Section 3: Short and Long Regression (Ch. 17) and the Multivariate Normal Distribution (Ch. 18)

Ch 5. Models for Nonstationary Time Series. Time Series Analysis

CS Homework 3. October 15, 2009

Vector Spaces, Orthogonality, and Linear Least Squares

Marcel Dettling. Applied Time Series Analysis SS 2013 Week 05. ETH Zürich, March 18, Institute for Data Analysis and Process Design

Corner. Corners are the intersections of two edges of sufficiently different orientations.

Levinson Durbin Recursions: I

The Kalman Filter. An Algorithm for Dealing with Uncertainty. Steven Janke. May Steven Janke (Seminar) The Kalman Filter May / 29

ESTIMATION THEORY. Chapter Estimation of Random Variables

REPEATED MEASURES. Copyright c 2012 (Iowa State University) Statistics / 29

Problem Set - Instrumental Variables

Reliability and Risk Analysis. Time Series, Types of Trend Functions and Estimates of Trends

Lecture 13: Simple Linear Regression in Matrix Format. 1 Expectations and Variances with Vectors and Matrices

ECE Homework Set 3

2.1 Linear regression with matrices

Lecture 16 - Correlation and Regression

ECO 513 Fall 2008 C.Sims KALMAN FILTER. s t = As t 1 + ε t Measurement equation : y t = Hs t + ν t. u t = r t. u 0 0 t 1 + y t = [ H I ] u t.

ESSE 4020 / ESS 5020 Time Series and Spectral Analysis Notes 6 26 November 2018 State Space Models

Circle the single best answer for each multiple choice question. Your choice should be made clearly.

Errata and Updates for ASM Exam MAS-I (First Edition) Sorted by Date

Errata and Updates for ASM Exam MAS-I (First Edition) Sorted by Page

Next tool is Partial ACF; mathematical tools first. The Multivariate Normal Distribution. e z2 /2. f Z (z) = 1 2π. e z2 i /2

Linear Dimensionality Reduction

TIME SERIES ANALYSIS. Forecasting and Control. Wiley. Fifth Edition GWILYM M. JENKINS GEORGE E. P. BOX GREGORY C. REINSEL GRETA M.

Characteristics of Time Series

MEI Exam Review. June 7, 2002

Regression Analysis. Ordinary Least Squares. The Linear Model

11. Further Issues in Using OLS with TS Data

ECE 450 Homework #3. 1. Given the joint density function f XY (x,y) = 0.5 1<x<2, 2<y< <x<4, 2<y<3 0 else

Chapter 2: simple regression model

Multivariate Time Series

STAT 248: EDA & Stationarity Handout 3

ITSM-R Reference Manual

Analysis II: The Implicit and Inverse Function Theorems

SOME BASICS OF TIME-SERIES ANALYSIS

Online tests of Kalman filter consistency

Lecture 13: Simple Linear Regression in Matrix Format

Homework 4. 1 Data analysis problems

Lecture 2: ARMA(p,q) models (part 2)

If we want to analyze experimental or simulated data we might encounter the following tasks:

Final Exam. Economics 835: Econometrics. Fall 2010

Specification Errors, Measurement Errors, Confounding

Basics: Definitions and Notation. Stationarity. A More Formal Definition

Univariate ARIMA Models

X random; interested in impact of X on Y. Time series analogue of regression.

Variance reduction. Michel Bierlaire. Transport and Mobility Laboratory. Variance reduction p. 1/18

Next is material on matrix rank. Please see the handout

Exam 2. Jeremy Morris. March 23, 2006

Lie Groups for 2D and 3D Transformations

Chapter 12: An introduction to Time Series Analysis. Chapter 12: An introduction to Time Series Analysis

UCSD ECE153 Handout #30 Prof. Young-Han Kim Thursday, May 15, Homework Set #6 Due: Thursday, May 22, 2011

Transcription:

Statistics 910 1 Homework #4 Chapter 6, Shumway and Stoffer These are outlines of the solutions. If you would like to fill in other details, please come see me during office hours. 6.1 State-space representation of AR(1) plus noise (a) The equations are almost in state-space form as given; you just have to watch the time lag in the state equation. As noted in class, there are many ways to represent the process as a state-space model. This form is probably the simplest: ( ) ( ) ( ) ( ) xt 0 0.9 xt 1 wt +. 1 0 0 x t 1 The observation equation is then y t (1, 0)x t + v t. (That is, H (1, 0).) (b) Since the elements of the state vector are observations of the AR(2) process, set σ0 2 σ2 1 Var(x t ). Since the process is stationary with just one coefficient, we can solve this one as in an AR(1) model, obtaining Var(x t ) σw/(1 2 0.9 2 ). (c) and (d) The simulation is as done in the class notes for the Kalman filter: generate the specified AR(2) model and add independent noise. The PACF shows much less of the cut-off characteristic AR(2) signature when hidden in more noise. The higher noise level obscures the dependence when most of the variance is associated with the white noise errors. 6.2 Innovations in AR(1) plus noise The innovations are uncorrelated; these are the residuals of projecting Y t on the prior observations Y t 1, Y t 2,.... Notice that for any random variables X and Y that E (X(Y E (Y X))) E x E y x (Y E (Y X)) E x XE (Y E (Y X)) 0 Hence, for any s < t, with Y Y t and X (Y 1,..., Y t 1 ) and ɛ t y t E (y t y 1,..., y t 1 ) that E (ɛ s ɛ t ) 0. If s t, then the variance of the innovations is the term seen in expressions for the gain: Var(ɛ t ) Var(H x t + v t ) HP t t 1 H + σv 2 P t t 1 + σv 2 since H 1 in that example. 6.3 Simulation of AR(1) plus noise, with error bands This is a nice style for plots that show a sequence of estimates of the unknown state. 6.5 Projection theorem derivation of Kalman smoother x t 2

Statistics 910 2 The exercise uses H t for what we called the gain K t. I will use the notation from class in this answer, and call their H by A. The space L k sp{y 1,..., y k } sp{ỹ 1,..., ỹ k } where ỹ t are the innovations. I ve used the following expressions for the state and observation equations, as in the class notes (Lecture 15): State: x t F x t 1 + v t (1) Observation: y t H x t + w t (2) I ll also drop the t subscripts from F and H. (a) The matrix A k+1 is the regression coefficient of x k on the innovation ỹ k+1 y k+1 ŷ k+1 k, A k+1 Cov(x k, ỹ k+1 ) Var(ỹ k+1 ) 1 Cov(x k, w k+1 + Hx k+1 H ˆx k+1 k ) Var(ỹ k+1 ) 1 Cov(x k, H(F x k + v k+1 ) HF ˆx k k ) Var(ỹ k+1 ) 1 Cov( x k + ˆx k k, H(F x k + v k+1 ) HF ˆx k k ) Var(ỹ k+1 ) 1 P k k F H (HP k+1 k H + R) 1 where x k x k ˆx k k which is hence orthogonal to the innovations ỹ j, j k, k 1,... (b) Equating the two expressions given in the exercise means that we must show that A k+1 JK k+1. Postmultipling both by Var(ỹ k+1 ) leaves the expression P k kf H JP k+1 k H. For this to hold for all H implies that J P k k F P 1 k+1 k. (c) As in part (a) we again need a regression coefficient. Solving for A k+2 follows the same script as in (a); A k+2 is the regression coefficient of x k on the innovation y k+2 ŷ k+2 k+1. It is useful to recognize that the gain K t times the innovation gives the update to the estimate of the state, K t (y t ŷ t t 1 ) ˆx t t ˆx t t 1 Patiently back-substiting from the definition of the filter and innovations gives A k+2 Cov(x k, ỹ k+2 ) Var(ỹ k+2 ) 1 Cov(x k, w k+2 + H(x k+2 ˆx k+2 k+1 ) Var(ỹ k+2 ) 1 Cov(x k, F x k+1 + v k+2 F ˆx k+1 k+1 )H Var(ỹ k+2 ) 1 Cov(x k, x k+1 ˆx k+1 k K k+1 ỹ k+1 )F H Var(ỹ k+2 ) 1 Cov(x k, x k+1 ˆx k+1 k K k+1 (w k+1 + H(x k+1 ˆx k+1 k ))F H Var(ỹ k+2 ) 1 Cov(x k, (I K k+1 H)(x k+1 ˆx k+1 k ))F H Var(ỹ k+2 ) 1 Cov(x k, v k+1 + F (x k ˆx k k ))(I KH) F H Var(ỹ k+2 ) 1

Statistics 910 3 Cov( x k k, x k k )F (I KH) F H Var(ỹ k+2 ) 1 P k k F (I KH) F H Var(ỹ k+2 ) 1 The two expressions in the exercise are the same if J(ˆx k+1 k+2 ˆx k+1 k ) J(ˆx k+1 k+1 ˆx k+1 k ) J(ˆx k+1 k+2 ˆx k+1 k+1 ) A k+2 ỹ k+2 This must hold for all innovations ỹ k+2, implying that JP k+1 k+1 F H Var(ỹ k+2 ) 1 A k+2 and hence that JP k+1 k+1 F H P k k F (I KH) F H Again arguing that this must hold for all H and F we get JP k+1 k+1 P k k F (I KH). Now substitute for J from part (b), and we need to show that Multiply by P 1 k k Now multipy by P k+1 k to obtain P k k F (P k+1 k ) 1 P k+1 k+1 P k k F (I KH) and again drop the common F gives (P k+1 k ) 1 P k+1 k+1 (I KH) P k+1 k+1 P k+1 k (I KH) Since the covariance matrices are symmetric, it holds that P k+1 k+1 (I KH)P k+1 k This is the update equation for P k k. (d) To prove the claim by induction, the initial n 1 statement is shown in part (a). The induction step requires that one mimic the argument used above. That is, given that ˆx k k+m ˆx k k + J k (ˆx k+1 k+m ˆx k+1 k ) then show that ˆx k k+m+1 ˆx k k + J k (ˆx k+1 k+m+1 ˆx k+1 k ) Part (c) shows this in the special case with m 1. The general case works similarly. Just keep careful track of the indices.

Statistics 910 4 6.6 Random walk plus noise fit to glacial varve (a) To show that y t is IMA(1,1), show that the differences z t y t y t 1 have the covariances of a first order moving average. Direct substitution shows that z t w t + (v t v t 1 ) so that γ z (0) Varz t σw 2 + 2σv, 2 γ z (1) σv, 2 and γ z (h) 0 for h 2, 3,.... The resulting first correlation is ρ(1) σv/(σ 2 w 2 + 2σv) 2 < 1 2. (b) Compared to the results in Example 3.31 (or 3.32 in 3rd ed), you can fit an IMA using the ARIMA estimation routine. To use the Kalman filter for the estimation, follow a script like those we used in the examples with R in class. Roughly the estimates should be similar to σ w 0.11 and ˆσ v 0.425. Together these give ˆρ(1) 0.48 and ˆθ 0.77. Here s some R code you can use... y <- log(varve) n <- length(y) mu0 <- y[1]; sigma0 <- var(y[1:10]) # rough starting values # function to pass to optimizer like <- function(para){ cq <- para[1]; cr <- para[2]; kf <- Kfilter0(n, y, 1, mu0, sigma0, 1, cq, cr) kf$like } init.par <- c(.1,.1) est <- optim(init.par, like, NULL, method BFGS, hessiantrue, controllist(trace1,report1))) se <- sqrt(diag(solve(est$hessian))) # Summary of estimation c(sig.west$par[1], sig.vest$par[2]) 6.13 Missing data The role of the observation equation in this example is solely to handle the missing data. The example also requires that the observation matrix H and variance matrix R have time subscripts (H t, R t ). (It s a little odd discussing x n 0 since we set x 0 0, but it does show you how the smoothing filter reverses the data. It would have made more sense I think to set A 1 0 and go from there as if the first observation were missing.) Perhaps the easiest way to answer this question is to argue that the KF is just a way to compute estimates E (x t y t ) from processes with a given covariance formula, in this case AR(1).

Statistics 910 5 From this point of view, the best prediction of x 0 uses the reverse regression, obtaining φx 1 φy 1 with error variance σ 2 w. For the interpolation problem, the Markovian nature of the process gives E (x m y 1,..., y m 1 ) φy m 1 and E (x m y m+1,..., y n ) φy m+1 Since the spaces are not orthogonal, however, we cannot partition the expected value E (x m y t m ) as the sum of these. So, we have to do the projection simultaneously, E (x m y t m ) E (x m y m 1, y m+1 ) This is regression with coefficients (see the regression summary in 6.4) ( ) 1 ( ) ( ) 1 ( ) ( γ0 γ 2 γ1 1 φ 2 φ φ/(1 + φ 2 ) γ 2 γ 0 γ 1 φ 2 1 φ φ/(1 + φ 2 ) ). You need to remember how to invert a 2x2 matrix for this! To get the variance, use the regression expression for the conditional variance of one normal r.v. given another. Some remarkable cancellation happens: Var(Y X) Var(Y ( ) β Cov(X, Y ) 1 σw 2 1 φ 2 φ ) 2φ 1 + φ 2 1 φ 2 σw 2 1 + φ 2.