Statistical Inference and Methods

Similar documents
Statistics 262: Intermediate Biostatistics Non-parametric Survival Analysis

Multistate Modeling and Applications

Sequential Monte Carlo Methods for Bayesian Computation

Probabilistic Graphical Models

Lecture 5 Models and methods for recurrent event data

PATTERN RECOGNITION AND MACHINE LEARNING CHAPTER 13: SEQUENTIAL DATA

Lecture 2: From Linear Regression to Kalman Filter and Beyond

Estimation for Modified Data

Introduction to Smoothing spline ANOVA models (metamodelling)

Online appendix to On the stability of the excess sensitivity of aggregate consumption growth in the US

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.

Survival Analysis Math 434 Fall 2011

Default Priors and Effcient Posterior Computation in Bayesian

Computer Intensive Methods in Mathematical Statistics

Markov Chain Monte Carlo Methods for Stochastic Optimization

Particle Filtering Approaches for Dynamic Stochastic Optimization

Research Division Federal Reserve Bank of St. Louis Working Paper Series

Markov Chain Monte Carlo Methods for Stochastic

Markov Chain Monte Carlo methods

Lecture 2: From Linear Regression to Kalman Filter and Beyond

Sequential Bayesian Updating

Lecture 6: Bayesian Inference in SDE Models

F denotes cumulative density. denotes probability density function; (.)

ECE276A: Sensing & Estimation in Robotics Lecture 10: Gaussian Mixture and Particle Filtering

ST745: Survival Analysis: Nonparametric methods

Dynamic System Identification using HDMR-Bayesian Technique

Other Survival Models. (1) Non-PH models. We briefly discussed the non-proportional hazards (non-ph) model

Lecture 3. Truncation, length-bias and prevalence sampling

Step-Stress Models and Associated Inference

Nonlinear and/or Non-normal Filtering. Jesús Fernández-Villaverde University of Pennsylvania

Cox s proportional hazards model and Cox s partial likelihood

Switching Regime Estimation

Survival Analysis. Stat 526. April 13, 2018

MAS3301 / MAS8311 Biostatistics Part II: Survival

PENALIZED LIKELIHOOD PARAMETER ESTIMATION FOR ADDITIVE HAZARD MODELS WITH INTERVAL CENSORED DATA

Latent Variable Models for Binary Data. Suppose that for a given vector of explanatory variables x, the latent

Sequential Monte Carlo and Particle Filtering. Frank Wood Gatsby, November 2007

Towards a Bayesian model for Cyber Security

CTDL-Positive Stable Frailty Model

Bayesian Inference. Chapter 4: Regression and Hierarchical Models

Statistics & Data Sciences: First Year Prelim Exam May 2018

Particle Filters. Outline

Exercises. (a) Prove that m(t) =

Lecture 8: Bayesian Estimation of Parameters in State Space Models

Basic math for biology

Sensor Tasking and Control

STAT 518 Intro Student Presentation

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

Generalized Autoregressive Score Models

4 Testing Hypotheses. 4.1 Tests in the regression setting. 4.2 Non-parametric testing of survival between groups

Generalized Autoregressive Score Smoothers

Gaussian Process Approximations of Stochastic Differential Equations

Approximate Bayesian Computation and Particle Filters

