1 Markov Chains: Transitional Modeling Qi Liu. 2 content Terminology Transitional Models without Explanatory Variables Transitional Models without Explanatory.

Slides:



Advertisements
Similar presentations
Chapter 2 Describing Contingency Tables Reported by Liu Qi.
Advertisements

Categorical Data Analysis
ST3236: Stochastic Process Tutorial 3 TA: Mar Choong Hock Exercises: 4.
Chapter 12 Inference for Linear Regression
Many useful applications, especially in queueing systems, inventory management, and reliability analysis. A connection between discrete time Markov chains.
Continuous-Time Markov Chains Nur Aini Masruroh. LOGO Introduction  A continuous-time Markov chain is a stochastic process having the Markovian property.
CHAPTER 24: Inference for Regression
Loglinear Models for Independence and Interaction in Three-way Tables Veronica Estrada Robert Lagier.
Hidden Markov Models. A Hidden Markov Model consists of 1.A sequence of states {X t |t  T } = {X 1, X 2,..., X T }, and 2.A sequence of observations.
Loglinear Models for Contingency Tables. Consider an IxJ contingency table that cross- classifies a multinomial sample of n subjects on two categorical.
Tutorial 8 Markov Chains. 2  Consider a sequence of random variables X 0, X 1, …, and the set of possible values of these random variables is {0, 1,
Operations Research: Applications and Algorithms
Graduate School of Information Sciences, Tohoku University
1. Markov Process 2. States 3. Transition Matrix 4. Stochastic Matrix 5. Distribution Matrix 6. Distribution Matrix for n 7. Interpretation of the Entries.
1 STA 517 – Introduction: Distribution and Inference 1.5 STATISTICAL INFERENCE FOR MULTINOMIAL PARAMETERS  Recall multi(n, =( 1,  2, …,  c ))  Suppose.
. PGM: Tirgul 8 Markov Chains. Stochastic Sampling  In previous class, we examined methods that use independent samples to estimate P(X = x |e ) Problem:
TCOM 501: Networking Theory & Fundamentals
Lecture 24: Thurs. Dec. 4 Extra sum of squares F-tests (10.3) R-squared statistic (10.4.1) Residual plots (11.2) Influential observations (11.3,
Linear statistical models 2008 Count data, contingency tables and log-linear models Expected frequency: Log-linear models are linear models of the log.
Copyright (c) 2004 Brooks/Cole, a division of Thomson Learning, Inc. Chapter 14 Goodness-of-Fit Tests and Categorical Data Analysis.
Linear statistical models 2009 Count data  Contingency tables and log-linear models  Poisson regression.
Simple Linear Regression and Correlation
Sampling Distributions  A statistic is random in value … it changes from sample to sample.  The probability distribution of a statistic is called a sampling.
Generalized Semi-Markov Processes (GSMP)
+ Chapter 12: Inference for Regression Inference for Linear Regression.
Chapter 16 – Categorical Data Analysis Math 22 Introductory Statistics.
Discrete Multivariate Analysis Analysis of Multivariate Categorical Data.
+ Chapter 12: More About Regression Section 12.1 Inference for Linear Regression.
The Dirichlet Labeling Process for Functional Data Analysis XuanLong Nguyen & Alan E. Gelfand Duke University Machine Learning Group Presented by Lu Ren.
1 Topic 2 LOGIT analysis of contingency tables. 2 Contingency table a cross classification Table containing two or more variables of classification, and.
Chapter 7 Sampling and Sampling Distributions ©. Simple Random Sample simple random sample Suppose that we want to select a sample of n objects from a.
Chapter 11 The Chi-Square Test of Association/Independence Target Goal: I can perform a chi-square test for association/independence to determine whether.
Copyright © 2013, 2009, and 2007, Pearson Education, Inc. Chapter 13 Multiple Regression Section 13.3 Using Multiple Regression to Make Inferences.
Copyright © 2010 Pearson Education, Inc. Slide
Generalized Semi- Markov Processes (GSMP). Summary Some Definitions The Poisson Process Properties of the Poisson Process  Interarrival times  Memoryless.
Aim: How do we analyze data with a two-way table?
1 STA 617 – Chp11 Models for repeated data Analyzing Repeated Categorical Response Data  Repeated categorical responses may come from  repeated measurements.
1 STA 617 – Chp9 Loglinear/Logit Models 9.7 Poisson regressions for rates  In Section 4.3 we introduced Poisson regression for modeling counts. When outcomes.
STA617 Advanced Categorical Data Analysis
Joyful mood is a meritorious deed that cheers up people around you like the showering of cool spring breeze.
1 STA 617 – Chp10 Models for matched pairs 10.4 Symmetry, Quasi-symmetry and Quasi-independence.
1 STA 517 – Chp4 Introduction to Generalized Linear Models 4.3 GENERALIZED LINEAR MODELS FOR COUNTS  count data - assume a Poisson distribution  counts.
1 STA 617 – Chp10 Models for matched pairs Summary  Describing categorical random variable – chapter 1  Poisson for count data  Binomial for binary.
Multiple Logistic Regression STAT E-150 Statistical Methods.
Log-linear Models HRP /03/04 Log-Linear Models for Multi-way Contingency Tables 1. GLM for Poisson-distributed data with log-link (see Agresti.
Math 4030 – 6a Joint Distributions (Discrete)
The generalization of Bayes for continuous densities is that we have some density f(y|  ) where y and  are vectors of data and parameters with  being.
Copyright © 2013, 2009, and 2007, Pearson Education, Inc. Chapter 11 Analyzing the Association Between Categorical Variables Section 11.2 Testing Categorical.
Properties of the Binomial Probability Distributions 1- The experiment consists of a sequence of n identical trials 2- Two outcomes (SUCCESS and FAILURE.
The Practice of Statistics, 5th Edition Starnes, Tabor, Yates, Moore Bedford Freeman Worth Publishers CHAPTER 12 More About Regression 12.1 Inference for.
10.1 Properties of Markov Chains In this section, we will study a concept that utilizes a mathematical model that combines probability and matrices to.
Stochastic Processes and Transition Probabilities D Nagesh Kumar, IISc Water Resources Planning and Management: M6L5 Stochastic Optimization.
ST3236: Stochastic Process Tutorial 6
- 1 - Preliminaries Multivariate normal model (section 3.6, Gelman) –For a multi-parameter vector y, multivariate normal distribution is where  is covariance.
Hidden Markov Models. A Hidden Markov Model consists of 1.A sequence of states {X t |t  T } = {X 1, X 2,..., X T }, and 2.A sequence of observations.
The Practice of Statistics, 5th Edition Starnes, Tabor, Yates, Moore Bedford Freeman Worth Publishers CHAPTER 12 More About Regression 12.1 Inference for.
Let E denote some event. Define a random variable X by Computing probabilities by conditioning.
CHAPTER 12 More About Regression
CHAPTER 12 More About Regression
CHAPTER 12 More About Regression
Hidden Markov Autoregressive Models
AP Stats Check In Where we’ve been… Chapter 7…Chapter 8…
CSE 531: Performance Analysis of Systems Lecture 4: DTMC
Analyzing the Association Between Categorical Variables
CHAPTER 12 More About Regression
Joyful mood is a meritorious deed that cheers up people around you
CHAPTER 12 More About Regression
Autonomous Cyber-Physical Systems: Probabilistic Models
Discrete-time markov chain (continuation)
Chp 7 Logit Models for Multivariate Responses
Presentation transcript:

1 Markov Chains: Transitional Modeling Qi Liu

2 content Terminology Transitional Models without Explanatory Variables Transitional Models without Explanatory Variables Inference for Markov chains Data Analysis :Example 1 (ignoring explanatory variables)Example 1 Transitional Models with Explanatory Variables Data Anylysis: Example 2 (with explanatory variables)Example 2

3 Terminology Transitional models Markov chain K th-order Markov chain Tansitional probabilities and Tansitional matrix Tansitional probabilities and Tansitional matrix

4 Transitional models {y0,y1,…,yt-1} are the responses observed previously. Our focus is on the dependence of Yt on the {y0,y1,…,yt-1} as well as any explanatory variables. Models of this type are called transitional models.

5 Markov chain A stochastic process, for all t, the conditional distribution of Yt+1,given Y0,Y1, …,Yt is identical to the conditional distribution of Yt+1 given Yt alone. i.e, given Yt, Yt+1 is conditional independent of Y0,Y1, …,Yt-1. So knowing the present state of a Markov chain,information about the past states does not help us predict the future P(Yt+1|Y0,Y1, … Yt)=P(Yt+1|Yt)

6 K th-order Markov chain For all t, the conditional distribution of Yt+1 given Y0,Y1,…,Yt is identical to the conditional distribution of Yt+1,given (Yt,…,Yt-k+1) P(Yt+1|Y0,Y1,…Yt)=P(Yt+1|Yt-k+1,Yt-k+2,….Yt) i.e, given the states at the previous k times, the future behavior of the chain is independent of past behavior before those k times. We discuss here is first order Markov chain with k=1.

7 Tansitional probabilities

8 Transitional Models without Explanatory Variables At first, we ignore explanatory variables. Let f(y0,…,yT) denote the joint probability mass function of (Y0,…,YT),transitional models use the factorization: f(y0,…,yT) =f(y0)f(y1|y0)f(y2|y0,y1)…f(yT|y0,y1,…,yT-1) This model is conditional on the previous responses. For Markov chains, f(y0,…,yT) =f(y0)f(y1|y0)f(y2|y1)…f(yT|yT-1) (*) From it, a Markov chain depends only on one-step transition probabilities and the marginal distribution for the initial state. It also follows that the joint distribution satisfies loglinear model (Y0Y1, Y1Y2,…, YT-1YT) For a sample of realizations of a stochastic process, a contingency table displays counts of the possible sequences. A test of fit of this loglinear model checks whether the process plausibly satisfies the Markov property.

9 Inference for Markov chains

10 Inference for Markov chains(continue)

11 Example 1 (ignoring explanatory variables) A study at Harvard of effects of air pollution on respiratory illness in children. The children were examined annually at ages 9 through 12 and classified according to the presence or absence of wheeze. Let Yt denote the binary response at age t, t=9,10,11,12. 1 wheeze;2 no wheeze y9y10y11y12coun t y9y10y11y12count

12 Code of Example 1 Code of 11.7 data breath; input y9 y10 y11 y12 count; datalines; ; proc genmod; class y9 y10 y11 y12; model count= y9 y10 y11 y12 y9*y10 y10*y11 y11*y12 /dist=poi lrci type3 residuals obstats; run; proc genmod; class y9 y10 y11 y12; model count= y9 y10 y11 y12 y9*y10 y9*y11 y10*y11 y10*y12 y11*y12 y9*y10*y11 y10*y11*y12/dist=poi lrci type3 residuals obstats; run; proc genmod; class y9 y10 y11 y12; model count= y9 y10 y11 y12 y9*y10 y9*y11 y9*y12 y10*y11 y10*y12 y11*y12 /dist=poi lrci type3 residuals obstats; run; data breath_new;set breath; a=y9*y10+y10*y11+y11*y12; b=y9*y12+Y10*y12+y9*y11; proc genmod; class y9 y10 y11 y12; model count= y9 y10 y11 y12 a b /dist=poi lrci type3 residuals obstats; run;

13 Data analysis The loglinear model (y9y10,y10y11,y11y12) a first order Markov chain. P(Y11|Y9,Y10)=P(Y11|Y10) P(Y12|Y10,Y11)=P(Y12|Y11) G²= , df=8, with p-value<0.0001, it fits poorly. So given the state at time t, classification at time t+1 depends on the states at times previous to time t.

14 Data analysis (cont…) Then we consider model (y9y10y11, y10y11y12),a second-order Markov chain, satisfying conditional independence at ages 9 and 12, given states at ages 10 and 11. This model fits poorly too, with G²= ,df=4 and p-value<0.001.

15 Data analysis (cont) The loglinear model (y9y10,y9y11,y9y12,y10y11,y10y12,y11y12) that permits association at each pair of ages fits well, with G²=1.4585,df=5,and p-value= Parameter Estimate Error Limits Square Pr > ChiSq y9*y <.0001 y9*y <.0001 y9*y <.0001 y10*y <.0001 y10*y <.000 y11*y <.0001

16 Data analysis (cont) From above, we see that the association seems similar for pairs of ages1 year apart, and somewhat weaker for pairs of ages more than 1 year apart. So we consider the simpler model in which It also fits well, with G²=2.3, df=9, and p-value=

17 Estimated Conditonal Log Odds Ratios

18 Transitional Models with Explanatory Variables

19

20 Data Anylysis Example 2 (with explanatory variables) At ages 7 to 10, children were evaluated annually on the presence of respiratory illness. A predictor is maternal smoking at the start of the study, where s=1 for smoking regularly and s=0 otherwise.

21 Child ’ s Respiratory Illness by Age and Maternal Smoking

22 Data analysis (cont)

23 Code of Example 2 data illness; input t tp ytp yt s count; datalines; ; run; proc logistic descending; freq count; model yt = t ytp s/scale=none aggregate; run;

24 Output from SAS Deviance and Pearson Goodness-of-Fit Statistics Criterion DF Value Value/DF Pr > ChiSq Deviance Pearson Analysis of Maximum Likelihood Estimates Standard Wald Parameter DF Estimate Error Chi-Square Pr > ChiSq Intercept t ytp <.0001 s

25 Analysis

26 The model fits well, with G²=3.1186, df=8, p- value= The coefficient of is with SE , Chi- Square statistic and p-value <.0001,which shows that the previous observation has a strong positive effect. So if a child had illness when he was t-1, he would have more probability to have illness at age t than a child who didn’t have illness at age t-1. The coefficient of s is , the likelihood ratio test of H0 :=0 is ,df=1,with p-value There is slight evidence of a positive effect of maternal smoking.

27 Interpratation of Paramters ß

28 Thank you !