09 12 2019
play

09-12-2019 Outline Introduction to Dynamic Linear Models (DLM) - - PDF document

09-12-2019 Outline Introduction to Dynamic Linear Models (DLM) - Conceptual introduction - Difference between the Classical methods and DLM Monitoring and data filtering II - A very simple DLM and the Kalman filter - Break (5 minutes)


  1. 09-12-2019 Outline Introduction to Dynamic Linear Models (DLM) - Conceptual introduction - Difference between the ”Classical methods” and DLM Monitoring and data filtering II - A very simple DLM and the Kalman filter - Break (5 minutes) Dan Jensen IPH, KU Appliction examples using the simple DLM - Break (10 minutes) General form of the DLM Appliction examples using the general DLM Concluding remarks and Exercises The basics of a DLM The basics of a DLM Dynamic Linear Current Previous = + Trend value value i.e. non-static, adaptive TRUE VALUE Estimation Forecasted Observed value value Uncertainties The basics of a DLM ”Classical methods” compared to DLM In Chapter 7: Model Time series: k1, … , kt Moving average EWMA Model: i.e. we can make forecasts! Control charts: test if θ = θ’ Alarm system: Effect estimation: Decision support: Fundemental assumption: θ is constant over time ”I tried this new feed mixture. ”If I stay the course, how will my production look IF “everything is fine” THEN “things progress as expected” Here: Does it make my production look better or worse, over the next few years?” Therefore: Model: (Observation equation) after we strip away the observational noise? Notice: the underlying mean, , can change over time! How much better?” ”How will it look if I change to a faster growing IF “things progress UN-expectedly” THEN “Something is wrong!” breed?” (System equation) 1

  2. 09-12-2019 First Order Univariate Polynomial DLM Updating the (simple) DLM: the Kalman filter A very simple DLM Prior information: Prior mean Prior variance 1-step forecast information: Forecast Forecast variance Adaptation information Forecast error Adaptive coefficient Filtered (posterior) information Filtered mean Filtered variance Updated with each time step! Relation to the EWMA EWMA: Filtered mean: When and : Incorporate external information Incorporate external information Intervention - 1. Known effect Incorporate external information: intervention We want the model to adapt to the new known conditions Types of external information: 1. Known effect , experienced before Ex. 8.4, p. 88: Productivity in broilers / reference weight 38 days (ex: new breed with a known different performance) V=10000 g 2 (i.e. SD of 333 g) → We want the model to adapt to the new known conditions Until batch 10: Ross 208; m 10 = 1883 g, W= 100 g 2 2. Unknown effect From batch 11: Ross 308, Δ » N (μ Δ , W Δ ) (ex: wave of heat, introduction of new animals in a group) where μ Δ = 70 and W Δ = 100 → We want the model to adapt to the new unknown conditions Revised prior: (θ t’ | D t’-1 ) » N(m t’-1 + μ Δ , R t’ ), R t’ = C t’-1 + W t’ + W Δ 3. Unknown effect we want to measure (ex: change of feed composition, new veterinary treatments) m 11 = m 10 + 70 = 1883 + 70 = 1953 → We want to measure the effect of a voluntary change And R 11 = C 10 + W 11 + W Δ = 1201+ 100 +100 = 1401 2

  3. 09-12-2019 Incorporate external information Incorporate external information Intervention - 2. Unknown effect Intervention - 2. Unknown effect Productivity in broilers / reference weight We want the model to adapt to the new unknown conditions Intervention, prior knowlegde Ex 1: broiler example with no prior information Δ ~ N (70, 100) Intervention, Δ ~ N (0, 20000) for t = 11 no prior knowlegde Δ ~ N (0, 20000) No intervention In practice we temporarily apply a larger system variance W Change in production should be modeled as intervention If any prior information is available: use it ! Incorporate external information Intervention - 3. Estimation of effect Productivity in broilers / reference weight Smoothed mean + 75 g Intervention, no prior knowlegde Δ ~ N (0, 20000) Smoothing Retrospective analysis Modeling patterns with a DLM The general Dynamic Linear Model Definition A linear growth model In a general DLM, observations may be multivariate (i.e. vectors)  θ    Let Y t = ( y 1 , … , y n )’ be a vector of key figures observed at time t . Parameter vector Design matrix 1 = 0   θ =   1 t F     Let θ t = ( θ 1 , … , θ m )’ be a vector of parameters describing the system at time t. θ t 0     2 t Observation equation k t = F’ t θ t + ν t , ν t ~ N(0,V t ) General form of the DLM Observation Equation: Y t = F’ t θ t + ν t , ν t ~ N(0,V t ) System matrix Covariance matrix     1 1 W 0 System Equation: θ t = G t θ t-1 + ω t , ω t ~ N(0,W t ) =   =   1 t G   W   t t  0 1   0 W  2 t F t is the design matrix: extracts expected observations from θ t System equation θ t = G t θ t-1 + ω t , ω t ~ N(0,W t ) G t is the system matrix: describe how θ t changes over time DLM combined with Kalman Filter : estimate the underlying state vector θ t by its mean vector m t and its variance-covariance matrix C t . 3

  4. 09-12-2019 Updating the general DLM Modeling patterns with a DLM A linear growth model: example of daily feed intake Prior information: Prior mean     Specification of the priors 600 10000 0 =   =   m   C   Prior variance 0 0     25 0 100 1-step forecast information: Observational variance: V = 90000 (i.e. 300 g standard deviation) Forecast Evolution variance: delta = 0.98 Forecast variance Adaptation information Adaptive coefficient Forecast error Filtered (posterior) information Filtered mean Filtered variance Modeling patterns with a DLM Modeling patterns with a DLM A linear trend + a cyclically repeating pattern: A linear trend + a cyclically repeating pattern: - Section-level water consumption of weaned pigs - Section-level water consumption of weaned pigs - Parameter estimation Sine-Cosine transformation of one wave Modeling patterns with a DLM Modeling patterns with a DLM A linear growth model: example of daily feed intake A linear trend + a cyclically repeating pattern: - Section-level water consumption of weaned pigs - Parameter estimation System matrix 8x8 matrix Design matrix Observation Equation: Y t = F’ t θ t + ν t , ν t ~ N(0,V t ) System Equation: θ t = G t θ t-1 + ω t , ω t ~ N(0,W t ) 4

  5. 09-12-2019 Modeling patterns with a DLM Monitoring Deviations from the model A linear trend + a cyclically repeating pattern: First of all: use standardized errors: - Section-level water consumption of weaned pigs Then: Control chart, with alarm limits Or V-mask (parameters d and Ψ) Applied on the cumulative sum (cusum) of the standardized error: =  t = + C u u c − t t t t 1 = t 1 Red lines: Forecasted values Or: Blue line: expected daily mean value Others, e.g. Bayesian networks, neural networks, etc. Green rugs: days with medical treatment of the animals Concluding remarks Differents Models were presented • Simple local level model • DLM in its general form • Examples The general form of the model allows us to include patterns (e.g. cyclic patterns for for drinking activity, linear patterns for daily gain) Not necessarily as graphs – automatic alarms Many handles to adjust – be careful! Always combine with your knowledge on animal production Next time: how to define the variance components! 5

Recommend


More recommend