You know I m not goin diss you on the internet Cause my mama taught me better than that I m a survivor (What?) I m not goin give up (What?

TAKEHOME FINAL EXAM e iω e 2iω e iω e 2iω

Bivariate Degradation Modeling Based on Gamma Process

Cox regression: Estimation

Basic Sampling Methods

[Part 2] Model Development for the Prediction of Survival Times using Longitudinal Measurements

Bayesian Inference. Chapter 4: Regression and Hierarchical Models

CIMAT Taller de Modelos de Capture y Recaptura Known Fate Survival Analysis

L09. PARTICLE FILTERING. NA568 Mobile Robotics: Methods & Algorithms

STA 216, GLM, Lecture 16. October 29, 2007

STA 4273H: Statistical Machine Learning

Survival Analysis for Case-Cohort Studies

Bayesian linear regression

Analysing geoadditive regression data: a mixed model approach

Machine Learning for OR & FE

Review. DS GA 1002 Statistical and Mathematical Models. Carlos Fernandez-Granda

STAT331. Cox s Proportional Hazards Model

The Unscented Particle Filter

Bayesian Dynamic Linear Modelling for. Complex Computer Models

Nonparametric Bayesian Methods (Gaussian Processes)

Lecture 6: Multiple Model Filtering, Particle Filtering and Other Approximations

Particle Filtering for Data-Driven Simulation and Optimization

Density Estimation. Seungjin Choi

Bayesian Inference on Joint Mixture Models for Survival-Longitudinal Data with Multiple Features. Yangxin Huang

Bayesian Inference in GLMs. Frequentists typically base inferences on MLEs, asymptotic confidence

Survival Regression Models

In contrast, parametric techniques (fitting exponential or Weibull, for example) are more focussed, can handle general covariates, but require

Modeling conditional distributions with mixture models: Theory and Inference

Linear Dynamical Systems

STA 294: Stochastic Processes & Bayesian Nonparametrics

Introduction to Machine Learning

Lecture 4: Dynamic models

Inferring biological dynamics Iterated filtering (IF)

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

TMA 4275 Lifetime Analysis June 2004 Solution

Introduction to BGPhazard

Bayesian Regression Linear and Logistic Regression

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

Econometric Analysis of Cross Section and Panel Data

Multivariate Survival Analysis

Introduction to Reliability Theory (part 2)

ABC methods for phase-type distributions with applications in insurance risk problems

Evaluating the value of structural heath monitoring with longitudinal performance indicators and hazard functions using Bayesian dynamic predictions

The Kalman Filter ImPr Talk

Sensor Fusion: Particle Filter

Content.

Multi-state Models: An Overview

Transcription:

Department of Mathematics Imperial College London d.stephens@imperial.ac.uk http://stats.ma.ic.ac.uk/ das01/ 31st January 2006

Part VI Session 6: Filtering and Time to Event Data

Session 6: Filtering and 1/ 85 Filtering State-space Models Kalman Filter Non-linear/Non-Gaussian Filtering Particle Filters Discrete & Continuous Time Models Non-parametric analysis Kaplan-Meier plots Proportional Hazards/Accelerated Life Multivariate Reliability & Competing Risks Multi-State Models

State-Space Models Kalman Filter MCMC General State-Space Models Session 6: State-space Models & Filtering 2/ 85 State-Space Models The state-space form of time series models has received considerable attention, as they can better represent the actual dynamics of a data generation process. Let y t denote the observation from a (possibly multivariate) time series at time t, related to a vector α t, called the state vector, which is possibly unobserved and whose dimension, m say, is independent of the dimension, n, of y t.

State-Space Models Kalman Filter MCMC General State-Space Models Session 6: State-space Models & Filtering 3/ 85 The general form of a linear state-space model, is given by the following two equations y t = Z t α t + d t + G t ε t, t = 1,..., T (1a) α t+1 = T t α t + c t + H t ε t. (1b) Equation (1a) is the observation or measurement equation, while (1b) is transition equation.

State-Space Models Kalman Filter MCMC General State-Space Models Session 6: State-space Models & Filtering 4/ 85 In (1) Z t is an (n m) matrix, d t is an (n 1) vector, G t an (n (n + m)) matrix, T t is (m m), c t is (m 1) and H t is an (m (n + m)) matrix. All of the latter matrices are referred to as the system matrices and are assumed to be non-stochastic.

State-Space Models Kalman Filter MCMC General State-Space Models Session 6: State-space Models & Filtering 5/ 85 Process ε t is an ((n + m) 1) vector of serially independent, identically distributed disturbances with E (ε t ) = 0 and Var (ε t ) = I, the identity matrix. The formulation is completed by the assumption that the initial state vector α 1 is independent of ε t at all times t and has unconditional mean and variance a 1 0 and P 1 0 respectively.

State-Space Models Kalman Filter MCMC General State-Space Models Session 6: State-space Models & Filtering 6/ 85 The state-space model is characterized by the properties that the system matrices, the disturbance terms ε t and initial state vector α 1 possess. If the system matrices do not evolve with time, the state-space model is called time-invariant or time-homogeneous. If the disturbances, ε t, and initial state vector, α 1, are assumed to have a normal distribution, then the model is termed Gaussian. Finally, it should be noted that if G t H t = 0 for all t, then the measurement and transition equations are uncorrelated.

State-Space Models Kalman Filter MCMC General State-Space Models Session 6: State-space Models & Filtering 7/ 85 Example AR(2) Model Let {X t } be a zero-mean, Gaussian AR(2) process given by X t+1 = φ 1 X t + φ 2 X t 1 + u 2t where u 2t NID ( 0, σ 2 2). Suppose also that we observe the process with noise, so that Y t = X t + u 1t with u 1t NID ( 0, σ 2 1) and independent of u2t.

State-Space Models Kalman Filter MCMC General State-Space Models Session 6: State-space Models & Filtering 8/ 85 Example A state-space representation of this model can be formed as follows Y t = [ 1 0 ] [ ] X t + [ σ 2 1 0 ] [ ] ε 1t [ Xt+1 X t ] = [ φ1 φ 2 1 0 X t 1 ] [ Xt X t 1 ] + [ 0 σ 2 2 0 0 ε 2t ] [ ε1t where ε t = (ε 1t, ε 2t ) is NID (0, I). Clearly the latter state-space model is time-homogeneous and Gaussian and the measurement and transition equations are uncorrelated. ε 2t ]

State-Space Models Kalman Filter MCMC General State-Space Models Session 6: State-space Models & Filtering 9/ 85 Kalman Filter The Kalman filter is used for prediction, filtering and smoothing. In particular, if we let Ψ t denote the information set up to time t, i.e. Ψ t = {y 1,..., y t }, then the problem of prediction is to compute E (α t+1 Ψ t ). Filtering is concerned with calculating E (α t Ψ t ), while (fixed-interval) smoothing is concerned with estimating E (α t Ψ T ), for all t < T. The Kalman filter consists of a set of simple recursions that compute the latter quantities.

State-Space Models Kalman Filter MCMC General State-Space Models Session 6: State-space Models & Filtering 10/ 85 Linear Gaussian State-Space Model : Assume that G t H t = 0 Moreover, we drop the (exogenous) terms d t and c t from the observation and transition equations for simplicity and write G t G t = Σ t and H t H t = Ω t.

State-Space Models Kalman Filter MCMC General State-Space Models Session 6: State-space Models & Filtering 11/ 85 The Kalman filter recursively computes the quantities a t t = E (α t Ψ t ), a t+1 t = E (α t+1 Ψ t ), P t t = MSE (α t Ψ t 1 ), P t+1 t = MSE (α t+1 Ψ t ). where MSE is the mean-square error or one-step ahead prediction variance.

State-Space Models Kalman Filter MCMC General State-Space Models Session 6: State-space Models & Filtering 12/ 85 Then, starting with a 1 0 and P 1 0, a t t, a t+1 t and their MSEs are obtained by running for t = 1,..., T, the recursions v t = y t Z t a t t 1, F t = Z t P t t 1 Z t + Σ t (2a) a t t = a t t 1 + P t t 1 Z tf 1 t v t, (2b) P t t = P t t 1 P t t 1 Z tf t 1 Z t P t t 1, (2c) a t+1 t = T t a t t, (2d) P t+1 t = T t P t t T t + Ω t. (2e)

State-Space Models Kalman Filter MCMC General State-Space Models Session 6: State-space Models & Filtering 13/ 85 Notes: quantities v t and F t in (2a) respectively denote the one-step-ahead error in forecasting y t conditional on the information set at time t 1 and its MSE. This facilitates computation of the likelihood function. the quantities a t t and a t t 1 are optimal estimators of α t conditional on the available information, in terms of minimum mean square. the latter property holds under Gaussianity; if this is not assumed, a t t and a t t 1 are optimal only within the class of linear estimators, that is, they are the minimum mean square linear estimators of α t conditional on Ψ t and Ψ t 1.

State-Space Models Kalman Filter MCMC General State-Space Models Session 6: State-space Models & Filtering 14/ 85 Finally, equations (2b) and (2d ) can be combined together to yield recursions that only compute the one-step-ahead prediction estimates of α t+1 given Ψ t. Similarly, by taking together (2c) and (2e), a single set of recursions for the MSE is obtained, which goes directly from P t t 1 to P t+1 t.

State-Space Models Kalman Filter MCMC General State-Space Models Session 6: State-space Models & Filtering 15/ 85 The resulting recursions, along with (2a), for t = 1,..., T 1, are as follows: a t+1 t = T t a t t 1 + K t v t (3a) K t = T t P t t 1 Z tf t 1 (3b) P t+1 t = T t P t+1 t L t + Ω t (3c) L t = T t K t Z t. (3d)

State-Space Models Kalman Filter MCMC General State-Space Models Session 6: State-space Models & Filtering 16/ 85 Parameter Estimation Another application of the Kalman filter is the estimation of any unknown parameters θ that appear in the system matrices. The likelihood for data y = (y 1,..., y T ) can be constructed as p (y 1,..., y T ) = p (y T Ψ T 1 ) p (y 2 Ψ 1 ) p (y 1 ) = T p (y t Ψ t 1 ). t=1

State-Space Models Kalman Filter MCMC General State-Space Models Session 6: State-space Models & Filtering 17/ 85 Assuming that the state-space model is Gaussian, by taking conditional expectations on both sides of the observation equation, with d t 0, we deduce that for t = 1,..., T, E (y t Ψ t 1 ) = Z t a t t 1, Var (y t Ψ t 1 ) = F t. Crucially, the one-step-ahead prediction density p (y t Ψ t 1 ) is the density of a multivariate normal random variable with mean Z t a t t 1 and covariance matrix F t.

State-Space Models Kalman Filter MCMC General State-Space Models Session 6: State-space Models & Filtering 18/ 85 Thus, the log-likelihood function is given by log L = nt 2 log (2π) 1 2 where T log (det F t ) 1 2 t=1 v t = ( y t Z t a t t 1 ) T t=1 v tf 1 t v t. Typically, numerical procedures are used in order to maximize the log-likelihood to obtain the ML estimates of the parameters θ which are consistent and asymptotically normal.

State-Space Models Kalman Filter MCMC General State-Space Models Session 6: State-space Models & Filtering 19/ 85 Non-Linear Non-Gaussian State-Space Models : If the state-space model is not Gaussian, the likelihood can still be constructed in the same way using the minimum mean square linear estimators of the state vector. However, the estimators θ that maximize the likelihood are the quasi-maximum likelihood (QML) estimators of the parameters. It can be shown that the QML estimators are also consistent and asymptotically normal.

State-Space Models Kalman Filter MCMC General State-Space Models Session 6: State-space Models & Filtering 20/ 85 Another algorithm can be applied to a state-space model; given a fixed set of data, estimates of the state vector are computed at each time t in the sample period taking into account the full information set available. This algorithm computes a t T = E (α t Ψ T ) along with its MSE, P t T, for all t = 1,..., T 1.

State-Space Models Kalman Filter MCMC General State-Space Models Session 6: State-space Models & Filtering 21/ 85 The latter quantities are computed via a set of backward recursions and use the quantities a t+1 t, a t t and the MSE matrices P t t, P t+1 t, which are obtained from (2). In particular, to obtain a t T and P t T, we start with a T T and P T T and we run backwards for t = T 1,..., 0 a t T = a t t + Pt ( ) at+1 T a t+1 t P t T = P t t + Pt ( ) Pt+1 T P t+1 t P t, Pt = P t T tp t+1 t.

State-Space Models Kalman Filter MCMC General State-Space Models Session 6: State-space Models & Filtering 22/ 85 Markov chain Monte Carlo Applications During the last decade, the extensive use of the MCMC, in particular the Gibbs sampler, has given rise to another smoothing algorithm called the simulation smoother and is also closely related to the Kalman filter. In contrast, to the fixed interval smoother, which computes the conditional mean and variance of the state vector at each time t in the sample, a simulation smoother is used for drawing samples from the density p (α 0,..., α T Y T ).

State-Space Models Kalman Filter MCMC General State-Space Models Session 6: State-space Models & Filtering 23/ 85 The first simulation smoother is based on the identity p (α 0,..., α T Ψ T ) = p (α T Ψ T ) T 1 t=0 p (α t Ψ t, α t+1 ) and a draw from p (α 0,..., α T Ψ T ) is recursively constructed in terms of α t.

State-Space Models Kalman Filter MCMC General State-Space Models Session 6: State-space Models & Filtering 24/ 85 Starting with a draw α T N ( α T T, P T T ), the main idea is that for a Gaussian state space model p (α t Ψ t, α t+1 ) is a multivariate normal density and hence it is completely characterized by its first and second moments. In order to compute these moments, the usual Kalman filter recursions (2) are run, so that α t t is initially obtained. Then, the draw α t+1 p (α t+1 Ψ t, α t+2 ) is treated as m additional observations and a second set of m Kalman filter recursions is run for each element of the state vector α t+1.

State-Space Models Kalman Filter MCMC General State-Space Models Session 6: State-space Models & Filtering 25/ 85 However, the latter procedure involves the inversion of system matrices, which are not necessarily non-singular. To overcome this problem another simulation smoother algorithm has been devised which is computationally more efficient. The main idea of the algorithm is to obtain a sample from the joint density of the transition equation disturbances, i.e. p (H 0 ε 0,..., H T ε T Ψ T ), by sampling η t p (H t ε t Ψ T, H t+1 ε t+1,..., H T ε T ).

State-Space Models Kalman Filter MCMC General State-Space Models Session 6: State-space Models & Filtering 26/ 85 This allows the state vector to be reconstructed, using the transition equation (1b) and substituting the simulated disturbances. In particular, the new simulation smoother requires only the prediction equations (3) to be initially run and the quantities v t, F t and L t to be stored. Then, starting with r T = 0 and U T = 0, the following backward recursions are run for t = T, T 1,..., 1. C t = Ω t Ω t U t Ω t, κ t N (0, C t ), r t 1 = Z tf t 1 v t + L ( t rt U t Ω t Ct 1 ) κ t, U t 1 = Z tf t 1 Z t + L ( t Ut + U t Ω t Ct 1 ) Ω t U t Lt.

State-Space Models Kalman Filter MCMC General State-Space Models Session 6: State-space Models & Filtering 27/ 85 Then, for t = 1,..., T, η t = Ω t r t + κ t is a draw from p (H t ε t Ψ T, H t+1 ε t+1,..., H T ε T ). For the initial disturbance term, η 0 = P 1 0 r 0 + κ 0, where κ 0 N ( 0, P 1 0 P 1 0 U 0 P 1 0 ), is a draw from p (H 0 ε 0 Ψ T, H 1 ε 1,..., H T ε T ). The state vector is simulated by starting with α 0 = 0 and running for t = 0,..., T the transition equation recursion with H t ε t substituted by η t, i.e. α t+1 = T t α t + η t.

State-Space Models Kalman Filter MCMC General State-Space Models Session 6: State-space Models & Filtering 28/ 85 Inference in General State-Space Models To recap, inference goals for state-space models are filtering/tracking: estimate state at time t from all observations up to time t p(α t Ψ t ) smoothing: estimate state at time t from all past and possibly some future observations p(α t Ψ t+s ) prediction: estimate state at time t from observations up to a previous time point t s p(α t Ψ t s )

State-Space Models Kalman Filter MCMC General State-Space Models Session 6: State-space Models & Filtering 29/ 85 The general (first-order Markov) state equation takes the form α t = f (α t 1, θ t 1 ) + η t 1 and the general observation equation takes the form y t = h(α t, θ t ) + ɛ t. For simplicity, we assume that the error processes {η t } and {ɛ t } are independent.

State-Space Models Kalman Filter MCMC General State-Space Models Session 6: State-space Models & Filtering 30/ 85 The fundamental inference mechanism is Bayesian; we compute the posterior quantities of interest sequentially in the following recursive calculation: Prediction p(α t Ψ t 1 ) = p(α t α t 1 )p(α t 1 Ψ t 1 ) dα t 1 Updating p(α t Ψ t ) = p(y t α t )p(α t Ψ t 1 ) p(y t Ψ t 1 )

State-Space Models Kalman Filter MCMC General State-Space Models Session 6: State-space Models & Filtering 31/ 85 The above equations only provide an analytical solution if all densities in the state and observation equation are Gaussian, and both the state and the observation equation are linear. If these conditions are met, the Kalman filter provides the optimal Bayesian solution to the tracking problem. If these conditions are not met, we require approximations: Extended Kalman filter (EKF): requires Gaussian densities, approximates non-linearities (using a first-order Taylor expansion) Particle filter (PF): approximates non-gaussian densities and non-linear equations

State-Space Models Kalman Filter MCMC General State-Space Models Session 6: State-space Models & Filtering 32/ 85 Particle Filter The particle filter uses Monte Carlo methods, in particular Importance sampling, to construct the approximations. We approximate the integral E f [g(x )] = g(x)f (x) dx by writing E f [g(x )] E f0 [ f (X )g(x ) f 0 (X ) for some importance sampling density f 0. ] g(x)f (x) = f 0 (x) dx f 0 (x)

State-Space Models Kalman Filter MCMC General State-Space Models Session 6: State-space Models & Filtering 33/ 85 We then approximate the integral by sampling x 1,..., x N from f 0 for large N, then constructing the approximation Ê fn = 1 N N i=1 g(x i )f (x i ) f 0 (x i ) = 1 N N w i g(x i ), i=1 say, where, if f 0 is chosen carefully as N Ê fn E f [g(x )]

State-Space Models Kalman Filter MCMC General State-Space Models Session 6: State-space Models & Filtering 34/ 85 If the function f is not known exactly, but only up to proportionality, the same procedure can work if the weights w i are suitably normalized to sum to one, that is, if above is replaced by w i = w i W w i = f (x i) f 0 (x i ) as W approximates the integral f (x) dx = W = n w i. i=1 f (x) f 0 (x) f 0(x) dx

State-Space Models Kalman Filter MCMC General State-Space Models Session 6: State-space Models & Filtering 35/ 85 Given a non-linear and non-gaussian state space model, the goal is to compute the posterior density p(α t Ψ t ) at each time t exactly. At each time point t, perform the following Sequential Importance Sampling (SIS) procedure: Draw random samples ( particles ) from a chosen importance density that can be sampled directly. Compute a normalized weight for each particle Approximate the true posterior density at time t by the weighted sum of the particles. Given sufficiently large numbers of particles, this IS characterization converges to the true posterior density.

State-Space Models Kalman Filter MCMC General State-Space Models Session 6: State-space Models & Filtering 36/ 85 In the filtering problem, at time t, we approximate p(α t Ψ t ) by particles x t = (x t1,..., x tn ), a sample from some importance sampling density f 0. normalized weights w t = (w t1,..., w tn ) via the discrete distribution {(w ti, x ti ), i = 1..., N}

State-Space Models Kalman Filter MCMC General State-Space Models Session 6: State-space Models & Filtering 37/ 85 Two major questions: What importance density f 0 can or should be chosen? How do we compute the weights efficiently, i.e. in a recursive fashion such that for a given weight wti, we just need a new observation y t to get an approximation to the posterior p(α t Ψ t ).

State-Space Models Kalman Filter MCMC General State-Space Models Session 6: State-space Models & Filtering 38/ 85 A simple choice for the importance sampling density at time t is the transition prior, that is as then f 0 (α t x t 1, Ψ t ) p(α t x t 1 ) w ti w t 1,ip(y t x ti). This procedure works well in general.

State-Space Models Kalman Filter MCMC General State-Space Models Session 6: State-space Models & Filtering 39/ 85 Particle Degeneracy: A problem with sequential importance sampling is that typically, after a few iterations, all but one particle have negligible weights. This phenomenon is termed degeneracy. The degree of degeneracy is represented by the effective sample size ( N ) 1 N t = (wti) 2 i=1 Possible solutions to overcome degeneracy effects: brute force: very large N optimized choice of importance density resampling

State-Space Models Kalman Filter MCMC General State-Space Models Session 6: State-space Models & Filtering 40/ 85 Resampling: Goal is to eliminate particles with small weights and replace by new particles drawn from the vicinity of particles with larger weights concentrate on particles with large weights model important parts of the posterior more precisely Various efficient algorithms exist for resampling which operate in O(N) time (e.g. Sampling Importance Resampling (SIR))

Session 6: 41/ 85 In many data sets the outcome of interest is the time to an event time between trades time to a credit default time until stock value threshold excedance actuarial survival warranty exposure to insurance risk

Session 6: 42/ 85 The distinguishing feature of such data is that at the end of the follow up period the event may not have be observed, and thus the occurrence time is censored. Censoring may occur as truncation of study period loss to follow up from non-specific cause loss to a competing event unrelated to the cause of failure being studied

Session 6: 43/ 85 Typically, components are installed over a period and followed up to a fixed date beyond the end of study, and the last components installed will thus be studied for a shorter period than those installed first, and will be less likely to undergo failure. We often can legitimately re-align installation times, and work in relative rather than calendar time.

Session 6: 44/ 85 Mathematical Notation: The principal difference between time-to-event analysis and conventional regression is that account is taken of potential censoring in the response variable we may observe some actual responses (survival, failure) times, censored responses where we do not observe an actual failure but rather only that the failure occurs after a censoring time (the end of study) this is called right-censoring occasionally, we observe left-censoring or interval-censoring

Session 6: 45/ 85 the response data is thus bivariate (Y, Z) where Y is the time at which the response is measured, and { 1 Failure is observed Z = 0 Censored

Session 6: 46/ 85 The potential presence of censoring fundamentally changes how we view the modelling process - previously we have looked at probability densities and expected responses etc. we have previously only dealt with data y for which we need to specify P [Y = y]; we now need to think about P [Y > y] for right censoring P [Y y] for left censoring We now take an alternative view, and examine reliability/survivor and hazard functions.

Session 6: 47/ 85 Survival In Discrete Time The probability mass function for response variable Y is f Y, f Y (y) = P [Y = y] y = 0, 1, 2,... The distribution function F Y is F Y (y) = P [Y y] = y f Y (t) = P [Y = 0] +... + P [Y = y] t=0 that is a cumulative probability function. Note that the function F Y (y) is a non-decreasing function.

Session 6: 48/ 85 In conventional regression modelling, the probability contribution for data point i with response y i is f Y (y i ). For right-censored data with censoring at y i, however, we only observe the event Y > y i that is, death/failure has not occurred before y i time units. This event has probability P [Y > y i ] = 1 F Y (y i ) This motivates consideration of the survivor (reliability) function S Y (y) = 1 F Y (y) Note that S Y (y) is a non-increasing function.

Session 6: 49/ 85 The likelihood function (via which inference and testing will be done) is thus f Y (y i ) S Y (y i ) that is i:z i =1 i:z i =0 LIKELIHOOD FOR UNCENSORED DATA LIKELIHOOD FOR CENSORED DATA and the role of the predictors can be introduced via the parameters of f Y and F Y.

Session 6: 50/ 85 Let f Y (y) = P [Y = y] y = 0, 1, 2,... define a discrete failure distribution. Then S Y (y) = P [Y > y] = 1 F Y (y) = f Y (j) j=y+1

Session 6: 51/ 85 Example Geometric Model For some probability π) f Y (y) = (1 π) y π y = 0, 1, 2,... and S Y (y) = (1 π) y+1 y = 0, 1, 2,...

Session 6: 52/ 85 The Discrete Hazard Function As an alternative method of specification, we consider the discrete hazard function h Y (y) = P [Failure at y Survival y] = and the integrated hazard H Y (y) = y h Y (t). t=0 f Y (y) S Y (y 1)

Session 6: 53/ 85 Thus and y 1 f Y (y) = (1 h Y (j)) h Y (y) j=0 y S Y (y) = (1 h Y (j)) j=0

Session 6: 54/ 85 Example Constant Hazard If f Y (y) = (1 π) y π y = 0, 1, 2,... then h Y (y) = (1 π)y π (1 π) y+1 = π 1 π that is, a constant, independent of y.

Session 6: 55/ 85 The Continuous Time Model The probability density function for continuous response variable Y is f Y, and the expectation, likelihood function and so on that are required for regression modelling are formed from f Y. The distribution function F Y is F Y (y) = P [Y y] = y 0 f Y (t) dt In conventional regression modelling, the likelihood contribution for data point i with response y i is f Y (y i ). For right-censored data with censoring at y i, we have again the reliability function S Y (y) = 1 F Y (y)

Session 6: 56/ 85 Continuous Hazards As a further alternative method of specification, we consider the continuous hazard function h Y (y) = lim δy 0 P [Failure in (y, y + δy) Survival y] = f Y (y) S Y (y) and the integrated hazard and it can be shown that H Y (y) = y 0 h Y (t) dt S Y (y) = exp { H Y (y)}

Session 6: 57/ 85 The Kaplan-Meier Curve The Kaplan-Meier curve (or product-limit estimate) is a non-parametric estimate of the reliability function; it is a decreasing step-function, where the downward steps take place at the times of the failures The estimated reliability function at the jth failure/censoring time as j ( ) z i Ŝ j = 1 (4) n i + 1 i=1 Standard errors are also available.

Session 6: 58/ 85 Construction: Let sample size n comprise observed and censored failure times 0 < y (1) < y (2) <... < y (m), be the distinct failure times, sorted into ascending order d j be the number of number of failures observed at time y (j) usually d j = 1 certainly d j 1 (d j > 1 implies tied failure times) n j be the number of patients at risk of failure at time t (j), that is, the number of patients who have failure/censoring time greater than or equal to t (j).

Session 6: 59/ 85 Then the observed probability of surviving beyond t (j) (conditional on having survived that long) is p j = n j d j n j = 1 q j say, where q j = d j /n j is the estimated conditional probability of failure at time t (j). Using the chain rule for probabilities, the estimated probability of surviving at least until time t is J t J t ( P (t) = p j = 1 d ) j = n Ŝ KM (t) (5) j j=1 where J t = max { j : t (j) t }. j=1

Session 6: 60/ 85 Standard Errors: A number of possibilities have been suggested. Let P j = P ( ) t (j). Then Greenwood s Formula Peto s Formula ( ) s.e. Pj ( ) s.e. Pj = P j 1 d i j n i d i i=0 = P j 1 P j n j where n j is an adjusted or effective sample size, the number of survivors at the beginning of the interval ( tj, t (j+1) ).

Session 6: 61/ 85 The Nelson-Aalen Curve The Nelson-Aalen estimate is a non-parametric estimate of the cumulative hazard function; it takes the form J t ( ) dj Ĥ (t) = (6) j=1 where J t = max { j : t (j) t }. From this, we can construct another estimate of the reliability function } Ŝ FH (t) = exp { Ĥ (t) this is the Fleming-Harrington estimate of the reliability function. n j

Session 6: 62/ 85 Standard Errors: If Ĥj = Ĥ(t (j)), can use Greenwood Tsiatis Klein ) s.e. (Ĥj = j ) s.e. (Ĥj = ) s.e. (Ĥj = i=0 j d i n i (n i d i ) j i=0 d i n 2 i=0 i d i (n i d i ) n 3 i

Session 6: 63/ 85 The Cox Regression Model The Cox (or Proportional Hazards) model provides a simple way of introducing exogenous variables into the survival model. The basic components are a baseline hazard function, h 0 and a linear predictor and (positive) link function g. Then for observed predictor values X 1 = x 1, X 2 = x 2,..., X K = x K, the hazard function takes the form h Y (y; x) = g(x T β)h 0 (y) that is, the hazard is modified in a multiplicative fashion by the linked-linear predictor. Typically, g is the exponential function.

Session 6: 64/ 85 From the previously established relationships, { y } { S Y (y; x) = exp h Y (t) dt = exp 0 y 0 } g(x T β)h 0 (y) dt If a coefficient β k is positive, the hazard is increased, and the expected failure time decreased. The significance of a particular predictor is based on the magnitude of β t = ) s.e. ( β If t > 2, then the hypothesis that β = 0 can be rejected.

Session 6: 65/ 85 Discrete Time Proportional Modelling: In the discrete time case, proportional hazards modelling needs to be modified to respect constraints on the hazards to be probabilities. Recall that h Y (y) = P [Failure at y Survival y] = Then, by construction, 0 h Y (y) 1. f Y (y) S Y (y 1) If this hazard is a baseline hazard, and wish to recognize modification of the hazard by exogenous variables, these constraints have to be respected.

Session 6: 66/ 85 Specifically, h Y (y; x) = g(x T β)h 0 (y) 1 may not be guaranteed after the multiplicative modification by g. One construction that guarantees the constraints are met is to model on the transformed scale, that is ( ) ( ) hy (y; x) = g(x T h0 (y) β). 1 h Y (y; x) 1 h 0 (y) This is the proportional odds model.

Session 6: 67/ 85 But, for general hazard probabilities h, h(y) f (y)/s(y 1) = 1 h(y) 1 f (y)/s(y 1) = f (y) S(y 1) f (y) = f (y) S(y) so proportional odds modelling has a sensible interpretation.

Session 6: 68/ 85 The Accelerated Life Model The Accelerated Life model provides another way of introducing the influence of predictors into the survival model. The basic components now are a baseline reliability function, S 0 and a linear predictor and (positive) link function g.. Then for an experimental unit with observed predictor values X 1 = x 1, X 2 = x 2,..., X K = x K, the reliability function takes the form S Y (y; x) = S 0 (g(x T β)y) that is, the time scale is modified in a multiplicative fashion by the linked-linear predictor; this allows direct modelling of the influence of predictors on survival.

Session 6: 69/ 85 Frailty Modelling The idea of frailty modelling is to introduce random effects terms into the linear predictor that appears in the proportional hazards and accelerated life models. For example, we extend x T i β = β 0 + β 1 x i1 + β 1 x id +... + β D x id to include a random component that is specific to the individual observational unit (bond, company etc.) concerned, that is, we have β = β 0 + β 1 x i1 + β 1 x i2 +... + β D x id + L i x T i where L i is some (usually zero mean) random variable.

Session 6: 70/ 85 The Log-Rank Test : The log-rank test is a standard test for significant differences between two (or more) reliability functions that differ because of the influence of the different levels of a discrete predictor. H 0 : S 1 = S 2 H 1 : S 1 S 2 It is a non-parametric test based on ranks of samples for the two or more subgroups. Asymptotic or exact versions of the test can be carried out.

Session 6: 71/ 85 It is possible to fit and compare parametric survival models to such data. Parametric densities, reliability functions, hazards etc. can be readily used in the formation of a likelihood, potentially within the proportional hazards/accelerated life framework. Typical models used are Weibull Gamma Log-Logistic Log-Normal Pareto

Session 6: 72/ 85 Weibull : for y > 0, f (y) = α λ α y α 1 exp { ( y α } λ) { ( y α } F (y) = 1 exp λ) { ( y α } = S(y) = exp λ) h(y) = α λ α y α 1 H(y) = ( y λ) α for parameters α, λ > 0 (the shape and scale parameters respectively).

Session 6: 73/ 85 The Weibull pdf for different Alpha (Lambda=5) f(y) 0.0 0.1 0.2 0.3 0.4 0.5 Alpha=1 Alpha=2 Alpha=3 Alpha=4 Alpha=5 0 2 4 6 8 10 y

Session 6: 74/ 85 The Weibull survivor function for different Alpha (Lambda=5) S(y) 0.0 0.2 0.4 0.6 0.8 1.0 Alpha=1 Alpha=2 Alpha=3 Alpha=4 Alpha=5 0 2 4 6 8 10 y

Session 6: 75/ 85 The Weibull hazard function for different Alpha S(y) 0 5 10 15 20 Alpha=1 Alpha=2 Alpha=3 Alpha=4 Alpha=5 0 2 4 6 8 10 y

Session 6: 76/ 85 The Weibull log-hazard S(y) -25-20 -15-10 -5 0 5 Alpha=1 Alpha=2 Alpha=3 Alpha=4 Alpha=5 0 2 4 6 8 10 y

Session 6: 77/ 85 Multivariate Models & Competing Risks An important generalization extends event time Y to be a vector quantity, that is, we have say K different aspects of failure, with random variable Y = (Y 1,...Y K ) requiring a joint probability model. A model that captures joint structure of time-to-event observations must respect marginal and conditional coherence requirements, and if possible, capture a full range of dependency structures. Typically, such models are difficult to construct.

Session 6: 78/ 85 Some joint models exist Multivariate Exponential Multivariate Weibull Multivariate Lognormal Hougaard etc.

Session 6: 79/ 85 Some joint models can be constructed Copula (latent uniform) Latent Multivariate Normal Typically, inference for these models is quite complex, but can be achieved using numerical procedures.

Session 6: 80/ 85 Some models use the idea of a frailty or factor-type structure. Y 1,..., Y K positive random variables, potential censoring, corresponding to different items (defaultable bonds etc.) modelling achieved through hazard rates h 1,..., h K set h i (t) = h(t) + η i (t) i = 1,..., K. h(t) is some market-level factor determining global hazard rates, induces dependence across the individual items η i (t) is some item specific hazard.

Session 6: 81/ 85 Another common experimental situation is one of competing risks; that is, there are K potential causes of failure, but at most one is observed for each individual in the study. Then the failure time, T, is defined by T = min {Y 1,..., Y K }

Session 6: 82/ 85 If the cause of failure, C, is recorded as C = k, we observe Y 1 > t,..., Y k 1 > t, Y k = t, Y k+1 > t,..., Y K > t whereas if the observation is censored, we observe Y 1 > t,..., Y k 1 > t, Y k > t, Y k+1 > t,..., Y K > t A joint model is again often difficult to construct, and in addition there are issues to do with identifiability of the marginal failure processes for the components of Y. i.e. without sufficient data, there are problems in estimating the models for Y 1,..., Y K considered on their own

Session 6: 83/ 85 Multi-State Modelling In multi-state modelling, rather than just having the standard failed/not failed (dead/alive) dichotomy, with { 0 Censored Z = 1 Failure is observed we have an extension to polytomy, where 0 Censored at time t 1 State 1 at time t Z(t) =.. M State M at time t

Session 6: 84/ 85 In such a model, we attempt to estimate the probability π ij (t i, t j ) = P [State j at time t j State i at time t i ] for t i < t j, or rate, λ ij, of transition from one state to another. In a discrete time framework, homogeneous Markov Models are typically used, characterized by a transition matrix P, with (i, j) th entry π ij, independent of t, with M π ij = 1 j=0

Session 6: 85/ 85 A multi-state process is a random process {Z(t)} t 0 describing the state within which the individual lies at time t. This kind of modelling is very useful for modelling progression to credit default; different states could correspond to different credit ratings.